It has been a few days since my first sincere attempt at touching feet.
After practice of about 4 days (5-10mins per day), I am now able to touch and grab all toe fingers using hands. It was made possible by tips from internet and from my sister who is a yoga athlete. As it turns out, inhale and exhale play a significant role in inching forward.Learn. Share. Contribute.
Thursday, December 28, 2017
Table Comprehension Example Like Nested Loop
DATA lt TYPE TABLE OF i.
DO 10 TIMES.
APPEND sy-index TO lt.
ENDDO.
"loop at itab into wa. fill wa2 using wa and append lt2, all this using
DATA lt2 TYPE TABLE OF i.
lt2 = VALUE #( FOR lv IN lt ( lv * lv ) ).
"nested loop of lt and lt2 to create lines of lt3
DATA lt3 TYPE TABLE OF i.
lt3 = VALUE #( FOR lv IN lt FOR lv2 IN lt2 ( lv + lv2 ) ).
cl_demo_output=>display( lt3 ).
DO 10 TIMES.
APPEND sy-index TO lt.
ENDDO.
"loop at itab into wa. fill wa2 using wa and append lt2, all this using
DATA lt2 TYPE TABLE OF i.
lt2 = VALUE #( FOR lv IN lt ( lv * lv ) ).
"nested loop of lt and lt2 to create lines of lt3
DATA lt3 TYPE TABLE OF i.
lt3 = VALUE #( FOR lv IN lt FOR lv2 IN lt2 ( lv + lv2 ) ).
cl_demo_output=>display( lt3 ).
Table Comprehension Example
Below snippet is populating itab lt2 whose every line is related to that of itab lt.
DATA lt TYPE TABLE OF i.
DO 10 TIMES.
APPEND sy-index TO lt.
ENDDO.
"loop at itab into wa. fill wa2 using wa and append lt2, all this using table expression
DATA lt2 TYPE TABLE OF i.
lt2 = VALUE #( FOR lv IN lt ( lv * lv ) ).
cl_demo_output=>display( lt2 ).
DATA lt TYPE TABLE OF i.
DO 10 TIMES.
APPEND sy-index TO lt.
ENDDO.
"loop at itab into wa. fill wa2 using wa and append lt2, all this using table expression
DATA lt2 TYPE TABLE OF i.
lt2 = VALUE #( FOR lv IN lt ( lv * lv ) ).
cl_demo_output=>display( lt2 ).
Explore More Loop Group
I skimmed through below blogs and it is now clear that my previous posts on loop groups are just scratching the surface.
https://blogs.sap.com/2016/06/23/group-by-for-internal-tables-step-by-stepc/
https://blogs.sap.com/2014/10/02/abap-news-for-740-sp08-grouping-internal-tables/
https://blogs.sap.com/2016/06/23/group-by-for-internal-tables-step-by-stepc/
https://blogs.sap.com/2014/10/02/abap-news-for-740-sp08-grouping-internal-tables/
Rewriting DEMO_LOOP_AT_GROUP_SYNTAX For Practice
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.
Friday, December 22, 2017
Touching Feet
Today I made a sincere effort to touch my own feet (yogasana) and failed. An article on internet was discussing the benefits of being flexible. It may reduce the impact of fall or injury because the muscles would need to bend/stretch more before tearing. The strategy of touching feet is to actually try touching it regularly and also some other exercises that focus of parts of it. All in all, it involves calf, hamstring, lower back etc. I hope that blogging about this would help not forget the goal.
This is one small fitness step just like numerous other failed attempts before. In case things get rolling, I would move on to other asanas.
For every such move, I would first be able to do it for fraction of second, then comes reps and last comes holds.
Grouping Internal Tables Rows In Loop
Demo program DEMO_LOOP_AT_GROUP_SYNTAX and respective documentation show 6 syntaxes in which grouping is done.
https://help.sap.com/doc/abapdocu_740_index_htm/7.40/en-US/abenloop_at_group_abexa.htm
First three group loops have representative binding and next three group loops have group key binding which is more explicit in nature.
While looping, result can be put into data, field-symbol or data reference. All are covered in example.
Subscribe to:
Comments (Atom)
Blog Archive
-
▼
2017
(26)
-
▼
Dec
(19)
- Touching Feet - Update
- Table Comprehension Example Like Nested Loop
- Table Comprehension Example
- Explore More Loop Group
- Rewriting DEMO_LOOP_AT_GROUP_SYNTAX For Practice
- Touching Feet
- Grouping Internal Tables Rows In Loop
- Incorrect Hyperlink in SAP Keyword Documentation
- Table Expression Default Value
- Short Form for Structured Row Types
- VALUE Internal Table "LINES OF" Line_spec
- Using BASE In VALUE, NEW & CORRESPONDING
- REDUCE Operator Example
- Incorrect Sample Code In BOOLX Documentation
- Boolean Data Type in XML JSON ABAP
- XSDBOOL BOOLC SPACE & INITIAL
- Removed Malware From Intex Aqua
- Chained Methods and Method Chaining
- Sales Order Item Billing Plan Change
-
▼
Dec
(19)