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

Selection in table control - Help needed.

former_member191562
Participant
0 Kudos
213

Hi all,

I need to know hoe=w to catch the event of selecting a row in a table control using the selection button which comes at the beginning of every row.

1 ACCEPTED SOLUTION
Read only

former_member191562
Participant
0 Kudos
183

Thank u for ur reply.

I have used the value of that variable for select all and deselect all push button functions,

Those are working fine. All I wanna know is if I select a row using that button, a message should be displayed. Where should I write the code that message display..

I tried writing in PAI. But PAI is not triggered if that selection button alone is clicked.

5 REPLIES 5
Read only

former_member191562
Participant
0 Kudos
183

Hi all,

I need to know how to catch the event of selecting a row in a table control using the selection button which comes at the beginning of every row.

My requirement is like, I have atable control inside my first tab. I can allow the user to traverse to the second tab only after selecting a line. If not we have to display a message asking him to select a line.

Read only

Former Member
0 Kudos
183

Hi

The buttom for the selection is assigned to an input field and its value is equal to X if it's selected else it's blank.

This field can be alone or belong to the internal table with the record displayed in table control

There isn't an event, just only to check the value of the field above:

LOOP AT ITAB WHERE MARK = 'X'.
   EXIT.
ENDLOOP.
IF SY-SUBRC <> 0.
  MESSAGE I208(00) WITH 'Select at least onr row'.
ELSE.
   -------> abap code to go to next screen
ENDIF.

Max

Edited by: max bianchi on Nov 6, 2010 6:37 PM

Read only

former_member191562
Participant
0 Kudos
184

Thank u for ur reply.

I have used the value of that variable for select all and deselect all push button functions,

Those are working fine. All I wanna know is if I select a row using that button, a message should be displayed. Where should I write the code that message display..

I tried writing in PAI. But PAI is not triggered if that selection button alone is clicked.

Read only

0 Kudos
183

Hi

The field for selection is a normal input/output field, so it can't trigger the PAI because the pushbutton or the menu function can triggered it.

So the message can be shown after user presses enter or an other ffunctionality

Max

Read only

former_member191562
Participant
0 Kudos
183

Thanks Max.. My problem is almost solved.