‎2008 Feb 21 8:53 PM
I am trying to fetch data from table1 and based on the entries I get from first select qry, I am fetching the records from the another table2
Code :
TYPES: BEGIN of tag,
data_field type c,
END of tag.
DATA: my_tab type table of tag.
SELECT fild FROM table1 INTO TABLE my_tab .
SELECT xyz FROM table2 .............WHERE xyz IN my_tab
I am getting the error as "the tag structure of the table "my_tab" is incorrect. " in the last SELECT statement.
What is an error in above code ?
Can we specify "IN" with an internal table or do we need to have the subquery with "IN" ?
‎2008 Feb 21 8:57 PM
Hi,
In this case you need to use for all entries in.
If you want to use IN than the internal table is to have specific structure with sign option low and high.
Best regards,
Wojciech
‎2008 Feb 21 8:57 PM
Hi,
In this case you need to use for all entries in.
If you want to use IN than the internal table is to have specific structure with sign option low and high.
Best regards,
Wojciech
‎2008 Feb 22 2:24 PM
Hi,
Use the following statement:
select xyz from table2 into table it_tab for all the entries in my_tab where xyz = my_tab-fild.
This above statement will work only if field 'fild' of table 'my_tab' is same as that of 'xyz' of table2.
Please reward points if helpful.