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 row selection

Former Member
0 Kudos

HI all,

I have the problem writing code for the following logic.

I populated the internal table data into the table control in the second screen but

i dont want to populate the 3rd screen without selecting the row of table control.

but the same logic is taking for the 3rd screen without selecting the row of table control for user-defined buttons.

i tried to put the warning message but its still going to 3rd screen .

how can i stop processing further if user don't select any row in table control?

i would like to give an error and stay in the same screen so that he has to select a row in table control for further processing...

Please help me ASAP.

Thanks,,

Madhu

2 REPLIES 2

Former Member
0 Kudos

Hi,

If the user didn't select any thing..Just say leave screen..

Example

-


MODULE USER_COMMAND.

CASE SY-UCOMM.

WHEN 'REQUEST FOR THIRD SCREEN'.

  • ASSUMING SELECTED IS THE COLUMN FOR THE TABLE CONTROL SELECTION ROW

  • SELECTION.

READ TABLE ITAB_TC WITH KEY SELECTED = 'X'.

IF SY-SUBRC <> 0.

MESSAGE S208(00) WITH 'SELECT ATLEAST ONE ROW'.

LEAVE SCREEN.

ELSE.

CALL SCREEN '0300'.

ENDIF.

ENDCASE.

ENDMODULE

Thanks,

Naren

Former Member
0 Kudos

Thanks Naren,

appreciate ur help....