Application Development and Automation 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: 
Read only

Read tables inside Internal table at Runtime

Former Member
0 Likes
474

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

1 REPLY 1
Read only

Former Member
0 Likes
380

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