‎2007 Nov 02 6:28 AM
if not lt_sources_invalid[] is initial.
clear: ls_source.
loop at lt_sources_invalid into ls_source.
clear: ls_pto_source.
move-corresponding ls_source to ls_pto_source.
append ls_pto_source to pto_sources_tab_invalid.
clear: ls_source.
endloop.
endif. " invalid sources
‎2007 Nov 02 6:32 AM
Hi
if lt_sources_invalid and pto_sources_tab_invalid tables having the same structure then you can use directly..
pto_sources_tab_invalid[] = lt_sources_invalid[].
‎2007 Nov 02 6:36 AM
it looks ok.....
probably you don't need to mention the clear statement in the loop as the loop will take care of clearing the work area and then populate it with the contents of the next row. may be it makes more sense to use the clear statement after the loop execution is over.
if not lt_sources_invalid[] is initial.
clear: ls_source.
loop at lt_sources_invalid into ls_source.
clear: ls_pto_source.
move-corresponding ls_source to ls_pto_source.
append ls_pto_source to pto_sources_tab_invalid.
endloop.
clear: ls_source.
endif. " invalid sources