Professional Documents
Culture Documents
Welcome,Guest
Login
Register
Store
SearchtheCommunity
Products
Services&Support
AboutSCN
Downloads
Industries
Training&Education
Partnership
DeveloperCenter
LinesofBusiness
UniversityAlliances
Events&Webinars
Innovation
WorkflowScenario
CreatedbyKanikaChopra,lastmodifiedbyGuestonFeb25,2009
1.INTRODUCTIONTOWORKFLOWSCENARIO
ThisscenarioisbasedonPurchaseOrderChange.ThisscenariowillprovehelpfultoallthosepeoplewhoareabsolutelynewtoWORKFLOWSinSAP.
Thereare4conditionstobefollowedinthisscenario.
Condition1:TheworkflowshouldtriggeronPOchange.
Condition2:ThePOtypeshouldbeNB<standardtype>.
Condition3:IfthePOchangerandthePOcreatoraredifferentthen,sendamailtoPOcreatorwiththesubjectlineasfollows:<POnumber>ischangedby<POchanger>
Condition4:IfthePOcreatordoesnotcheckthemailin10minutes,sendaReminderMail.Aspertheveryfirstcondition,theworkflowshouldtriggeronPOchangethatiswheneveraPOischanged
thisWorkflowshouldtriggerautomatically.Asperthesecondcondition,thePOthatischangedshouldalwaysbeNBtype.OnanyotherkindofPOchange,thisWorkflowshouldnottrigger.Asperthethird
condition,whosoeverchangesthePO,ifitisnottheonewhohascreatedit,amailshouldgotothePOcreatortoinformhimthathisthisPOnumberischanged.Asperthefourthcondition,ifthePO
creatordoesnotcheckstheoriginalmail,aremindermailshouldgotohimafter10minutes,informinghimaboutthestatusoftheearliermail.
Therearesometransactionsthatneedtobeusedandareasfollows:
2.TRANSACTIONSTOBEUSEDSWDDWorkflowDefinition
(heretheworkflowcreationwilltakeplace)
SBWPSAPInbox
(herewecancheckboththemailandtheremindermail)
ME22NPurchaseOrderChange
(thisisusedtochangethepurchaseorder)
PFTCTaskMaintenance
(herewecreateatask)
SWO1ObjectBuilder
(transactionusedtocreate,displayandmodifybusinessobjects)
Forabeginner,thefollowingconceptsusedinthisscenariowillprovehelpful.StartConditionDeadlineMonitoringStepTypes<Condition,Activity,Mail>
3.THESTEPBYSTEPPROCEDURE:
TheWorkflowisactuallybuiltinSWDDtransactioncalledTheWorkflowBuilder.WhenweopenSWDDtherecentlyusedworkflowopensup,existingworkflow.
Clickthecreatebuttonandyouwillseeanewworkflow.
3.1Create2containerelementsintheWorkflowcontainer,sincethevaluesneedtobetransferredintothosecontainerelements.DoubleclickontheWorkflowContainerWindowandcreate.Thedata
transfertakesplacefromevent>workflow>task>method.
3.1.1Createthefirstcontainerelementascreator14ofthetypeWorkflowInitiatorwithtablenameasWFSYSTandfieldnameasINITIATOR.
GotothePropertiesTabandintheparametersettingschecktheImportcheckboxforboththecontainerelements.
3.1.2CreateanothercontainerelementofBORtypeandnameitasBUS2012andusingBusinessObject<BO>2012.BOBUS2012isusedforPurchaseOrder.
3.2ClickontheHAT,inthelefttopofscreen,knownastheStartCondition.
3.2.1Thetabwithbasicdataopensup.EntertheWorkflownameandWorkflowDescriptionandchangethereleasestatustoReleased.
ClickontheStartEventstabherewewillgiveourstartconditions.
3.2.2GivethecategoryasBO...objecttypeasBUS2012andeventasChanged.<BecauseWFshouldtriggeronPOchange>.
Nowpressactiveandclick,theActivebuttongoesGREEN.
3.2.3NowclicktheBindingbutton.DragandDroptheelementsfromthecontainerandequatethem.Click""andthebindingbuttongoesGREEN.
3.2.4NowclicktheConditionTab.HerewehavetospecifytheconditionofPOtypeshouldbeNB...NBtypePO'sarestandardPO.Clickthe_EVT_OBJECT
ClickonthePurchasingDocTypecontainerElementandequateittoNB.WewillgetaconditioninthelastRectangularWindow.
Click""andthiscompletestheStartoftheCondition..!!
NowSAVEandgoback.Theworkflownowshouldlooklikethis.
3.3Nowdoubleclickontheundefinedstep,createaConditionstepsincewehavetoputaconditionofcheckingwherecreatorandchangerarenotequal/equal.Creator14willcontainthevalueof
onewhohascreatedthatPOand_Wf_InitiatorwillcontainthevalueoftheonewhohaschangedthatPO.
Clickon"Clickheretocreatenewcondition"andgivethefollowingcondition.
Click""andthefollowingscreenappears.
Click""andthefollowingscreenappear.
NOWIFBOTH<creatorandchanger>ARESAME,WEDON'THAVETODOANYTHING.BUTIFBOTHAREDIFFERENTWEHAVETOSENDAMAILWITHDEADLINEMONITORINGOF10
MINS.
3.4Gotothat"botharedifferentline"andthencreateanACTIVITY.
Thescreenasksforatask,wehavetocreateanewtasknow.
3.4.1GototransactionPFTC,selectSTANDARDTASKfromtasktype.
Clickoncreateandthefollowingscreenappears.
3.4.1.1Fillinthefollowingdetailsandsavethetask.HereABBRisthenameofthetask.NAMEisthedescriptionofthetask.RELEASESTATUSshouldalwaysbereleasedsothatwecanusethetask
afterreleasingonly.WORKITEMTEXTwillactasthesubjectlineoftask,aswehavetosendamailwiththisdescriptionasthesubjectline.TheOBJECTCATEGORY/METHOD/TYPEaretheonesthat
wehavealreadyused.
3.4.1.2ClicktheBindingButtonandpressTransfer,andwiththatAutomaticbindingwilltakeplace.AfterthatthebindingwillshowGreen.
Afterthatthetaskwillbecreated.NowsimplywehavetousethistasknameinthatactivityandthenpressEnter.YouwillseesomebuttonsgoingGREEN.Nowassigntheagents.Selecttheoptionuser
andgivetheservernameofthecreator.Sincetherecipientofthemailisthecreator.Thescreenappearslikethis.
3.4.2NowclickstheLATESTENDtabforDEADLINEMONITORINGof10minutesandinsertthefollowingvalues.
Click""andGobacktothemainscreen.
3.5NowontheRemindermailbranchcreateaSENDMAIL<remindermail>steptype.
NowInsertthefollowingvaluesintheMailStepType.InABBRandNAMEgiveanyZnameofyourchoice.
NowClick""andthescreenappearslikethis.
Nowthescenarioportioniscompleteasofnow.Thethingisthatwehavetocompletetheworkflowaftersendingaremindermail.
3.6ForthatweuseaStepTypecalledasPROCESSCONTROL.Afterthesendmailactivitycreatetheprocesscontrolsteptypetoendtheworkflow.
Nowinsertthefollowingvaluesintheprocesscontrol.
4.0THECOMPLETEWORKFLOWSCENARIOISLIKETHIS..
NowoncetheWORKFLOWiscomplete,SAVE&ACTIVATEtheworkflow.Removeallerrorsandwarnings.Itshouldactivatewith0errorsand0warnings..!!
5.0NOWCOMESTHECONCEPTOFHOWTOCHECKTHEFOLLOWING
1>HOWTOTRIGGERTHEWORKFLOW?2>HOWTOCHANGETHEPURCHASEORDER?3>HOWTOCHECKFORTHEEVENTTRACE?4>WHERETOCHECKWHETHERWORKFLOW
HASSTARTEDORNOT?5>WHERETOCHECKFORTHEACTUALMAILANDTHEREMINDERMAIL?
5.1NowgototransactionSWE4EVENTTRACESWITCHON/OFF.ClickonSWITCHON.
5.2NowgototransactionME22NTheTransactionforPOChange.ChooseastandardPO<NBType>.Changeanyvalue,likeQuantity,descriptionandsimplySavethePO.
5.3NowgotoTransactionSWELDISPLAYEVENTTRACE.ClickEXECUTE.
NowwecanseeheretheBOusedisshownandtheWorkflowsthatareassociatedwithitarealsothere.Thestatusofworkflowisalsoshownwithbeingactive/error.TheDateandTimeofthe
Workflowsisalsoshown.
Nowweknowthatourworkflowhastriggered,thatmeansourpurchaseorderhaschangedandthePOisofNBtype.Nowtheissueisthatwehavetocheckwhetherthepersonwhohascreatedor
changedthePOaresameordifferent.Iftheyaredifferent,weshouldgetamail.Forthiswhatwehavedoneearlieristhat,ontheserverwhichweareworking,wehavecreatedthe2users.Oneuseris
tocreatethePOandotherusertochangethePO.Sothattheybothcanbedifferentandwecangetamail.Anotherthingthatwecandoisthatgototheconditionsteptypeandchangetheconditionfrom
equaltonotequal,andusethesameserverwithoutanyuser.Thiswillbesimplyforcheckingifotherusersonserverarenotavailable,asthisisnotthecorrectmethod.
5.4.1NowwemovetoTransactionSBWPSAPINBOX.ClickOUTBOXandClickSTARTEDWORKFLOWS.TherewecanseeourWorkflowbeingstarted.
5.4.2NowgotoINBOX>WORKFLOWS,hereyoucanseeyourmailbeingsentasanactivitytothePOCreator.
DonotdoubleclickonthisactivityanddonotConfirmWorkItem.AsdoingthiswouldmeanPOcreatorhascheckedthemailandthereisnoneedofremindermail.
IncaseifYOUchoosetoclickCompleteWorkItem,Thiswouldremovetheactivityfromtheworkflowsandhence,noremindermailwouldbethere.
5.4.3TocheckfortheReminderMail,waitfor10minutes.GotoINBOX>UNREADDOCUMENTS.HerewecanseetheRemindermail.
HerewefindthatourWorkflowScenarioiscomplete.
Nolabels
1ChildPage
BriefOverviewofWorkflowStepTypes
6Comments
LucaCandiano
HiKanika,
Ifollowedyourhelpfulwikibuti'mhavingissueduringthecheckphase.IcreatedaPOwithuserXthenIchangedthePOwithuserY,buttheworkflowstatesthatcreatorandinitiatorarethe
sameusersonomessageistriggered.
Luca
MukeshKumar
HiLuca,Thatsbecauseinstep3.2.3,EVT_CREATORismappedtoboththeWORKFLOW_INITIATORandCREATOR14makingthemsameuser.ThePOcreatorshouldhavebeen
mappedtoCREATOR14actually.Regards.
SantoshSharma
Nicedocument..
Thanks
SantoshSharma
MukeshKumar
Thankyou@KanikaChopra!ItwasexcellentguidetocreatethefirstWorkflow.
RameshBabu
Veryusefuldemo,thankyouKanika
NaveenGrover
DearKanikaMam
InBUS2012ObjectPODoctypeisnotComingwhenUsingItforConditionforStandardPOtypeNB.KindlyHelp
ContactUs
Privacy
SAPHelpPortal
TermsofUse
LegalDisclosure
Copyright
FollowSCN