Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

exit and to back to selection screen

in a routine please advise how do i display an error message and go back to the selection screen????


start of selection
perform f_select

perform f_ALV

form f_select
select from table 

if sy-subrc NE 0
// if i put error message it will exit the program but i want to return to selection screen as well

// i trigger an error message and use EXIT but it continue to the program it only exit the routine
 
endif
endform


endofselectin

Tags:
Former Member
Former Member replied

Hi,

When you want to give your error message, do it as follows.

MESSAGE (msgnumber) TYPE S.

LEAVE TO LIST-PROCESSING.

The message type needs to be status message.

This would give a message, plus this would take you back to the selection screen.

Best Regards,

Ram.

Edited by: ram Kumar on Sep 9, 2008 9:04 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question