Application Development 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: 

Accessing data from Table control

Former Member
0 Kudos

Hi,

I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.

Please help me finding out which variable will hold the data entered in table control(dynamically).

5 REPLIES 5

Former Member
0 Kudos

U will have to append data to internal table in PAI

Between(write this code)

LOOP

Modify itab index TC-Current_line.

If sy-subrc ne 0.

append itab.

endif.

ENDLOOP.

now this internal table data can be used to modify

the database table

Former Member
0 Kudos

hi

u need to create a table where all the data entered by u to be stored from that table only u can update the DB tble.

for this purpose u ve to create push button for that

and when save this data will update in one table.

regards

Sachhidananda

0 Kudos

had u putted modify data into pai???

use this code.

LOOP

Modify itab index TC-Current_line.

If sy-subrc ne 0.

append itab.

endif.

ENDLOOP.

Former Member
0 Kudos

Hi Sachhidananda,

i created a push button and i had the table.

But the thing is im unable to access the data which is entered in table control.

Former Member
0 Kudos

hi gautham,

1. While designing set the table control as input field.

2. In ur program create an internal table, with the same structure as your table control.

3. Whenever an entry is made in the table control, modify your internal table.

4. While saving use the internal table data to update the custom table.

If internal table name is same in both screen painter(table control) and in the program then the values will automatically come into the internal table in the program with out programming.

Otherwise we have programtically transfer the values.

In the PAI event using move or move-corresponding statement.

Check the program *RSDEMO02*

check the links

http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/content.htm

Yogesh N