Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

collect

Former Member
0 Likes
680

hi,

is this logic correct?

thanks

sort it_tab by vbeln vgbel vgpos.

loop at it_tab into wa_tab.

move wa_tab-vbeln to wa_report-vbeln_fd.

move wa_tab-vgbel to wa_report-vbeln.

move wa_tab-vgpos to wa_report-posnr.

move wa_tab-matnr to wa_report-matnr.

move wa_tab-charg to wa_report-charg.

move wa_tab-lfimg to wa_report-lfimg.

collect wa_report into it_report.

endloop.

3 REPLIES 3
Read only

Former Member
0 Likes
614

HI EL,

UR CODE IS CORRECT AND IF U STILL WANT TO IMPROVE THE PERFORMANCE THEN MAKE THIS CHANGES.

sort it_tab by vbeln vgbel vgpos.

loop at it_tab into wa_tab.

move wa_tab-vbeln to wa_report-vbeln_fd.

move wa_tab-vgbel to wa_report-vbeln.

move wa_tab-vgpos to wa_report-posnr.

MOVE-CORRESPONDING WA_TAB TO WA_REPORT

collect wa_report into it_report.

endloop.

Read only

0 Likes
614

hi,

thanks

may i know why i need to have move and move-corresponding together?

Read only

0 Likes
614

You dont have to use them together. Basically MOVE-CORRESPONDING takes more time than just MOVE, so it is not recommended.

Hope this helps.