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: 

table control

Former Member
0 Kudos

hi,

i have an issue

i have created a table-control in module programming with four columns.

correspondigly i have four text fields in the same screen.

Now if i select a line(row) from the table control

and press a button (say a pushbutton which i created),

i need the data of the selected line (in table control) to appear in the corresponding text fields.

How should i do that.

pls help me.

Deepak

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Say your internal table on the control is I_TAB and control name is myControl. The statement will be as following.

read table I_TAB into w_TAB index myControl-current_line.

W_TAB will have the data of the selected line.

4 REPLIES 4

Former Member
0 Kudos

Say your internal table on the control is I_TAB and control name is myControl. The statement will be as following.

read table I_TAB into w_TAB index myControl-current_line.

W_TAB will have the data of the selected line.

Former Member
0 Kudos

In the PAI of the screen, check for the record selected. For this you need to have W/sel column checkbox selected in the table control properties and assign a field. This will be set to 'X' when you select the record.

In PAI loop at table control and select the record with this field = 'X'. This is the record user has selected in the table control.

Assign the values to respective 4 fields.

Former Member
0 Kudos

Hi,

I suppose that when you push the pushbutton you use a user-command. There you must check in the table control which is the selected line ( I suppose you have a flag to know the selected line). You can read table i_control with key flag = 'X' for example. And then when you have in the header line of i_control de data, you can put them into the text fields.

Regards.

Mireia

Former Member
0 Kudos

see example prg

DEMO_DYNPRO_TABCONT_LOOP

DEMO_DYNPRO_TABCONT_LOOP_AT