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

Selecting Row in Table Control

Former Member
0 Likes
3,292

i have two table controls in my screen, one up TC-1 and another down TC-2,

i want that if i select any row in the TC-1 then on the basis of the selected row the data will be shown in TC-2, i am able to do that if i select row in TC-1 and then press ENTER, but without pressing enter it doesn't refresh my TC-2....

wat shud be done....

abhishek suppal

1 ACCEPTED SOLUTION
Read only

Former Member
1,111

Hi,

You could you double click ! which F-Key of the status is F2...

This will fire the PAI...

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,111

I would suggest instead of using the standard table control row selection in TC1, maybe u could use a pushbutton in the row of the table control. You can assign a function code to this pushbutton, and this will fire your code to fill TC1.

Regards,

Rich Heilman

Read only

Former Member
1,112

Hi,

You could you double click ! which F-Key of the status is F2...

This will fire the PAI...

Read only

0 Likes
1,111

can't i do it on single click or while selecting a row, i want it on line selection which event is fired while selecting the row...

abhishek suppal

Read only

0 Likes
1,111

Hi

As first field of your table control, you should insert a field as pushbutton instead of selection field.

If you give a code like this SELE% as functional code, at runtime the system replace the number of the row at %, so if user push the pushbotton of third row, the functional code'll be SELE3.

Now when user push the button the PAI is fired, so you can find out the row from OK_CODE:

DATA READ_INDEX TYPE SY-TABIX,

SELE_INDEX TYPE SY-TABIX.

IF OK_CODE(4) = 'SELE'.

MOVE OK_CODE+4 TO SELE_INDEX.

READ_INDEX = TABLECONTROL1-TOP_LINE + SELE_INDEX - 1.

......

Now READ_INDEX is number of selected record in ITAB1 that'll be moved to ITAB2.

Max

Message was edited by: max bianchi

Read only

0 Likes
1,111

Thanx MAX

Read only

0 Likes
1,111

Max i am able to solve this but there is one problem highlighting of row is not possible means one cannot know which row is selected....i ahve tried this for highlighting but no....

abhishek suppal

Read only

Former Member
0 Likes
1,111

Hi

I think it depen on what you really want to do.

Becausae if you want to allow a single selection, you should insert a pushbutton instead of selection field.

But if you want to allow a multiply selection this solution isn't good and I think there is only one solution: before user selects the rows and after push enter.

Max

Read only

Former Member
0 Likes
1,111

Hi Abhishek,

I have the same requirement. Can you please put your code.

Thanks,

Das