‎2008 Oct 26 9:33 AM
Hi,
i use this commend for casting , my question is :
for the same error type like below i need to use the commend (try) once or twice?
lt_comp_tab-name = fld1.
TRY.
lt_comp_tab-type ?= cl_abap_datadescr=>describe_by_data( fld1 ).
CATCH cx_sy_move_cast_error.
APPEND lt_comp.
ENDTRY.
lt_comp_tab-name = fld2.
TRY .
lt_comp_tab-type ?= cl_abap_datadescr=>describe_by_data( fld2 ).
CATCH cx_sy_move_cast_error.
APPEND lt_comp.
ENDTRY.Regards
‎2008 Oct 26 9:44 AM
This should workTry this
loop at lt_comp_tab .
TRY.
lt_comp_tab-type ?= cl_abap_datadescr=>describe_by_data( lt_comp_tab-name ).
CATCH cx_sy_move_cast_error.
APPEND lt_comp.
ENDTRY.
endloop.
‎2008 Oct 26 9:44 AM
This should workTry this
loop at lt_comp_tab .
TRY.
lt_comp_tab-type ?= cl_abap_datadescr=>describe_by_data( lt_comp_tab-name ).
CATCH cx_sy_move_cast_error.
APPEND lt_comp.
ENDTRY.
endloop.