I memorized the demo program, and tried write everything from scratch. Custom code is saved as ZDEMO_LOOP_AT_GROUP_SYNTAX on my local computer.
Idea was to:
NOTE: The group loop output was one of these: ls, <ls>, ls->*. Respective name used in member LOOP AT GROUP was: ls, <ls>, ls. This is not what I expected when INTO REFERENCE was used. I first wrote LOOP AT GROUP ls->* and this gave syntax error.
Idea was to:
- Define an itab of different structure, content and see how behavior changes when itab rows sort order is changed and when grouping is done with/without ASCENDING.
- Learn instantiation, sections and method chaining of class cl_demo_output
- Get familiar with the syntax variations.
- Truly understand the difference between representative binding and group key binding of group loop with member loop. I could see that group key had different runtime structure than itab row.
NOTE: The group loop output was one of these: ls, <ls>, ls->*. Respective name used in member LOOP AT GROUP was: ls, <ls>, ls. This is not what I expected when INTO REFERENCE was used. I first wrote LOOP AT GROUP ls->* and this gave syntax error.
No comments:
Post a Comment