‎2007 Jan 09 10:01 PM
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
‎2007 Jan 09 10:05 PM
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
‎2007 Jan 10 3:09 PM