带参数的方法(导入更改导出)
类实施:
CLASS lcl_abap_class DEFINITION.
PRIVATE SECTION.
METHODS method1 IMPORTING iv_string TYPE string
CHANGING cv_string TYPE string
EXPORTING ev_string TYPE string.
ENDCLASS.
CLASS lcl_abap_class IMPLEMENTATION.
METHOD method1.
cv_string = iv_string.
ev_string = 'example'.
ENDMETHOD.
ENDCLASS.
方法调用示例:
method1 (
EXPORTING iv_string = lv_string
IMPORTING ev_string = lv_string2
CHANGING cv_string = lv_string3
).