diff --git a/src/zcl_excel_common.clas.abap b/src/zcl_excel_common.clas.abap index 75e8b9e..1fd4ccf 100644 --- a/src/zcl_excel_common.clas.abap +++ b/src/zcl_excel_common.clas.abap @@ -1075,6 +1075,9 @@ CLASS zcl_excel_common IMPLEMENTATION. DESCRIBE FIELD i_source TYPE type_kind. flag_class = boolc( type_kind = cl_abap_typedescr=>typekind_oref ). +* Only borders will be passed as unbound references. + CHECK flag_class = abap_false OR i_source IS NOT INITIAL. " Exit if unbound reference + descr ?= cl_abap_structdescr=>describe_by_data( e_target ). LOOP AT descr->components INTO wa_component. @@ -1086,10 +1089,6 @@ CLASS zcl_excel_common IMPLEMENTATION. IF flag_class = abap_false. * source is a structure - use assign component ASSIGN COMPONENT wa_component-name OF STRUCTURE i_source TO . - ELSEIF i_source IS INITIAL. - CLEAR . - CLEAR WITH abap_true. - CONTINUE. ELSE. * then it is an attribute of the class - use different assign then CONCATENATE 'i_source->' wa_component-name INTO attribute_name. @@ -1130,6 +1129,7 @@ CLASS zcl_excel_common IMPLEMENTATION. DESCRIBE FIELD e_target TYPE type_kind. flag_class = boolc( type_kind = cl_abap_typedescr=>typekind_oref ). + IF flag_class = abap_true AND e_target IS INITIAL. * Only borders will be passed as unbound references. But since we want to set a value we have to create an instance CREATE OBJECT o_border.