Skip to Content

OVERVIEW:

Workflow implementation for Audit Plan in SAP Audit Management involves both Customizing and Development work. Following blog takes you through the  process of Audit Management Workflow definition for Audit Plan. There are not much relevant information available related to the workflow so we implemented the same from scratch.

REQUIREMENTS:


The workflow needs to be triggered at the time user saves a new Audit Plan. Following Tcodes are provided for the purpose: PLMD_AUDIT(For creating New Audit Plan, Question List, Audit, etc.) and PLMD_AUDITMONITOR (for edit/display exisiting objects).

wf01.JPG

User creates a new Audit Plan (Tcode PLMD_AUDIT) with Contact Person Tab filled with Roles:

wf02.JPG

50 for Approver

51 for Person Responsible

65 for Auditee

wf03.JPG

Relevant Business Partners needs to be created/assigned to the Roles for triggering workflow. Details of Business Partner maintenance will be discussed below.

The workflow goes to the inbox(Business Workplace, SBWP) of Audit Plan Approver. Approver can either approve or reject the Workflow.

wf04.JPG


Once approved, user has to enter the mandatory approval comments on the screen. The screen looks like :

wf05.JPG


The workflow, along with the comments, goes to Auditee for its acceptance.

wf06.JPG


When accepted, an acceptance mail get triggered informing all involved personnel of the acceptance of Audit Plan.


Status of Audit Plan changes to Approved.

wf07.JPG



OBJECTS PROVIDED BY SAP:

Following Business Objects are available by SAP related to Audit Management module:

BUS20300 – Audit Plan

BUS20350 – Audit

BUS20360 – Question list/reply

BUS20370 – Corrective actions

Business Object BUS20300 is the most suitable in our case as it is related to Audit Plan where we want to trigger our workflow  We can either develop the scenario using this object or can also develop from scratch. We developed it independently for more flexibility and control.

STEPS IN DETAILS:

(A) Customizing / Functional steps:


1.Maintain Identification Tab with Personnel Number(Employee Number/PERNR) in Business Partner Role BUP003-Employee (Tcode used here is BP). This is used to identify the SAPID of personnel for workflow triggering and mailing.

wf08.JPG

(B) Workbench / Developer Steps:


1.BADI PLM_AUDIT_STATUS implemented (Method GET_PERMITTED_CHANGES) for triggering Workflow event. It is the initiation point of the workflow. [Code attached below]

2.Create custom table for storing rejection reasons(say, ZFA_WF_REASON_DE). The fields can be anything, depending upon your data capturing requirements.


wf09.JPG

3.Create Custom Business Object or delegated business object (with Key fields, methods, Events; lets say ZBUS20300N).[Program attached below]

wf10.JPG

4.Custom Workflow to be triggered. [Workflow XML attached below]


Custom Workflow gets triggered from the new BADI Implementation. Event EVE_CREATOR of Business Object ZBUS2030N is triggered passing on the parameter IV_OBJNR (Type PLMM_AUDITPLAN-GUID).


Lets walk-through some of the important steps in this workflow development:


(a) From BADI PLM_AUDIT_STATUS implemented above, the data Object IV_OBNJR is passed to the Workflow calling Workflow Event (EVE_CREATOR). Binding is done as shown below to pass the Audit Plan details.


wf11.JPG


(b) A While Loop is created for checking whether the Audit Plan is released or not. If released, it marks the Workflow completion. If Rejected, it is sent back to Initiator for corrections.

wf12.JPG


(c) Get Audit Plan Details Task – used for fetching Audit Plan details based on data IV_OBNJR. The binding includes passing IV_OBJNR to the task and calling Method GET_DETAILS in Background of Object Type ZBUS20300N and returning all relevant data ( like AUDITPLAN, PARTNER, STATUS, AUDITPLANS, RETURN,  APPROVER,  AUDITEE, APPROVER_NAME, AUDITEE_NAME).

wf13.JPG


wf14.JPG


(d) User Decision Step (for Approver) – used to capture the user decision of Approval or Rejection made by the Approver (Agent Determination is from local variable passed fetched from last step). If Rejected, mail gets triggered to Initiator for necessary corrections.


wf15.JPG


(e) Enter Approval / Rejection Remarks Tasks – used to capture Approval and Rejection remarks of the user. It uses Method RECORD_REMARKS_LOG of ZBUS20300N. Remarks can either be saved in a custom table or can be send as a comment in the subsequent mail or both.


wf16.JPG


(f) Approver Updation Task – The task is used to update the status of Audit Plan in background. The status changes from Being Created / To be Approved to Approved. We have to update relevant System Status by passing Status Indicator flag, and calling FM CRM_STATUS_CHANGE_INTERN for the updation. In binding it takes the input IV_OBJNR. Relevant System Statuses and texts are shown below in the blog.


(g) User Decision Step (for Auditee) – Similar to UD Step of Approver. The decision step goes to Auditee (retrieved from step c) for Acceptance or Rejection. Based on Auditee decision, the Workflow first captures the Approval and Rejection comments. It then updates the Audit Plan status (back to Being Created / To be Approved’ in case of Rejection and ‘Complete’ in case of Auditee Approval).


wf17.JPG


(h) Container Operation – for setting RELEASED flag, so that the looping condition set in step (b) can be skipped and workflow gets completed after final approval.


wf18.JPG


wf18.JPG



(i ) Mail Step – both on Approval and Rejection of Audit Plan. The mail notification is sent to the Initiator in both cases, informing about the final action taken on the Audit Plan.

wf19.JPG


wf20.JPG


On Rejection, the whole progress gets triggered again (due to while loop), asking the initiator to make necessary changes in the Audit Plan. Once changes are done, the same steps gets repeated following all the necessary approval steps.



NOTE: For this example, it is a two step approval process that can be scaled as per your requirement and customer directives.





[[ System Statuses for module Audit Management :


I1800 AM00 Being Created
I1801 AM01 In Process
I1802 AM02 Released
I1803 AM03 Completed
I1804 AM04 Locked
I1805 AM05 To Be Archived
I1806 AM06 Archived
I1807 AM07 To Be Approved
I1808 AM08 Rejected
I1809 AM09 Approved
I1810 AM10 Deletion Flag
I1811 AM11 Canceled
I1812 AM12 Unplanned Audit(s)
I1813 AM13 Question List(s) Assigned
I1814 AM14 Download Completed
I1815 AM15 Confirmed
I1816 AM16 Report Created
I1817 AM17 Signature Provided
I1818 AM18 Outstanding Actions
I1819 AM19 Actions Completed
I1820 AM20 Completed w. Outstanding Actns
I1821 AM21 Created
I1822 AM22 Outstanding
I1823 AM23 Forced Completion
I1824 AM24 Valuation Executed
I1826 AM25 Signature for Completion Prov.
I1827 AM26 Part. Signature for Completion
IP012 AMEN Amended


]]











To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

    1. Naveen Vishal Post author

      Thanks for liking the content Pradeep !

      It is not relevant to the new SAP AM on SAP HANA.

      You can navigate to the same in Cross Application components in SAP Menu.

      (0) 

Leave a Reply