2007 Dec 24 11:41 AM
hi,
is it possible to move and delete with a single keyword?
can show me the correct syntax.
loop at itab
if not itab-fieldX is initial.
move the record to another internal table.
delete this record from itab.
endif.
endloop.
thanks
hi,
is it possible to move and delete with a single keyword?
can show me the correct syntax.
loop at itab
if not itab-fieldX is initial.
move the record to another internal table.
delete this record from itab.
endif.
endloop.
thanks
2007 Dec 24 11:47 AM
Hi,
You change the code as below :
loop at itab
if not itab-fieldX is initial.
move the itab to another_internal_table.
delete itab.
append another_internal_table.
clear another_internal_table
clear itab.
endif.
endloop.
Thanks,
Sriram Ponna.
2007 Dec 24 11:47 AM
itab2[] = itab1[]
all data will be populated to itab2 from itab1.
refresh itab. or clear itab[] deletes all value from itab.
Reward if useful
Regards
ANUPAM
2007 Dec 24 11:54 AM
hi,
I could not get your requirement properly.
But for moving data to another internal table.
for MOVE.
here, let wa_matnr1 be the work area for it_mara1 and wa_matnr2 be work area of it_mara2.
then,
move: wa_matnr1-matnr to wa_matnr2-matnr.
append wa_matnr2 to it_mara2.
if it_mara1 and it_mara2 dont have workarea then,
move: it_mara1-matnr to it_mara2-matnr.
append: it_mara2.
for DELETE.
let it_mara be the internal table which has unique field called MATNR where wa_mara is the work area for it_mara.
DELETE TABLE it_mara WITH TABLE KEY matnr = wa_mara-matnr.
if it_mara has no work area but only header line then,
DELETE TABLE it_mara WITH TABLE KEY matnr = it_mara-matnr.
hope this helps.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |