@@ -4,7 +4,7 @@ CLASS cl_run DEFINITION PUBLIC FINAL CREATE PUBLIC.
44 IMPORTING
55 main_object_type TYPE string
66 sub_object_type TYPE string
7- format_version TYPE string
7+ format_version TYPE i
88 RETURNING
99 VALUE (result ) TYPE string .
1010ENDCLASS .
@@ -19,6 +19,7 @@ CLASS cl_run IMPLEMENTATION.
1919 DATA schema_id TYPE string .
2020 DATA ref TYPE REF TO data .
2121 FIELD-SYMBOLS <row> LIKE LINE OF string_tab.
22+ FIELD-SYMBOLS <ref> TYPE any .
2223
2324 schema_id = | https://github.com/SAP/abap-file-formats/blob/main/file-formats/{ to_lower( main_object_type ) } /{ to_lower( sub_object_type ) } -v{ format_version } .json| .
2425 type_name = to_upper ( | ZIF_AFF_{ sub_object_type } _V{ format_version } =>TY_MAIN| ).
@@ -34,7 +35,8 @@ CLASS cl_run IMPLEMENTATION.
3435 EXPORTING
3536 writer = writer.
3637
37- string_tab = generator->zif_aff_generator~generate_type( ref->* ).
38+ ASSIGN ref->* TO <ref> .
39+ string_tab = generator->zif_aff_generator~generate_type( <ref> ).
3840
3941* workaround for transpiler/JS keywords
4042 LOOP AT string_tab ASSIGNING <row> .
@@ -43,7 +45,7 @@ CLASS cl_run IMPLEMENTATION.
4345 ENDIF .
4446 ENDLOOP .
4547
46- CONCATENATE LINES OF string_tab INTO result SEPARATED BY | \n | .
48+ CONCATENATE LINES OF string_tab INTO result SEPARATED BY cl_abap_char_utilities=>newline .
4749 ENDMETHOD .
4850
4951ENDCLASS .
0 commit comments