You are on page 1of 4

2/11/2016

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

SharathPanuganti Mar13,20093:47PM (inresponsetoCharlesKennedySchulzOliveira)

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)

CharlesKennedySchulzOliveira Feb29,20121:34PM (inresponsetoSharathPanuganti)

Re:Backtoselectionscreenaftererror
HiSharath,

Yoursolutionworked.ButIusedSTOPintheplaceofEXIT,becausetheresotherformbeing
calledafterthefirst.

Thankyou.

Like(0)

AleksandraPatrzalek Dec29,20155:15PM (inresponsetoSharathPanuganti)

Re:Backtoselectionscreenaftererror
Thanks@

SharathPanuganti.Thatworked!ItoothinkweshoulduseSTOPinsteadofEXIT

likeothershavementioned....EXITshouldbeusedforexitingloopsonly.

Like(0)

JacobMammen Mar13,20093:46PM (inresponsetoCharlesKennedySchulzOliveira)

Re:Backtoselectionscreenaftererror
try
MessageSXXXdisplaylike'E'.
Exit.

Mathews

Like(0)

MeesalaRajaramana Mar13,20093:55PM (inresponsetoCharlesKennedySchulzOliveira)

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)

GurpreetSingh Mar13,20094:10PM (inresponsetoCharlesKennedySchulzOliveira)

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)

NarendranMuthukumaran Mar13,20094:09PM (inresponsetoCharlesKennedySchulzOliveira)

Re:Backtoselectionscreenaftererror
Hi,

Trythis..

MESSAGEI208(00)WITH'NODATAFOUND'.
LEAVELISTPROCESSING.

Thanks
Naren

Like(0)

JumpJeelani Mar13,20094:18PM (inresponsetoCharlesKennedySchulzOliveira)

Re:Backtoselectionscreenaftererror
izitsupposedtobeerrormessage?ifitcanbeinformativewhensometHingfailedandgobackto
selectionscreen

Trythis:

IFSYSUBRC=0.
messagei<id>with'NODATAFOUND'.
EXIT.
ENDIF.

Editedby:BrightSideonMar13,20093:17PM

Like(0)

NarendranMuthukumaran Mar13,20096:26PM (inresponsetoCharlesKennedySchulzOliveira)

Re:Backtoselectionscreenaftererror
Hi,

Thestopwillworkaslongasyoudon'thaveENDOFSELECTION...

https://scn.sap.com/thread/1270341

3/4

2/11/2016

Backtoselectionscreenaftererror|SCN
IfyouhaveENDOFSELECTIONevent...thenthestopwillgotothatevent...

Thanks
Naren

Like(1)

CharlesKennedySchulzOliveira Mar13,20097:41PM (inresponsetoNarendranMuthukumaran)

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

You might also like