10-07-2008 2:21 PM
hi experts
i want to use an error message if an error has occured and that after a the message the report will stop and will return to the selection screen.
how can i do that.
thanks
amit
10-07-2008 2:25 PM
MESSAGE E001(00) WITH 'This is an error'.
Or you can use Statement as well.
STOP.
-Aman
10-07-2008 2:25 PM
MESSAGE E001(00) WITH 'This is an error'.
Or you can use Statement as well.
STOP.
-Aman
10-07-2008 2:27 PM
Hi
for example
PARAMETERS : p_upload TYPE rlgrap-filename.
AT SELECTION-SCREEN.
IF p_upload IS INITIAL .
MESSAGE text-018 TYPE 'E'.
LEAVE TO SCREEN 1000. " you can use leave to list-processing here as well
ENDIF.
Regards
10-07-2008 2:28 PM
Hi,
You can do something like this :
"Select data from tables etc..
IF NOT SY-SUBRC IS INITIAL.
MESSAGE Snnn. " Give a success message here
" Check if the program was called from
IF NOT SY-CALLD IS INITIAL.
LEAVE.
ELSE.
LEAVE TO TRANSACTION SY-TCODE.
ENDIF.
The only problem here is that you will have to assign a transaction code for your program.
Hope this helps.
regards,
Advait
10-07-2008 2:43 PM