2007 Jun 01 6:47 AM
Hi Guys!
I have an internal table which holds many table at runtime. The table names are coming from table TMC1T. so the structure of the internal table is :
Language Table Short text
E KOTI001 Material
E KOTI002 .............................................
Now at runtime, i am getting these tables into the internal table. I need to get inside each KOTI001 ,KOTI002 tables and search for a material number. Hw can i do that? Is there a function module to get the data for these tables inside the Itab for dynamically reading them?
Please let me know. Its Urgent....Useful answers will be rewarded!
Thanks,
San
Hi.
Do you know the field of every table in which the material number is located?
If so you can do like this (assuming the field is MATNR)
LOOP AT t_internal.
SELECT SINGLE FROM (t_internal-table)
INTO <wherever>
WHERE MATNR EQ searched_matnr.
ENDLOOP.If the field is different for every table u can use
CONCATENATE t_internal-field 'EQ' searched_matnr
INTO where_clause SEPARATED BY SPACE.
and call the SELECT statement with a dynamic where clause
WHERE (where_clause).
Regards,
Timo
2007 Jun 01 8:56 AM
Hi.
Do you know the field of every table in which the material number is located?
If so you can do like this (assuming the field is MATNR)
LOOP AT t_internal.
SELECT SINGLE FROM (t_internal-table)
INTO <wherever>
WHERE MATNR EQ searched_matnr.
ENDLOOP.If the field is different for every table u can use
CONCATENATE t_internal-field 'EQ' searched_matnr
INTO where_clause SEPARATED BY SPACE.
and call the SELECT statement with a dynamic where clause
WHERE (where_clause).
Regards,
Timo
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |