Skip to content

Instantly share code, notes, and snippets.

@hapejot
Last active March 21, 2022 14:36
Show Gist options
  • Select an option

  • Save hapejot/a26e32af51b08397de83639072035d2e to your computer and use it in GitHub Desktop.

Select an option

Save hapejot/a26e32af51b08397de83639072035d2e to your computer and use it in GitHub Desktop.
ABAP GROUP
LOOP AT demo INTO DATA(address)
GROUP BY ( city = address-city count = GROUP SIZE )
INTO DATA(city_group).
* APPEND value #( city = city-city count = city-count ) TO result.
APPEND city_group TO result.
ENDLOOP.
result = VALUE #( FOR GROUPS city_group OF address IN demo
GROUP BY ( city = address-city
count = GROUP SIZE )
( city_group ) ).
lt_banfn = VALUE #( FOR GROUPS banfn OF <line> IN mt_headers
GROUP BY <line>-key2 WITHOUT MEMBERS
( CONV #( banfn ) ) ).
lt_vbeln_va = VALUE #( FOR GROUPS x OF <line> IN mt_headers GROUP BY <line>-key1 WITHOUT MEMBERS ( CONV #( x ) ) ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment