Application Development 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: 

having a problem with internal table

Former Member
0 Kudos
79

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
59

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

6 REPLIES 6

Former Member
0 Kudos
59

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

Former Member
0 Kudos
60

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

Former Member
0 Kudos
59

Hi, Actually the command :-

tt_3rd- field1 = tt_1st- field2

is incorrect.

Luck,

Bhumika

Former Member
0 Kudos
59

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

Former Member
0 Kudos
59

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

Former Member
0 Kudos
59

vg