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

plzzz help

Former Member
0 Likes
396

Hiii

i have a table XITAB that can contain 10000 or more record of material.

i have to do a check in table MARA if the record exist and delete all record that doesn't exist from XITAB and for record that doesn't exist i need to put in in another table call e.g. XITAB_ERROR

could someone tell me what is the best performance option to the issue below since there are lots of other processing done in my program.

Hiii

i have a table XITAB that can contain 10000 or more record of material.

i have to do a check in table MARA if the record exist and delete all record that doesn't exist from XITAB and for record that doesn't exist i need to put in in another table call e.g. XITAB_ERROR

could someone tell me what is the best performance option to the issue below since there are lots of other processing done in my program.

2 REPLIES 2
Read only

Former Member
0 Likes
368

Hi,

Do like this

If XITAB[] is not initial.
Select <fields> from MARA into table it_mara for all entries in xitab where matnr = xitab-matnr.
endif.
describe table xitab lines lv_lines.
Loop at xitab into wa.
 cnt = cnt + 1.
 read table it_mara into wa_mara with key matnr = wa-matnr.
 if sy-subrc = 0.
  Move wa entry to XITAB_SUCCESS.
 else.
  Move wa entry to XITAB_ERROR.
  Delete xitab from wa.
 endif.
 if cnt = lv_lines.
  exit.
 endif.
endloop.

Regards,

Satish

Read only

Former Member
0 Likes
368

that i was thniking of doing but instead of puting all correct material from XITAB to table correct. i'll delete it from xitab directly