Monday, September 10, 2018

SAP Workflow Interview Questions with Answers

Q1. List the various advantages of SAP Business Workflow. 
  • Workflow provides numerous advantages to SAP users and consultants:
  • It allows consultants to create new business processes without modifying the standard SAP code.
  • Workflow ensures that the tasks are executed in the correct sequential order, involving the relevant personnel.
  • SAP Business Workflow may be run through the internet or intranet web applications via the Webflow Engine.
  • Deadline Monitoring functionality is also incorporated within SAP Workflow.
  • The timely execution of activities is guaranteed even when a number of parties (users) are involved.
  • Workflow reduces both time and expense involved in managing business activities.
 Q2. Workflow is not starting. What might be possible reasons and corresponding solution ?
 
 If started by an event:  
 
  • Run SWU_OBUF and check transaction SWU3 for problems .
  •  Check that the linkage between the event and the workflow exists in transaction SWE2 and is activated .
  •  Check transaction SWEL to see if event was created / gets created (may need transaction SWELS to turn SWEL on) .
  • Test if creating the event manually in SWUE triggers the workflow.  
  •  Check if there is a start condition that isn’t being satisfied.
  •  Check if the event is in a queue (if event queueing is turned on, see transaction SWEQADM)
  •  Check WF-BATCH in transaction SU01, see if all is well (e.g. password not expired)
 If started directly (e.g. with function module SAP_WAPI_START_WORKFLOW; not recommended if it can be avoided):
 
  •  Run SWU_OBUF and check SWU3 for problems
  •  Check if workflow has been set to General Task
Q3. What is a work item ? How does it differ from a simple SAP office mail item ?
  •  A work item is a runtime object generated by a step within a workflow. Whenever user interaction is required, the respective users are informed via work items. These work items will be received by the user in their Business Workplace inbox, or other email application such as Microsoft Outlook&rights;
  •  The work item may be a user decision or a dialog form that allow you to enter data for starting a process within SAP, or a confirmation of whether a particular task may be performed. The user then chooses an appropriate option which determines the subsequent behavior of the workflow in question. There are a variety of applicable work items. Each work item has a status reflecting the stage of processing at any given point in time.
  •  A work item comprises of text explaining what action needs to be taken, whom to refer to and any information pertinent to the business object involved.
  •  Unlike simple SAP office mails, work items are active entities, as they determine the subsequent direction of the workflow. SAP office mails can also be deleted from the inbox without viewing them whereas a work item has to be executed to have it removed from your inbox.
 Q4. What is a background work item ? Are they displayed in the Business Workplace ?
  
A background work item (code B) represents tasks that do not require any user interaction. They are controlled and executed automatically by the workflow system, and do not appear in the Business Workplace. However, you may view them using the Work Item Selection Report.
 
Q5. How to achieve dynamic parallel processing?
 
There are three ways a parallel processing can be implemented
Dynamic parallel processing using a multi-line container element Fork (3 out of 5) Work queue  
In dynamic processing the type of each entry in the table have to be of same type.
 Same task will be processed for each line of the multi-line container. It can be a dialog or background task. Deadline monitoring, binding, agent determination will be same for each work item generated To achieve, go to “Miscellaneous” in the activity, and enter the multi line container element.
 
Q6. How can we debug a workflow?
 
  If it is a dialog task, you can set breakpoint in the method called by the task If it is a method that you want to debug, use SWO1, and create a instance of the object and debug the methods. If it is a background task, and you are in development client, you can do the following. Create an infinite loop in the method you want to debug. Go to SM50 (processes overview) and select the relevant item, and select debug from option.
 
 Q7. Is there anyway to undelete work items in SAP workflow after I have logically deleted them already?
 
No. What you can do is restart the workflow using SWUE. This will be the same as recreating the workflow because it will start at the point where it has logically been deleted.
 
Q8. How do you set up a user to receive a pop-up reminder when he/she gets a new WF message?
 
  You can accomplish this by setting up the work item priority to the highest level.
  
Q9. Is it possible to create timed events?
 
  You may consider using deadline monitoring facilities. For example:  
Requested start, requested end; Latest start or latest end on tasks;
 
Q10. What are the different types of WF Agents? 
  • Possible Agents :->Users who are authorized to execute the task Configured during Task definition (Org Unit, Position, User, Work Center, Role, Rule) If a Task is configured as General Task, then all users become possible users.
  •  Responsible Agents : --> The users to whom the work item needs to be sent. This is set during Step definition. Note that Possible agents are defined during Task definition. (Org Unit, Position, User, Work Center, Role, Rule, Container Element).
Note: The work item recipients is determined by intersection of Possible Agents and Responsible Agents.
  • Actual Agents : --> Actual user who executed the dialog task .
  •  Excluded Agents :--> Users who are not supposed to execute the dialog task (even if they are in possible agents)
 Q11. What are Important Tcodes in SAP Workflow ? 
  • SWUS : Workflow Toolbox
  • SWU0 : Simulate Event
  • SWI2_FREQ: Workitems per task
  • SWUE: Event simulate
  • SWELS: Set event log ON
  • SWEHR2: Event linkage in HR
  • SWU3: Workflow customizing
  • SWU_OBUF: Synchronize buffers
  • SWI5: Look into other user’s SBWP
  • SWDD : Workflow builder
  •  SWLD : SAP workflow easy access to all workflow related transactions
  •  SW01 : Maintain Business objects (add new attributes, methods, events etc to standard business objects)
  • SWE2 : Active event linkages, addition options not available by SWDD such as setting check function module .
  • SWWL_TOPLEVEL  : Delete workflow items from SBWP.  
  • SWELLS : Start/ stop event trace
  •  SWEL : View event trace report
  •  SWUD : Workflow diagnosis
  •  SWI2_DIAG  : Troubleshoot workflows in error, restart
  •  SWIA : Workflow administrator
  • SWB_COND : Maintain workflow start condition (has pretty pics but is especially rubbish, everything can be done easier via SWDD
  •  SWNCONFIG : Send emails to user with unread work items
  •  SWEC : Trigger workflow on change doc
  •  SWUY : Workflow wizard for message long text
  •  SBWP : Business workplace
  •  PFTC : Maintain (change, display, copy) WF objects including tasks, workflow templates...
  •  PFAC : Maintain Rules for workflow steps (can include ABAP code)
  •  SM63 : Events
  •  SWI1 : Work item selection
  • SWI2_DEAD : Workflow items with monitored deadline (items that missed deadline)
  •  SWI2_DURA : Workflow items by processing duration.    
Q12. What are the types of work items? 
  • Dialog Work item
  • Background work item
  • Workflow work item
  • Work queue work item
  •  Missed deadline work item
 Q13. What are the different statuses of a work item? 
  • Waiting
  • Ready
  • Reserved
  • Inprocess
  • Executed (‘confirm end of processing’ in task definition)
  • Completed
  • Logically deleted
  • Error
 Q14. Difference between Asynchronous and Synchronous methods in a task.
  
A work item created as part of synchronous in locked until end of the method execution. But in asynchronous, work item is locked only until start of method execution.
 At least one terminating event is required for a task using Asynchronous task Different Workflow
 
Q15. What are different Steps activities in SAP Workflow ?
  •  Condition:
  •  Multiple Conditions:
  •  Until Loop:
  •  Fork:
  •  Send Mail:
  •  Container Operations:
  •  Event Creator:
  •  Wait Event:
  •  Process Control
 Q16. Why is my workitem going to all users?
  
This normally happens when  a task has been set to General Task and the agent assignment fails to return an agent (or hasn’t been set) and the “Terminate if rule resolution has no result” box has not been checked. This is usually fixed by checking the “Terminate if rule resolution has no result” box
  
Q17. Name the tables used for storing the event linkages ?
  •  SWETYPECOU - Type Linkage Table
  •  SWEINSTCOU - Instance Linkage Table
Q18. Workflow got stuck / hanging. What are the steps you need to follow for doing investigation of reasoning for this.
 
  Some possible reasons/solutions:
  •  Run SWU_OBUF and check SWU3 for problems (e.g. SWWDHEX or SWWERRE not running)
  •  Check for any shortdumps in transaction ST22 if a method is hanging in the background.
  • Check in transaction SWO1 that it isn’t mistakenly marked as “Dialog” if the method is a Dialog method then check the agent hasn’t been set as WF-BATCH.
  • Check that WF-BATCH has SAP_ALL role.
  • Check if there is an error handling problem, especially if a method calls a function .
Q19. How can I look inside another user’s SBWP workflow inbox? 
 
Transaction SWI5 (assuming you have sufficient privileges)
 
Q20. Is it possible to configure the SAP workflow to have a pop-up message sent to the approver in the instance that Purchase Requisitions are ready for them to act on?

You can either send an Express Email message, or if it is a workitem, then make the Priority = 9. It will send an express message to the Respective Agent.