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

replicating

Former Member
0 Likes
320

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

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
301
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.
1 REPLY 1
Read only

former_member156446
Active Contributor
0 Likes
302
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.