SAP Workflow - My First Workflow _ SCN

Download SAP Workflow - My First Workflow _ SCN

Post on 04-Jan-2016

15 views

Category:

Documents

2 download

Embed Size (px)

DESCRIPTION

WF

TRANSCRIPT

<ul><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 1/13</p><p>GettingStarted Newsletters Store </p><p>Products Services&amp;Support AboutSCN Downloads</p><p>Industries Training&amp;Education Partnership DeveloperCenter</p><p>LinesofBusiness UniversityAlliances Events&amp;Webinars Innovation</p><p>LogOn JoinUsHi,Guest SearchtheCommunity</p><p>Activity Communications Actions</p><p>Browse</p><p>1 Tweet 1</p><p>createdbyVikasGautamon26Nov201210:19,lastmodifiedbyVikasGautamon05Dec201207:38</p><p>WorkflowWorkflowisatoolfortheautomationofthebusinessprocess,consistingofsequenceofsteps,tasksorevent.Onesimilarexampletoworkflowistheautomatedlinesinthemanufacturingindustrywithstationpointsorloadingpoints.Youcanarrangeandmanagethedependencyoftasks.UserscanbesentnotificationforthetaskwaitingintheSAPinboxforapprovaloraction.Userscanbeinformedofmilestonesintheprocess.Byautomatingtheprocess,youfreetheusersfromhavingtoknowwhattodowhen.Workitemsaresenttotheparticipantsnotifyingthemofwhattheyhavetodo,andasingleclickonthenotificationcallsthecorrecttransactionandnavigatestotherelevantscreen.WebFlowistheinternetfunctionalityofSAPBusinessWorkflow.Components:OrganizationalPlan:tomanagethehierarchyofreportingandmessageflowWorkflowBuilder:TogeneratetheWorkflow.TheWorkflowBuilderprovidesagraphicalviewoftheworkflowdefinition.EventsBusinessWorkplace:SAPInboxRoleResolutionComponents </p><p>OrganizationalPlan OrganizationalUnit(afunctionalunitinyourenterprise)</p><p>Position(Representsapost)</p><p>Job(classificationsoffunctionsinanenterprise)</p><p>StaffAssignments/AssignmentofUserids</p><p>StandardTask Task(Adescriptionofanactivity)</p><p>WorkflowBuilder Overview</p><p>Steptypes</p><p>Tasks</p><p>Messages</p><p>Events TriggeringEvents</p><p>TerminatingEvents</p><p>Example:Thescenariostartswhenanemployeefillsoutarequestforleave.Thefilledoutformisthenautomaticallysenttothatemployeessupervisor.Ifthesupervisorrejectstheapplication,theemployeeisinformedandaskedtodecidewhetherhe/shewantstoresubmittheapplicationorwithdrawitcompletely.Iftheemployeedecidestorevisetheapplication,theformisforwardedtohis/herinboxforresubmit.Ifthesupervisorapprovestherequest,theemployeeisinformedandtheworkflowcanend.</p><p>Steps:</p><p>SAPWorkflowmyfirstworkflow</p><p>Share 2Like</p><p>Version2</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 2/13</p><p>1.DefineOrganizationPlan(TcodePPOCE)2.CreateWorkflowtemplate:(TcodePFTC_INS)tocreateabasictemplateofworkflow,(TcodeSWDD)tobuildtheworkflowintheworkflowbuilder3.Define1sttask(TcodePFTC_INS)(Createnotificationofabsence)4.Addactivity&gt;firsttaskintheworkflow5.1stTestinSAPInbox(TcodeSBWP)6.Define2ndtask(Checknotificationofabsence)7.Addactivity&gt;secondtaskinworkflow8.2ndTest9.IntegrateUserDecisionforResubmit10.3rdTest11.Define3rdtask(Revisenotificationofabsence)12.Addactivity&gt;thirdtasktotheworkflow13.Add4thCustomerTask(SendNotificationforapprovalofleave)Steps:Step1:DefineOrganizationPlanorOrgn.Unit(TcodePPOCE)</p><p>Step2:a:CreateWorkflowTemplate(TcodePFTC_INS)</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 3/13</p><p>UsingTcodePFTC_INSyoucancreateworkflowtemplateandtasksalso.ThistakeyoutotheTask:Maintain.IntheTasktypefield,choosetheWorkflowtemplateforWorkflowTemplate.ForCreatingtasks:ChooseStandardTaskintheTasktypefield.Step2:b:ViewtheworkflowinTcodeSWDD(WorkflowBuilder)</p><p>Inthemiddlewehaveoverviewgraphic/flowchart.Andontherightsideonthebottomwehavevarioussmallbuttons/iconscalledsteptypes.Thiswecandraganddropandinsertintoourworflow.Wewillbeusingthe</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 4/13</p><p>firststeptypewhichislikethe playbuttoncalledactivityforourStep3:CreateNotificationofAbsence.Step3:Define1sttask(Createnotificationofabsence)GototheTcodePFTC_INS:Tasks:MaintainChooseStandardTaskintheTasktypefield.GivethefollowingvaluesandSavethetask.OnsavingitwillgiveacodeId:like99500654Name:Form_createdAbbr:create_formWorkItemText:vik_notif_absencecreateObjectType:FORMABSENCMethod:CREATECheckboxSynchronousobjectmethod,Objectmethodwithdialogchecked.Step4:Addactivity&gt;firsttaskinworkflow</p><p>AddtheStep:Activitytoyourworkflow. inplaceofundefinedstep.</p><p>WehavecreatedTaskTS99500654separatelyusingPFTC_INS.</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 5/13</p><p>NotethecheckboxAdvancewithImmediatedialog.Thismeansthattheworkitemoftheworkflowismadeavailableforprocessingimmediately.Theuserwhostartstheworkflowisalsooneoftherecipientsofthisfirstworkitem.Thisisthecaseherebecauseyouenteredthecontainerelement_WF_Initiatorastheagentinthestepdefinition.NotetheBindingbutton.Thebinding_WI_ObjectId&gt;&amp;ABSENCEFORM&amp;hasbeenautomaticallydefinedherebythesystem.Thisbindingensuresthatthereferencetothenotificationofabsencecreatedisnotonlyknowninthistask,butalsointheworkflow.NowtheWorkflowBuilderscreenlookslike</p><p>Step5:1stTestinSAPInbox(TcodeSBWP)WhentheworkflowrunsitcreatesworkitemswhicharelikeemailsintheSAPInbox.Whenitisexecuteditcallstherespectivetaskortransactionscreenwiththecorrectdata.Executeyourworkflow:Thenotificationofabsenceformisdisplayed.</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 6/13</p><p>DonotmakeanyentriesanddoNotSave.Instead,chooseCancel.Youhavenowstartedtheworkflowbutcanceledtheprocessingofitsfirststep.</p><p>Yourworkflowinboxnowcontainsoneworkitemforprocessing.Thisistheworkitemforcreatinganotificationofabsence,theprocessingofwhichyoucanceledpreviously.Youhavetoselectyourworkitemwiththesubjectastheworkitemtextyouhavegiven.Selecttheworkitem,andchooseexecute(F8).YoureturntotheCreatenotificationofabsencescreenwherethenotificationofabsenceformisdisplayed.FillouttheformandchooseSave.Theworkitemdisappearsfromyourworkflowinbox.</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 7/13</p><p>Step6:Define2ndCustomertask(Checknotificationofabsence)Thisformformabsenccreateyoucreatedbeforewillnowbesenttosupervisorforapprovalusingtheobjectformabsencapproveobject.CreateanothertaskusingPFTC_INS:</p><p>NotethecheckboxConfirmendofprocessing.Step7:Addactivity&gt;secondtaskinworflowIncludeTask:CheckNotificationofAbsenceintheWorkflow.WehaveTaskcodeasTS99500545.Checkthebindingproperties</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 8/13</p><p>WeneedtocreatetheApprovervariableintheworkflowcontainer.(leftsidebottom,youwillseeamenuoptionWorkflowcontainer)Makethefollowingentriesforobject&amp;Approver&amp;:Element:Approver,Name:Approver,Description:Approveroftheabsencerequest,Referencetable:WFSYST,Referencefield:AGENT.andusetheobject&amp;absenceform&amp;alreadythere.ForAgentsChoosePosition.Selectyourpositionbythenameyouhavecreatedintheorganization.Youcannotedowntheidofyourpositionfromyourorganization(TcodePPOCE)asS50001707.(DontprovideSinthetextfield).</p><p>WecanalsoimplementdeadlineinactivitiesusingLatestend,RequestedStart,Lateststart,Requestedend.Fore.g.Ifthesuperiorhasnotmadethedecisionabouttheleaverequest,therequestershouldbenotified.Oncethedeadline(fore.g.latestend)passes,aworkitemformisseddeadlinesappearsinyourBusinessWorkplacenotifyingyouofthemisseddeadline.</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 9/13</p><p>Now,YouwillseethattwobranchesarenowinsertedinyourworkflowdefinitionforthetwomarkedoutcomesApprovedandRejected.Step8:2ndTestChooseexecutetheworkflow.YougotothescreenCreateNotificationofAbsence.Whentheworkflowisstarted,theworkitemforcreatingthenotificationofabsenceisprovidedtoyoudirectlyforprocessing.Thisisbecauseofadvancingwithimmediatedialog.Youwereintroducedtothisinthefirsttest.FillouttheformandchooseSave.YounowgotothescreenofBusinessWorkplace&gt;Inboxthroughtheuseridofsuperior/supervisor(head).Theworkitemsforyoutoprocessaredisplayedwiththeirworkitemtextsandcertainotherattributes.SelectyourworkitemforcheckingthenotificationofabsenceandChooseexecute.Eitherrejectorapprovetherequest.NoticethetwobuttonsApproveandReject.</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 10/13</p><p>Step9:IntegrateUserDecisionforResubmitYoucanseethatcheckNotificationhastwobranchesApproved,Rejected.WewillbeaddingauserdecisiontotheoutcomeRejected.Withtheuserdecision,therequestercandecidetoreviseandresubmittheleaverequestiftheheadofdepartment/supervisorrejectsit.</p><p>Addthesteptype:Userdecisiontotheworkflow.</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 11/13</p><p>Nowyourworkflowlookslike</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 12/13</p><p>Step10:ThirdTestAgainexecuteyourworkflow.FillouttheFormandSaveit.Theworkitemwilldisappearfromyourinbox.Asasuperior:Rejecttheapplication.Iftherequestisnotapproved,thenextstepintheworkflowdefinitionistheuserdecision.Therequester(&amp;WF_INITIATOR&amp;)wasenteredastheagentforthestep.Thedecisionisthereforeofferedtoyouagainastherequester.Therewillbetwooptions:ReviserequestorWithdrawrequest.IfyouchooseReviserequest,thatshouldtakeyoutotheresubmitform.Thatisournextstep.Step11:Define3rdCustomertask(Revisenotificationofabsence)andaddtoundefinedstepatoutcomeReviseaftertheuserdecision.</p><p>UseFORMABSENCUPDATEasobject.Inthebindinggive</p></li><li><p>20/10/2015 SAPWorkflowmyfirstworkflow|SCN</p><p>http://scn.sap.com/docs/DOC33625 13/13</p><p>FollowSCNSiteIndex ContactUs SAPHelpPortalPrivacy TermsofUse LegalDisclosure Copyright</p><p>AverageUserRating</p><p>(8ratings)</p><p>1 Tweet 1</p><p>_WI_Object_IDexpressiongive&amp;_WF_INITIATOR&amp;inthefield.Step13:Add4thCustomerTask(SendNotification)Youhavecreatedacompleteworkflowtemplatewithwhichanotificationofabsencecanbecreated,approvedandrevised.Nowyouwillinsertastepintheworkflowdefinitionthatsendsanotificationtotherequesteraftertherequesthasbeenapproved.ChooseStep"Sendmail".DragittotheUndefinedStepaftertheoutcomeapprovedofthestepChecknotificationofabsence.ChooseRecipienttypeOrganizationalobject,ChooseAgents&gt;ExpressionChoose&amp;_WF_INITIATOR&amp;.Enterthesubject.EnterthemailtextChooseEnter.Youwillbeaskedforthenameandabbreviationofatask.Fillupthefields.Otherfeaturesthatcanbeusedinthisexample:IntegrateStep:Untillooptotheworkflow,AddingContainerOperationswhichsetsthevalueofflag,ModifyCustomerTasks(Confirmendofprocessing),Implementdeadlinesinactivities.OthertypesofsteptypeswhichcanbeusedintheworkflowareActivity,ProcessControl,Condition,Userdecision,Documentfromtemplate,Containeroperation,Eventcreator,Multiplecondition,Fork,Undefinedstep,Loop(Until),Waitstep,Loop(While).Formoreinformation,visitSAPWorkflowhelphomepage.</p><p>30511Views Products:sap_business_workflowTags:sap,workflow</p><p>Share 2Like</p><p>3Comments</p><p>Like(1)</p><p>TiejunCui03Feb201506:29</p><p>ThisisthebestjumpstartmaterialIhaveeverseen!ThanksVikas!</p><p>Like(0)</p><p>VishnuPankajakshan16Mar201512:07</p><p>greatblog</p><p>Like(0)</p><p>KatigiriLinganna29Sep201514:06</p><p>VerygoodforBeginners.</p></li></ul>