Update ABAP OO Example

This commit is contained in:
Daniel Reger
2022-12-29 16:06:27 +01:00
parent 56dbd03a3e
commit 9d95ea38e8
4 changed files with 92 additions and 103 deletions

View File

@@ -23,18 +23,21 @@
PUBLIC SECTION.
CLASS-METHODS get_strings RETURNING VALUE(res_string) TYPE string_table.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_DEMO_ABAP_OBJECTS_FRIEND IMPLEMENTATION.
METHOD get_strings.
"Getting the strings and put them in the string table
APPEND zcl_demo_abap_objects=>public_string TO res_string.
APPEND zcl_demo_abap_objects=>protected_string TO res_string.
APPEND zcl_demo_abap_objects=>private_string TO res_string.
ENDMETHOD.
METHOD get_strings.
"Getting the strings and adding them to the string table.
"Accessing an attribute in a public visibility section.
APPEND zcl_demo_abap_objects=>public_string TO res_string.
"Accessing an attribute in a protected visibility section.
APPEND zcl_demo_abap_objects=>protected_string TO res_string.
"Accessing an attribute in a private visibility section.
APPEND zcl_demo_abap_objects=>private_string TO res_string.
ENDMETHOD.
ENDCLASS.