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

Inserting data in DB table using table control

Former Member
0 Likes
632

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

4 REPLIES 4
Read only

Former Member
0 Likes
585

Refer to the below related threads...

Regards,

Santosh

Read only

Former Member
0 Likes
585

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

Read only

Former Member
0 Likes
585

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...

Read only

Former Member
0 Likes
585

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.