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

Need to modify Internal table from table control (screen)

Former Member
0 Likes
2,100

Hi,

I have some data in ITAB.

This data , I am displaying in a scree-table control.

In the screen, I am changing some fileds.

When I press SAVE, I need to modify the ITAB with values from the Table Control.

Can U plz write the solutions?

Thanks

Hi,

I have some data in ITAB.

This data , I am displaying in a scree-table control.

In the screen, I am changing some fileds.

When I press SAVE, I need to modify the ITAB with values from the Table Control.

Can U plz write the solutions?

Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
1,021

If you used the wizard to create the table control, then all is taken care of (and you don't need to press SAVE).

Read only

Former Member
0 Likes
1,021

Hello,

Take a look on this: [Table Control|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e]

Regards.

Read only

Former Member
0 Likes
1,021

Hi,

You write a module in PAI.

Inside the module:

loop at your itab into wa..

wa-contains modified values..

modify itab from wa transporting fields...

Regards..

Read only

Former Member
0 Likes
1,021

hi narendra,

this code helps you.

loop at itab.

move-corresponding itab to dbtab.

modify dbtab.

endloop.

thanks

Sachin

Read only

Former Member
0 Likes
1,021

Write this code

PROCESS AFTER INPUT.

Loop at table_control.

MODULE UPDATE_DATA.

endloop.

MODULE UPDATE_DATA INPUT.

MODIFY itab INDEX table_control-current_line.

ENDMODULE.

This will update your internal table with the table control contents whenever the PAI gets triggered.