How To Call Workflow From Abap Program Sap

  1. How To Call Workflow From Abap Program
  2. Abap Submit And Return
  3. How To Call Workflow From Abap Program Sap System

4 Methods to Find if the SAP Workflow Work Item is Logically Deleted or Not; 2 Methods to Find SAP Workflow Work Item Id from User’s Inbox; Calling BRF+ Application through ABAP; SAP Workflow – How to Send eMail when PO is Created for a Particular Company Code withOUT Code? Workflow Concepts which every developer should know.

SAP Workflow is a tool to automate complex business processes where there is more than one user involved. SAP workflow maps the position in organization because SAP believes that Positions are more stable than the people.

  • To call the Standard Table display, we can Submit the underlying program from our report. SAP creates a table dispaly report for all the database tables which can be viewed using the SE16. So, We can find that program name and Submit the program to call the Standard Table Display.
  • The ABAP code below is a full code listing to execute function module SAPWAPISTARTWORKFLOW including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front.

How To Call Workflow From Abap Program

Sap

SAP Workflow is a process tool that is designed to facilitate and automate business processes involving the tasks sequence performed by the users (people in the workplace) and ensure that the right work is assigned in the right sequence at the right time to the right person in the workflow. The SAP workflow can be linked to other software tools such as Microsoft Outlook or Lotus Notes. Using SAP Workflow, each step of a business transaction can be easily monitored throughout the initiation and completion of the business processes. The SAP Workflow enables the process owners to track deadlines, determine the workload as well as provide statistics on the length of time to complete work processes.

The key components of the SAP Workflow include the Workflow Definition, Work Items, Events triggers and the Organizational Structure in the workplace.

Sometimes we need to call a workflow process from our SAP ABAP programs and implementations in an easy form with Object Oriented Programming capabilities, but many times we found SAP business workflow implementations are Business Object Oriented and this way is too tricky and old fashioned for us.

Good news! SAP Business Workflow allows to be called through our own Event-Class with our own parameters without create a Business Object Repository. This example shows a simple way to call a workflow process from Event-Class into a Class Method or SAP ABAP Program.

  1. Create a reference to SAP Business Interface in our class (trx SE24). With this way we are able to use our SAP ABAP Class into SAP Business Workflow Event Containers. Please add the interface parameters below:
  • BI_OBJECT
  • BI_PERSISTENT
  • IF_WORKFLOW
How To Call Workflow From Abap Program SapAbap submit and return

Abap Submit And Return

2. Create our event with parameters compatible with our Workflow Input Parameters.

  • EJECUTAR_WORKFLOW (Execute workflow): class event for launch our SAP Business Workflow.
  • Event Parameters for EJECUTAR_WORKFLOW event.

3. Binding our SAP Business Workflow object template (trx PFCT) to be launched by our SAP ABAP Event Class in Triggering Events and activate it (Green Button indicates event activation).

  • Select ABAP Object Class and click Call Binding Editor ( Button ) and Bind our Event Parameters with Workflow Parameters (and save).

4. Calling workflow from method-class. (Code Example).

  • Get our Event Container Workflow (a reference to our event container parameters).
  • Set workflow Variables for Event (setting variables one by one with our values for launch our SAP Business Workflow).
  • Calling Workflow Event Class (Raise our Event with our parameters).

… And that’s all folks. With this way we can call our SAP Business Workflow from our SAP ABAP Class Method.

How To Call Workflow From Abap Program Sap System

Enjoy it!