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

ITAB extension?

Former Member
0 Likes
487

Hi all,

I have an itab and filled it with necessary data and displayed it.

What my requirement is that for example when user entered 5 different werks (plant) to select data, I need to show the stock status of these werks...

And it is not predictable how many werks she will enter to select, it may be 3 or 5 or even more.

How can I arrange my itab to show these info?

Thanks.

deniz.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
444

You need to use dynamic internal table for this. please search in this forum with key work " dynamic internal table ", you can find lot of thread related to that.

a®

Read only

Former Member
0 Likes
444

Take the werke/plants the person has selected, i.e. 3 out of 5, and save it one range table (itab with values). Use this itab to form an outer loop.

In the inner loop use the itab with all master data and extension WHERE

and form a condition like: WHERE [inner_loop_wa]-WERK EQ [outer_loop_wa]-WERK.

i.e.:

LOOP AT werk_selection_itab INTO werk_selection_wa.

LOOP AT masterdata_itab INTO masterdata_itab_wa WHERE masterdata_itab_wa-werk EQ werk_selection_wa-werk.

...further processing...

+ ...i.e. COLLECT masterdata_itab_wa INTO result_itab.+

ENDLOOP.

ENDLOOP.

Hope that helps a little.

-Norbert