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

Table as Input parameters to itab

muhammad_sohail
Participant
0 Likes
507

Dear Experts,

I want to pass the table control fields (e.g; process order, qty, shift, date) as input fields to my itab. I have created a table control as my input screen, now i want to pass these values to my itab.

Waiting for your's kind response.

Thanks and Regards,

Sohail

Hi,

If you have created a table control, then in the flow logic you might have defined loops in the PBO and PAI sections.

Now try the below procedure:

MODULE MOD_INPUT INPUT.

WA_ITAB-F1 = WA_SCREEN-F1.

WA_ITAB-F2 = WA_SCREEN-F2.

APPEND WA_ITAB TO IT_ITAB.

ENDMODULE.

2 REPLIES 2
Read only

Former Member
0 Likes
477

hi,

if i have understood you have to declare a control as global variable and than use it into the PBO onf your screen.

Suppose that you have on your screen 100 a table control named TABCNTRL:

...
* global variablies: 

CONTROLS: TABCNTRL TYPE TABLEVIEW USING SCREEN 0200.

* into the PBO of screen 100

  LOOP AT   ITAB " internal table with header line
       WITH CONTROL TABCNTRL
       CURSOR TABCNTRL-CURRENT_LINE.
 
    MODULE  ...
    MODULE ..

  ENDLOOP.

hope this can help you.

Best regards luigi.

Edited by: luigi la motta on May 31, 2010 5:22 PM

Read only

Former Member
0 Likes
477

Hi,

If you have created a table control, then in the flow logic you might have defined loops in the PBO and PAI sections.

Now try the below procedure:

MODULE MOD_INPUT INPUT.

WA_ITAB-F1 = WA_SCREEN-F1.

WA_ITAB-F2 = WA_SCREEN-F2.

APPEND WA_ITAB TO IT_ITAB.

ENDMODULE.