Ansicht
Dokumentation

ABENLOOP_GROUP_BY_PACKAGES_ABEXA - LOOP GROUP BY PACKAGES ABEXA

ABENLOOP_GROUP_BY_PACKAGES_ABEXA - LOOP GROUP BY PACKAGES ABEXA

TXBHW - Original Tax Base Amount in Local Currency   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- Grouping with LOOP in Packages

This example demonstrates a construction of the group key that does not depend on the line content.

Source Code

Execute

Description

Grouping of an internal table text with representative binding. The group key of the group loop is constructed as a value of the type i, which is calculated from the line index of the current line in sy-tabix. This creates groups of lines with the same definable size.

In the group loop, the lines of each group are placed in an internal table group in a member loop using the value operator with the addition BASE. This table is also displayed. Here, the group is addressed using the work area wa of the original output behavior of the LOOP due to the representative binding.

group could also be filled by the evaluation of a table comprehension using FOR ... IN GROUP, instead of in a member loop LOOP AT GROUP:

group = VALUE #( FOR wa> IN GROUP wa ( wa> ) ).

The executable example for grouping with FOR demonstrates how the entire group loop can be implemented using expressions.






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

Length: 2282 Date: 20240426 Time: 114712     sap01-206 ( 79 ms )