2007 Dec 09 6:15 PM
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.
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
2007 Dec 09 6:24 PM
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
2007 Dec 09 6:46 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |