Ansicht
Dokumentation

ABENSTEPLOOP_ABEXA - STEPLOOP ABEXA

ABENSTEPLOOP_ABEXA - STEPLOOP ABEXA

RFUMSV00 - Advance Return for Tax on Sales/Purchases   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- Step Loop

This example demonstrates the obsolete direct use of step loops.

Source Code

Execute

Description

In the layout of dynpro 100, a variable step loop is initially defined with 10 repeating groups. The fields of the repeating groups are the components col1 and col2 of the structure wa of the ABAP program.

In the status STATUS_100, the function codes FIRST_PAGE, PREV_PAGE, PREV_LINE, NEXT_LINE, NEXT_PAGE, LAST_PAGE, and NEXT are set on pushbuttons of the application toolbar for dynpro 100.

The layout of dynpro 200 is the same as that of dynpro 100, except that the step loop is fixed here and not variable.

In the status STATUS_200, the function code PREVIOUS is set on a pushbutton of the application toolbar for dynpro 200.

When the program is executed, a step loop is displayed on dynpro 100, whose number of lines has been adjusted to fit the height of the screen but has no vertical scroll bars. On dynpro 200, a step loop is displayed which has a fixed size of 10 lines and this loop has a vertical scroll bar.

At the time of PBO, both step loops are filled from the internal table itab, where the loop for dynpro 100 is only executed through the step loop and for screen 200 it is parallel through the step loop and the internal table. The step loop on dynpro 200 is restricted to the rows 5 to 25 of the internal table. To fill the work area wa on dynpro 100, a PBO module is called. This is not necessary for dynpro 200.

At the time of PAI, a module is called in both dynpros within the loops. In this module, the system transfers possible user entries in the step loop lines to the corresponding lines of the internal table.

For dynpro 100, the scroll function for the step loop is programmed in the PAI module user_command_100. To do this, the number of rows of the step loop on the screen is buffered in the helper variable step, since sy-loopc is only filled within the loop. A scrolling function does not need to be programmed for dynpro 200, since it is automatically provided by the system in the form of the scroll bar.

The synchronization between the internal table and the step loop on dynpro 200 is handled by the variable c, which is used in the addition CURSOR of the statement LOOP. It is set before dynpro 200 is called, in correspondence with the display of the table on dynpro 100to start the step loops on both dynpros with the same table line. At the time of PAI of screen 200, c is read to redetermine the first table line after any scrolling with the scroll bar.






TXBHW - Original Tax Base Amount in Local Currency   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 3495 Date: 20240427 Time: 032342     sap01-206 ( 73 ms )