‎2008 Aug 21 6:44 AM
hi friends,
good morning every every one,
i having a problem with internal table
1 st custom table into internal table tt_1st
2nd custom table into internal table tt_2nd
3rd vbak table into internal table tt_3rd for all entries with tt_2nd
where tt_3rd- field1 = tt_1st- field2
tt_3rd-field2 = tt_2nd-field3
tt_3rd-field3 = tt_2nd-field4
3rd internal table have to compare data with 1st internal and 2nd internal table
{ if i use like this the 3rd internal is saying that tt_1st-field doesnot containing the field2 }
how to solve this problem can you please give me the clear description about this,
regards
geetha.
‎2008 Aug 21 6:49 AM
Hi,
1. Select the entries for table3 using table 2
where tt_3rd-field2 = tt_2nd-field3
tt_3rd-field3 = tt_2nd-field4
2. Loop the 3rd internal table and compare with the first internal table 2nd field.
loop at table3 into wa3.
read table table1 into wa1 with key field2 = wa3-fld1.
if sy-subrc ne 0.
delete table3 from wa3.
endif.
endloop.Regards
Kannaiah
‎2008 Aug 21 6:47 AM
Geetha
I think you want to do following as you are using FOR ALL ENTRIES to fill the 3rd table:
Old
where tt_3rd- field1 = tt_1st- field2
New
where tt_3rd- field1 = tt_2nd- field2
Thanks
Amol Lohade
‎2008 Aug 21 6:49 AM
Hi,
1. Select the entries for table3 using table 2
where tt_3rd-field2 = tt_2nd-field3
tt_3rd-field3 = tt_2nd-field4
2. Loop the 3rd internal table and compare with the first internal table 2nd field.
loop at table3 into wa3.
read table table1 into wa1 with key field2 = wa3-fld1.
if sy-subrc ne 0.
delete table3 from wa3.
endif.
endloop.Regards
Kannaiah
‎2008 Aug 21 6:50 AM
Hi, Actually the command :-
tt_3rd- field1 = tt_1st- field2
is incorrect.
Luck,
Bhumika
‎2008 Aug 21 6:52 AM
In your query wrong things is highlighted as below
3rd vbak table into internal table tt_3rd for all entries with tt_2nd
where tt_3rd- field1 = tt_1st- field2
tt_3rd-field2 = tt_2nd-field3
tt_3rd-field3 = tt_2nd-field4
it should be
where tt_3rd- field1 = tt_2nd- field2
tt_3rd-field2 = tt_2nd-field3
tt_3rd-field3 = tt_2nd-field4
rgds
rajesh
‎2008 Aug 21 6:58 AM
Hi Geetha,
Change this where tt_3rd- field1 = tt_1st- field2 condition to tt_3rd-field1 = tt_2nd-field2 , because you are going for FOR ALL ENTRIES on 2nd table.
Regards,
Chandra Sekhar
‎2008 Aug 29 10:41 AM