Skip to content

Commit ec4740a

Browse files
committed
bug: handle typeless structure creation error
1 parent 86cdc32 commit ec4740a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/core/zcl_text2tab_parser.clas.abap

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,13 @@ CLASS ZCL_TEXT2TAB_PARSER IMPLEMENTATION.
924924
append ls_comp to lt_components.
925925
endloop.
926926

927-
ld_struc = cl_abap_structdescr=>create( lt_components ).
928-
e_container = zcl_text2tab_utils=>create_standard_table_of( ld_struc ).
927+
data lx_type type ref to cx_sy_struct_creation.
928+
try.
929+
ld_struc = cl_abap_structdescr=>create( lt_components ).
930+
e_container = zcl_text2tab_utils=>create_standard_table_of( ld_struc ).
931+
catch cx_sy_struct_creation into lx_type.
932+
raise_error( i_msg = 'Error creating receiving typeless structure' ). "#EC NOTEXT
933+
endtry.
929934

930935
" parse remaining data into the structure
931936
field-symbols <tab> type any.

0 commit comments

Comments
 (0)