You are on page 1of 30

Create One Business Object:

Create one key field MATNR using Table MARA:


Create One method ‘Get_Count_line’ for count the Number of line in internal table.

Import: im_it_table and export: ex_count.


Program:

Create Another Method: Get_approval_line ,give the Import paramater IM_INDEX and
IM_IT_APPROVAL_LIST export EX_WA_APPROVAL.

Import IM_INDEX:
Import IM_IT_APPROVAL_LIST
Exporting EX_WA_APPROVAL:
Program:

Build The Workflow template ZMM_WF_ANI from transaction PFTC.


Click on Workflow builder and go the Workfloe screen(SWDD).

First,create one activity for user count, and create one task for that.
Binding:
Activity:

Binding in Activity:
Create One Workfloe container WC_INDEX for which line it will be indicating.
Creating one container operation for assigning WC_INDEX = 1.
Create two more workflow container WC_STATUS and WC_COUNT.

WC_STAURS:
WC_COUNT:
Create one loop until request are Approved or Rejected.
Create one Activity for found the Approver, in activity create one task
Binding:
Activity:

Binding in Activity:
Create One User Decision for approve or reject the work item.

For that create one container operation: WC_USER_APPROVER


In user decision:
If user given Approve or Reject create one container operation WC_STATUS:
For Approve:
For Reject:

Now create one container operation for increment the index..


Then, Again come to the Loop.

Workflow Now :
Create one condition for Mail Sending:
For Approve or Reject step for mail send:

Workflow looks like:

You might also like