Professional Documents
Culture Documents
Backtoselectionscreenaftererror|SCN
GettingStarted Newsletters
Hi,Guest
LogOn
JoinUs
Store
SearchtheCommunity
Products
Services&Support
AboutSCN
Downloads
Industries
Training&Education
Partnership
DeveloperCenter
Activity
LinesofBusiness
UniversityAlliances
Events&Webinars
Innovation
Browse
Communications
Actions
10Replies Latestreply:Dec29,20155:15PMbyAleksandraPatrzalek
Share
Tweet
Like
CharlesKennedySchulzOliveira
Feb29,20121:34PM
Backtoselectionscreenaftererror
ThisquestionhasbeenAnswered.
HelloABAPers,
Ihaveaexecutableprogram(REPORT)todosomeprocessing(e.g.readastandardtablewiththe
parametersandselectoptionsandsavethedatainaZtable).
Whenoccursanerror(e.g.whensysubrc<>0afterselect)andamessageoftypeEisshowed,the
programshowthemessageina"clean"screenwithtitleSAP.Then,afterENTERorESC,itleavesto
initialscreenofSAP(SAPEasyAccess).
ThemessageoftypeEistriggeredfromaroutine(FORM)calledfromSTARTOFSELECTIONevent.
Andtheprogramdontwritenothinginlist(onlyreturnastatusmessageifeverithingisok).
HowcanIforcetheprogramtobacktoselectionscreenaftersomeerror?
Thanksinadvance.
Bestregards,
CharlesOliveira
CorrectAnswer
bySharathPanugantionMar13,20093:47PM
hi,
Dothefollowingforyourrequirement.
inthemessagegivethefollowing
startofselection.
Perform<routine>.
.
.
.
.
.
.
Form<routine>.
if<condition>.
message'xxxx'type'S'displaylike'E'.
exit.
endif.
endform.
Thiswaythecontrolreturnstoselectionscreenevenafterthemessageistriggered.
Thanks
Sharath
HelpfulAnswerbyMeesalaRajaramana
2597Views
AverageUserRating
(1rating)
https://scn.sap.com/thread/1270341
1/4
2/11/2016
Backtoselectionscreenaftererror|SCN
CorrectAnswer Re:Backtoselectionscreenaftererror
hi,
Dothefollowingforyourrequirement.
inthemessagegivethefollowing
startofselection.
Perform<routine>.
.
.
.
.
.
.
Form<routine>.
if<condition>.
message'xxxx'type'S'displaylike'E'.
exit.
endif.
endform.
Thiswaythecontrolreturnstoselectionscreenevenafterthemessageistriggered.
Thanks
Sharath
Like(1)
Re:Backtoselectionscreenaftererror
HiSharath,
Yoursolutionworked.ButIusedSTOPintheplaceofEXIT,becausetheresotherformbeing
calledafterthefirst.
Thankyou.
Like(0)
Re:Backtoselectionscreenaftererror
Thanks@
SharathPanuganti.Thatworked!ItoothinkweshoulduseSTOPinsteadofEXIT
likeothershavementioned....EXITshouldbeusedforexitingloopsonly.
Like(0)
Re:Backtoselectionscreenaftererror
try
MessageSXXXdisplaylike'E'.
Exit.
Mathews
Like(0)
HelpfulAnswer Re:Backtoselectionscreenaftererror
HI,
insteadof'exit'use'stop'.
https://scn.sap.com/thread/1270341
2/4
2/11/2016
Backtoselectionscreenaftererror|SCN
if<condition>.
message'xxxx'type'S'displaylike'E'.
STOP.
endif.
Like(0)
Re:Backtoselectionscreenaftererror
STARTOFSELECTION.
IF<LOGICALEXP>.
Message'XXX'TYPE'S'DisplayLike'E'.
LeaveLISTPROCESSING.
ENDIF.
OR
STARTOFSELECTION.
IF<LOGICALEXP>.
Message'XXX'TYPE'S'DisplayLike'E'.
EXIT.
ENDIF.
Regards,
Gurpreet
Like(0)
Re:Backtoselectionscreenaftererror
Hi,
Trythis..
MESSAGEI208(00)WITH'NODATAFOUND'.
LEAVELISTPROCESSING.
Thanks
Naren
Like(0)
Re:Backtoselectionscreenaftererror
izitsupposedtobeerrormessage?ifitcanbeinformativewhensometHingfailedandgobackto
selectionscreen
Trythis:
IFSYSUBRC=0.
messagei<id>with'NODATAFOUND'.
EXIT.
ENDIF.
Editedby:BrightSideonMar13,20093:17PM
Like(0)
Re:Backtoselectionscreenaftererror
Hi,
Thestopwillworkaslongasyoudon'thaveENDOFSELECTION...
https://scn.sap.com/thread/1270341
3/4
2/11/2016
Backtoselectionscreenaftererror|SCN
IfyouhaveENDOFSELECTIONevent...thenthestopwillgotothatevent...
Thanks
Naren
Like(1)
Re:Backtoselectionscreenaftererror
Yeah,Iknowthat.
Thankyouanyway.
Like(0)
Share
SiteIndex
Privacy
Tweet
ContactUs
TermsofUse
https://scn.sap.com/thread/1270341
Like
SAPHelpPortal
LegalDisclosure
Copyright
FollowSCN
4/4