‎2009 Mar 25 8:12 PM
Hi,
is there a way to do following.
relating to a header_id in a table I have to replicate all the records which have the same id.
Suppose: There are four different tables. You have records related to the this headerid.
And now the requirement is find out all the records in those tables which belong
to the hederid. And finally replicate them by pasisng a new id
Table 1
HeaderID = 12345
LVORM = any value
STOFF = any value
SPART = any value
Table 2
HeaderID = 12345
BLANZ = any value
Table 3
HeaderID = 12345
ERSDA = any value
ERNAM = any value
LAEDA = any value
Table 4
HeaderID = 12345
GEWEI = any value
VOLUM = any value
VOLEH = any value
BEHVO = any value
RAUBE = any value
Regards
sas erdem
‎2009 Mar 25 8:15 PM
loop at table1.
read table table2 into wa_table2 with key headerid = table1-headerid
if sy-subrc eq 0.
can do your processing for wa_table2 here
read table table3 into wa_table3 with key headerid = table1-headerid
if sy-subrc eq 0.
can do your processing for wa_table3 here
>>keep going and replace the values..
endif.
endif.
endloop.
‎2009 Mar 25 8:15 PM
loop at table1.
read table table2 into wa_table2 with key headerid = table1-headerid
if sy-subrc eq 0.
can do your processing for wa_table2 here
read table table3 into wa_table3 with key headerid = table1-headerid
if sy-subrc eq 0.
can do your processing for wa_table3 here
>>keep going and replace the values..
endif.
endif.
endloop.