‎2011 Sep 14 8:48 AM
Hii All,
If there is no record in report then i have make a error message of TYPE 'I'. It is working fine.
But i want to return on the same screen(Selection Screen) when this error is through.
For ex- If i am execute Tcode ZSBR, if there is no records for the selection then after through a error like "No records found for the selection", it should be return at ZSBR.
I am trying to use "LEAVE to list-processing and return to screen 0, Leave Program etc.", but still not done. It shows output screen (field catalog) after through this error .
Nitin
‎2011 Sep 14 8:59 AM
Hi,
The problem lies in message type , information message does not stop user to going to next screen , that is why it is showing the field catalog not the selection screen, you can use error message as display like I and after that use leave list-processing.Hope it will solve your problem.
Regards.
Saptarshi Srakar.
‎2011 Sep 14 8:59 AM
Hi,
The problem lies in message type , information message does not stop user to going to next screen , that is why it is showing the field catalog not the selection screen, you can use error message as display like I and after that use leave list-processing.Hope it will solve your problem.
Regards.
Saptarshi Srakar.
‎2011 Sep 14 9:11 AM
I am using all type of messages like
I-Information
A-Abend
S-Status
E-Error
W-Warning
X-Exit
but it is not working as per the requirement ...
‎2011 Sep 14 9:20 AM
It should be LEAVE LIST-PROCESSING & not LEAVE TO LIST-PROCESSING.
MESSAGE 'No records found' TYPE 'I'. LEAVE LIST-PROCESSING.BR,
Suhas
‎2011 Sep 14 8:59 AM
Use EXIT Statement after MESSAGE.
MESSAGE i000 WITH 'No Data Found'.
EXIT.
Edited by: Leena.Patil on Sep 14, 2011 10:06 AM
‎2011 Sep 14 9:07 AM
‎2011 Sep 14 9:09 AM
if you want to return to the selection screen of the program then you can directly use Leave to screen 1000.
‎2011 Sep 14 9:12 AM
Nitin,
It's working for me! Have you used it like this:
IF gt_output IS INITIAL.
MESSAGE i000 WITH 'NO Data'.
EXIT.
ELSE.
*===Display ALV Output
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
ENDIF.
‎2011 Sep 14 9:49 AM
put all the perfroms inside the sy-subrc check of the main query. if it fails show message. and that message will be shown in the selection screen itself.
this will work