Mentor SAP
Simplest call of SET_TABLE_FOR_FIRST_DISPLAY

The it_outtab parameter for the internal table that contains the display data is obligatory.

 

You can pass the information for formatting with various parameters. The simplest variant is to link to an ABAP Dictionary structure of the same type with the parameter i_structure_name.

 

 

Insertion of CALL METHOD by Pattern

To implement a method call from a global class, use the drag and drop function, or the ABAP Objects pattern.

 

To create the CALL METHOD statement with the ABAP Objects pattern, perform the following steps:

  1. Choose Pattern .
  2. In the Insert Statement dialog box, choose the ABAP Objects Patterns radio button.
  3. On the next screen, choose the Call Method radio button.
  4. Specify the values for the following fields:
    • Instance: The reference variable for the object for which the method is to be used.
    • Class or Interface: The class of the object (in this example, CL_GUI_ALV_GRID).
    • Method: The method name (in this example, SET_TABLE_FOR_FIRST_DISPLAY).
      The system inserts the CALL METHOD statement, including all parameters and exceptions, at the cursor position in the ABAP source code. Optional parameters and exceptions are inserted as comments. In this way, you avoid typing errors and omissions.
  5. Complete the actual parameters and program the exception handling.

 

 

Inserting CALL METHOD by Drag and Drop

Display the global class, for example cl_gui_alv_grid in the navigation area of the ABAP Workbench and drag the method to the editing area by holding down the left mouse button.

 

The CALL METHOD ABAP statement, which includes the signature parameters and exceptions, is inserted at the current cursor position in the source code of the program. Optional parameters and exceptions are inserted as comments.

 

You then add the name of the reference variable instead of xxxxxxx, complete the actual parameters, and program the exception handling.

 

 

Refreshing the Display

You can use the refresh_table_display method to prompt the representative instance to send the list data and the additional information to the instance on the presentation server again.

 

You can use the i_soft_refresh parameter to specify if the current filter and sort criteria are kept and applied (assign the value " ") or the current filter and sort criteria are kept but not applied (assign the value X).

 

You can use the row and col fields of a structure of the lvc_s_stbl global data type to specify the condition that scroll positions for rows or columns are retained when refreshing (assign the value X to each field). Pass the corresponding filled structure to the is_stable parameter.

 

Hint: If you change the row structure of the data table, call the set_table_for_first_display method again, because the field catalog must be created again.