11-15-2007 3:28 AM
Hi,
I have an internal table it with
f1
70
70
70
80
80
80
I have another internal table it1 with the following set of values/
f1 no
70 4.
80 5.
I want values in the first internal table or another internal table in the following format.How to do it.The first field is common in both tables.
f1 no
70 4
70 4
70 4
80 5
80 5
80 5.
Thanks..
11-15-2007 3:35 AM
ITAB1
F1
70
70
70
80
80
80
ITAB2
F1 No
70 4
80 5
loop at ITAB1.
read table ITAB2 with key F1 = ITAB1-F1.
if sy-subrc = 0.
move ITAB2-No to ITAB1-No.
modify ITAB1.
clear : ITAB2.
endif.
clear : ITAB1.
endloop.
Regards
Gopi
11-15-2007 3:33 AM
loop at it1.
read table it2 with key f1 = it1-f1.
if sy-subrc = 0.
it1-no = it2-no.
modify it1.
endif.
endloop.
it will update in it1(same table) which contains the record
f1
70
70
70
80
80
80
regards
shiba dutta
11-15-2007 3:35 AM
data: itab3 like itab2.
loop at itab1 into wa1.
read table itab2 with key f1 = wa1-f1 into wa2.
if sy-subrc = 0.
append wa2 to itab3.
endif.
clear wa2.
endloop.
now in the itab3 the corresponding fields and entries will be there....
Message was edited by:
Muthurajan Ramkumar
11-15-2007 3:35 AM
ITAB1
F1
70
70
70
80
80
80
ITAB2
F1 No
70 4
80 5
loop at ITAB1.
read table ITAB2 with key F1 = ITAB1-F1.
if sy-subrc = 0.
move ITAB2-No to ITAB1-No.
modify ITAB1.
clear : ITAB2.
endif.
clear : ITAB1.
endloop.
Regards
Gopi
11-15-2007 3:35 AM
Hi,
Loop at it1.
read it2 with key field1 = it1-field1
if sy-subrc eq 0.
it1-field2 = it2-field2.
modify it1.
endif.
endloop.
Declare the same field type as there in second internal table in the first internal table.
Please reward suitable answers.
Regards,
Irfan
11-23-2007 8:14 AM
ITAB1
F1
70
70
70
80
80
80
ITAB2
F1 No
70 4
80 5
The third int table
ITAB3
F1 | No
70 |
70
70
80
80
80
" looping the table 1.
loop at ITAB1.
" clear ing header line.
clear itab2.
read table ITAB2 with key F1 = ITAB1-F1.
if sy-subrc = 0.
itab3 -no = itab2-no.
modify itab3 transporting no.
endif.
endloop.
Regards
Siva
Message was edited by:
Sivaprasad ML