‎2008 Jun 12 9:01 AM
Hi All,
I want to insert data in table using table control.But I am not able to get that data from table control into internal table.
can anybody tell me how to go about it?
Thanks,
Tanisha
‎2008 Jun 12 9:04 AM
‎2008 Jun 12 9:16 AM
Hello Tanisha,
In order to get data from internal to table control we make use of PBO loop and endloop.
In order to get data from tablecontrol to internal table we make use of PAI loop and endloop.
so to solve ur problem
write the corresponding module between loop endloop in PAI.
ex: PAI
loop
module modulename.
endloop.
Rgds.,
subash
‎2008 Jun 12 9:49 AM
Hi,
u need to make one module in PAI between LOOP ENDLOOP
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
LOOP AT i_mat.
CHAIN.
FIELD i_mat-matnr.
FIELD i_mat-meins.
MODULE tab1_modify ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE tab1_modify INPUT.
APPEND i_mat.
ENDMODULE.
here i_mat is my internal table name.
reward if usefull...
‎2008 Jun 12 1:08 PM
Hi,
Have you created the Table control using a Wizard? Then in the PAI Event you can see that the data will be automatically be getting populated.
Else you need to write a loop statement in the PAI event. Then automatically the transfer of data will happen. This will happend only after user triggers a User Command.
Have a look at the code and see which ever is applicable.
Hope this will help.
Regards,
Samantak.
Rewards points for useful answers.