Update main branch for ABAP Cloud only

This commit is contained in:
danrega
2023-08-30 14:00:40 +02:00
parent 842cb03da1
commit 51f5bac672
83 changed files with 1814 additions and 1657 deletions

View File

@@ -13,26 +13,26 @@
* - Open the class with the ABAP development tools for Eclipse (ADT).
* - Choose F9 to run the class.
* - Check the console output.
* - To understand the context and the ABAP syntax used, refer to the
* notes included in the class as comments or refer to the respective
* - To understand the context and the ABAP syntax used, refer to the
* notes included in the class as comments or refer to the respective
* topic in the ABAP Keyword Documentation.
* - Due to the amount of console output, the examples contain numbers
* (e.g. 1) ..., 2) ..., 3) ...) for the individual example sections.
* Also, the variable name is displayed in most cases. So to find
* the relevant output in the console easier and faster, just search
* for the number/variable name in the console (CTRL+F in the console)
* - Due to the amount of console output, the examples contain numbers
* (e.g. 1) ..., 2) ..., 3) ...) for the individual example sections.
* Also, the variable name is displayed in most cases. So to find
* the relevant output in the console easier and faster, just search
* for the number/variable name in the console (CTRL+F in the console)
* or use the debugger.
*
* ----------------------------- NOTE -----------------------------------
* The code presented in this class is intended only to support the ABAP
* cheat sheets. It is not intended for direct use in a production system
* environment. The code examples in the ABAP cheat sheets are primarily
* intended to provide a better explanation and visualization of the
* syntax and semantics of ABAP statements, not to solve concrete
* programming tasks. For production application programs, you should
* always work out your own solution for each individual case. There is
* no guarantee for the correctness or completeness of the code.
* Furthermore, there is no legal responsibility or liability for any
* environment. The code examples in the ABAP cheat sheets are primarily
* intended to provide a better explanation and visualization of the
* syntax and semantics of ABAP statements, not to solve concrete
* programming tasks. For production application programs, you should
* always work out your own solution for each individual case. There is
* no guarantee for the correctness or completeness of the code.
* Furthermore, there is no legal responsibility or liability for any
* errors or their consequences that may occur when using the the example
* code.
*
@@ -108,7 +108,41 @@ protected section.
ENDCLASS.
CLASS zcl_demo_abap_structures IMPLEMENTATION.
CLASS ZCL_DEMO_ABAP_STRUCTURES IMPLEMENTATION.
METHOD class_constructor.
initialize_dbtabs( ).
fill_deep_structures( ).
"Filling demo database tables.
zcl_demo_abap_flight_tables=>fill_dbtabs( ).
ENDMETHOD.
METHOD fill_deep_structures.
"Clearing all content of gs_deep2
CLEAR gs_deep2.
"Filling nested tables in deep structures
gs_deep2-substruc = VALUE #( comp1 = `aaa`
comp2 = `bbb`
comp3 = `ccc` ).
gs_deep1-itab = VALUE #(
( col1 = 111 col2 = 222 )
( col1 = 333 col2 = 444
) ).
gs_deep2-itab = VALUE #(
( col2 = 1 col3 = 2 col4 = 3 )
( col2 = 4 col3 = 5 col4 = 6 )
( col2 = 7 col3 = 8 col4 = 9 )
).
"Filling individual component that is not shared by both structures
gs_deep2-comp4 = 999.
ENDMETHOD.
METHOD if_oo_adt_classrun~main.
@@ -1116,40 +1150,12 @@ CLASS zcl_demo_abap_structures IMPLEMENTATION.
ENDMETHOD.
METHOD class_constructor.
initialize_dbtabs( ).
fill_deep_structures( ).
"Filling demo database tables.
zcl_demo_abap_flight_tables=>fill_dbtabs( ).
ENDMETHOD.
METHOD fill_deep_structures.
"Clearing all content of gs_deep2
CLEAR gs_deep2.
"Filling nested tables in deep structures
gs_deep2-substruc = VALUE #( comp1 = `aaa`
comp2 = `bbb`
comp3 = `ccc` ).
gs_deep1-itab = VALUE #(
( col1 = 111 col2 = 222 )
( col1 = 333 col2 = 444
) ).
gs_deep2-itab = VALUE #(
( col2 = 1 col3 = 2 col4 = 3 )
( col2 = 4 col3 = 5 col4 = 6 )
( col2 = 7 col3 = 8 col4 = 9 )
).
"Filling individual component that is not shared by both structures
gs_deep2-comp4 = 999.
ENDMETHOD.
METHOD initialize_dbtabs.
DELETE FROM zdemo_abap_tab1.
ENDMETHOD.
METHOD select_from_dbtab.
SELECT FROM zdemo_abap_tab1
@@ -1159,4 +1165,4 @@ CLASS zcl_demo_abap_structures IMPLEMENTATION.
INTO TABLE @gt_tab.
ENDMETHOD.
ENDCLASS.
ENDCLASS.