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

@@ -49,13 +49,13 @@
*
* 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.
*
@@ -90,12 +90,16 @@ protected section.
ENDCLASS.
CLASS zcl_demo_abap_rap_ext_num_u IMPLEMENTATION.
CLASS ZCL_DEMO_ABAP_RAP_EXT_NUM_U IMPLEMENTATION.
METHOD class_constructor.
initialize_dbtabs( ).
ENDMETHOD.
METHOD extract_from_failed.
CLEAR errors.
@@ -983,95 +987,93 @@ CLASS zcl_demo_abap_rap_ext_num_u IMPLEMENTATION.
* Excursion: Read and read-by-association operation using dynamic
* EML statements
*
* Notes:
* - If the parameter for FULL is not flagged, only the association
* links are returned. The parameter for RESULT will be empty.
* - Remove the commented out section if you are at least on ABAP
* version 756 in your on-premise system.
* Note:
* If the parameter for FULL is not flagged, only the association
* links are returned. The parameter for RESULT will be empty.
**********************************************************************
* output->next_section( `12) Excursion: Read and read-by-association ` &&
* `operations using dynamic EML` ).
*
* DATA:
* op_tab TYPE abp_behv_retrievals_tab,
* read_dyn TYPE TABLE FOR READ IMPORT zdemo_abap_rap_ro_u,
* read_dyn_result TYPE TABLE FOR READ RESULT zdemo_abap_rap_ro_u,
* rba_dyn TYPE TABLE FOR READ IMPORT
* zdemo_abap_rap_ro_u\_child,
* rba_dyn_result TYPE TABLE FOR READ RESULT
* zdemo_abap_rap_ro_u\_child,
* rba_dyn_link TYPE TABLE FOR READ LINK zdemo_abap_rap_ro_u\_child.
*
* read_dyn = VALUE #(
* ( %key-key_field = 1
* %control = VALUE #(
* field1 = if_abap_behv=>mk-on
* field2 = if_abap_behv=>mk-on
* field3 = if_abap_behv=>mk-on
* field4 = if_abap_behv=>mk-on ) )
* ( %key-key_field = 2
* %control = VALUE #(
* field1 = if_abap_behv=>mk-on
* field2 = if_abap_behv=>mk-on
* field3 = if_abap_behv=>mk-on
* field4 = if_abap_behv=>mk-on ) ) ).
*
* rba_dyn = VALUE #(
* ( %key-key_field = 1
* %control = VALUE #(
* key_ch = if_abap_behv=>mk-on
* field_ch1 = if_abap_behv=>mk-on
* field_ch2 = if_abap_behv=>mk-on ) )
* ( %key-key_field = 2
* %control = VALUE #(
* key_ch = if_abap_behv=>mk-on
* field_ch1 = if_abap_behv=>mk-on
* field_ch2 = if_abap_behv=>mk-on ) ) ).
*
* output->display( `Result if FULL parameter is ` &&
* `not flagged for RBA` ).
*
* op_tab = VALUE #(
* ( op = if_abap_behv=>op-r-read
* entity_name = 'ZDEMO_ABAP_RAP_RO_U'
* instances = REF #( read_dyn )
* results = REF #( read_dyn_result ) )
* ( op = if_abap_behv=>op-r-read_ba
* entity_name = 'ZDEMO_ABAP_RAP_RO_U'
* sub_name = '_CHILD'
* full = abap_false
* instances = REF #( rba_dyn )
* results = REF #( rba_dyn_result )
* links = REF #( rba_dyn_link ) ) ).
*
* READ ENTITIES OPERATIONS op_tab.
*
* output->display( input = read_dyn_result name = `read_dyn_result` ).
* output->display( input = rba_dyn_result name = `rba_dyn_result` ).
* output->display( input = rba_dyn_link name = `rba_dyn_link` ).
*
* output->display( `Result if FULL parameter is ` &&
* `flagged for RBA` ).
*
* op_tab = VALUE #(
* ( op = if_abap_behv=>op-r-read
* entity_name = 'ZDEMO_ABAP_RAP_RO_U'
* instances = REF #( read_dyn )
* results = REF #( read_dyn_result ) )
* ( op = if_abap_behv=>op-r-read_ba
* entity_name = 'ZDEMO_ABAP_RAP_RO_U'
* sub_name = '_CHILD'
* full = abap_true
* instances = REF #( rba_dyn )
* results = REF #( rba_dyn_result )
* links = REF #( rba_dyn_link ) ) ).
*
* READ ENTITIES OPERATIONS op_tab.
*
* output->display( input = read_dyn_result name = `read_dyn_result` ).
* output->display( input = rba_dyn_result name = `rba_dyn_result` ).
* output->display( input = rba_dyn_link name = `rba_dyn_link` ).
output->next_section( `12) Excursion: Read and read-by-association ` &&
`operations using dynamic EML` ).
DATA:
op_tab TYPE abp_behv_retrievals_tab,
read_dyn TYPE TABLE FOR READ IMPORT zdemo_abap_rap_ro_u,
read_dyn_result TYPE TABLE FOR READ RESULT zdemo_abap_rap_ro_u,
rba_dyn TYPE TABLE FOR READ IMPORT
zdemo_abap_rap_ro_u\_child,
rba_dyn_result TYPE TABLE FOR READ RESULT
zdemo_abap_rap_ro_u\_child,
rba_dyn_link TYPE TABLE FOR READ LINK zdemo_abap_rap_ro_u\_child.
read_dyn = VALUE #(
( %key-key_field = 1
%control = VALUE #(
field1 = if_abap_behv=>mk-on
field2 = if_abap_behv=>mk-on
field3 = if_abap_behv=>mk-on
field4 = if_abap_behv=>mk-on ) )
( %key-key_field = 2
%control = VALUE #(
field1 = if_abap_behv=>mk-on
field2 = if_abap_behv=>mk-on
field3 = if_abap_behv=>mk-on
field4 = if_abap_behv=>mk-on ) ) ).
rba_dyn = VALUE #(
( %key-key_field = 1
%control = VALUE #(
key_ch = if_abap_behv=>mk-on
field_ch1 = if_abap_behv=>mk-on
field_ch2 = if_abap_behv=>mk-on ) )
( %key-key_field = 2
%control = VALUE #(
key_ch = if_abap_behv=>mk-on
field_ch1 = if_abap_behv=>mk-on
field_ch2 = if_abap_behv=>mk-on ) ) ).
output->display( `Result if FULL parameter is ` &&
`not flagged for RBA` ).
op_tab = VALUE #(
( op = if_abap_behv=>op-r-read
entity_name = 'ZDEMO_ABAP_RAP_RO_U'
instances = REF #( read_dyn )
results = REF #( read_dyn_result ) )
( op = if_abap_behv=>op-r-read_ba
entity_name = 'ZDEMO_ABAP_RAP_RO_U'
sub_name = '_CHILD'
full = abap_false
instances = REF #( rba_dyn )
results = REF #( rba_dyn_result )
links = REF #( rba_dyn_link ) ) ).
READ ENTITIES OPERATIONS op_tab.
output->display( input = read_dyn_result name = `read_dyn_result` ).
output->display( input = rba_dyn_result name = `rba_dyn_result` ).
output->display( input = rba_dyn_link name = `rba_dyn_link` ).
output->display( `Result if FULL parameter is ` &&
`flagged for RBA` ).
op_tab = VALUE #(
( op = if_abap_behv=>op-r-read
entity_name = 'ZDEMO_ABAP_RAP_RO_U'
instances = REF #( read_dyn )
results = REF #( read_dyn_result ) )
( op = if_abap_behv=>op-r-read_ba
entity_name = 'ZDEMO_ABAP_RAP_RO_U'
sub_name = '_CHILD'
full = abap_true
instances = REF #( rba_dyn )
results = REF #( rba_dyn_result )
links = REF #( rba_dyn_link ) ) ).
READ ENTITIES OPERATIONS op_tab.
output->display( input = read_dyn_result name = `read_dyn_result` ).
output->display( input = rba_dyn_result name = `rba_dyn_result` ).
output->display( input = rba_dyn_link name = `rba_dyn_link` ).
ENDMETHOD.