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

Regarding Error Message after execution of program !!

Former Member
0 Likes
2,565

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,582

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.

8 REPLIES 8
Read only

Former Member
0 Likes
1,583

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.

Read only

0 Likes
1,582

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 ...

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,582

It should be LEAVE LIST-PROCESSING & not LEAVE TO LIST-PROCESSING.

MESSAGE 'No records found' TYPE 'I'. LEAVE LIST-PROCESSING.

BR,

Suhas

Read only

Former Member
0 Likes
1,582

Use EXIT Statement after MESSAGE.

MESSAGE i000 WITH 'No Data Found'.

EXIT.

Edited by: Leena.Patil on Sep 14, 2011 10:06 AM

Read only

0 Likes
1,582

Exit is not working, it will show the blank output..

Read only

0 Likes
1,582

if you want to return to the selection screen of the program then you can directly use Leave to screen 1000.

Read only

0 Likes
1,582

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.

Read only

jayakumarkb_81
Participant
0 Likes
1,582

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