Ansicht
Dokumentation

ABENTABLE_CONTROL1_ABEXA - TABLE CONTROL1 ABEXA

ABENTABLE_CONTROL1_ABEXA - TABLE CONTROL1 ABEXA

BAL Application Log Documentation   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

- Table Control with Scrolling

This example demonstrates program-driven scrolling in table controls.

Source Code

Execute

Description

The resizable table control flights is defined. The fields of the table control have been copied from the DEMO_CONN structure in the dictionary. The first two columns are lead columns. The corresponding fields are output fields. A title bar, columns headers, and a selection column are created. The selection column is assigned to the component MARK, of the type CHAR, length 1, from the structure DEMO_CONN. One column and multiple lines can be selected.

The flow logic of dynpro 100 contains one loop executed at PBO time and another loop executed at PAI time using the table control flights. During the PBO loop, a module is called to fill the table control from table itab of the ABAP program. During the PAI loop, a module is called to modify table itab.

Before the PBO loop, in the module status_0100 the current number of lines of the internal table itab is placed in component lines of control structure flights. This helps the system to correctly install the scroll bar of the table control.

During the PBO loop, in the module fill_table_control the work area demo_conn is filled with values from the internal table, where the line index corresponds to the current line of the table control.

During the PAI loop, in the module read_table_control the current number of the loop sy-loopc in the table control is placed in an auxiliary variable. The number depends on the size of the screen. The lines of the internal table whose line index matches the current line of the table control are overwritten by the content of the work area demo_conn. User input is passed from the input fields of the control to the internal table. A flag is set in the column MARK of the internal table indicating whether the table control line is selected or not.

After the PAI loop, user input is processed in the module user_command_0100. The GUI status SCREEN_100 enables the corresponding function codes. Both line-by-line and page-by-page scrolling is possible, and it is also possible to jump to the first or last page. Scrolling is enabled by setting the component top_line of the control structure flights. As an increment, page-by-page scrolling uses the helper variable filled in the PAI loop using sy-loopc.






CL_GUI_FRONTEND_SERVICES - Frontend Services   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 2769 Date: 20240420 Time: 125423     sap01-206 ( 63 ms )