28

Click here to load reader

EBP Shopping Cart Approvals

Embed Size (px)

Citation preview

Page 1: EBP Shopping Cart Approvals

Title slidee

SAP-EBP Shopping Cart n-step Dynamic Parallel Approval

●IBM logo must not be moved, added to, or altered in any way.

For client presentations, client’s logo may go in this area

Karthik C Sunil

Page 2: EBP Shopping Cart Approvals

Contents

Introduction

Objectives

BAdi Implementation

Approver Table

Workflow changes

Actual Results

Reusability

References

Summary

Appendix

Page 3: EBP Shopping Cart Approvals

Introduction

● What is EBP○ Enterprise Buyers Professional is a component of SRM provided by SAP

● Advantages ○ Enterprise Buyer shortens the procurement process cycle time and saves

the company money

● Process ○ The process begins with the creation of a shopping cart and ends with the

posting of the invoice. ○ Buyers create the shopping carts through web, which are sent to the

required approvers for the approvals

● Technology○ SAP Business Workflows are used to handle these approval

process

Page 4: EBP Shopping Cart Approvals

Introduction - EBP Architecture

Intranet/Extranet/Internet

Web browser

Enterprise Buyer

Web server/

ITSEnterprise

Buyer

ALE/BAPIs

SAP/non-SAP

BackendSystem

BusinessWorkflow Approval

HTTP

Page 5: EBP Shopping Cart Approvals

EBP Scenario

Shopping CartItem Qty

PensMethane

1000 Pcs100 Lts

Total 2000

Approvers1. Line Manager 12. Line Manager 23. Approver for

Chemicals

WorkflowProcess

Page 6: EBP Shopping Cart Approvals

Workflow Approvals

● Managerial Approval○ Organization Structure

● Special Approval○ Product Category○ Plant○ Purchase Organization

● Parallel Approval○ Approvals are independent○ Reducing the process time

● Dynamic Approval○ Determining approvers at runtime

● Cart Level Approval○ No Item level approval possible

Shopping cart created

Manager 1

Manager 2

Special approval 1

Special approval 2

Cart approved

Based on Product category

Page 7: EBP Shopping Cart Approvals

Product Category

Special Approval

Table

USXXXX3Electronics

USXXXX2Chemicals

USXXXX1Oils/Coolants

ApproverCategory

Page 8: EBP Shopping Cart Approvals

Gap Analysis

● EBP Has …○ Dynamic approval, but without parallel branch

supported○ Parallel approval, without dynamic approval facility

● EBP Doesn’t have …○ The Standard EBP system does not contain the

Workflow for handling the n-Step Dynamic Parallel branch approval facility

Page 9: EBP Shopping Cart Approvals

Objective

● Objective of this presentation:○ Enabling BAdi and selection of the approvers

dynamically

○ Extend the standard workflow to support n-step dynamic parallel approval

Page 10: EBP Shopping Cart Approvals

Solutions

● Dynamic Approval BAdi○ BADI definition BBP_WFL_APPROV_BADI has to be

implemented

○ Method GET_REMAING_APPROVERS has to be defined

Page 11: EBP Shopping Cart Approvals

BAdi Calls

Shopping Cart Transactions

Actions during transaction

Approver Preview

Cart Save

Create

Change Cart

Check Status

BAdi

Method call

GET_REMAING_APPROVERSImporting

OBJECT_ID: OBJECT_TYPE:GUID ACTUAL_APPROVAL_INDEXAPPROVAL_HISTORY_TABLE

ExportingAPPROVAL_TABLENO_FURTHER_APPROVAL_NEEDED

Page 12: EBP Shopping Cart Approvals

Method Details

● Determine number of approvers depending on various conditions

● Pick up Managerial Approvers from Organization Structure● Pick up Special approvers from custom database tables● Arrange the appropriate approver sequence● Populate the approver table, and passed out via BAdi

Page 13: EBP Shopping Cart Approvals

Approver TableShopping cart

created

Manager 1

Manager 2

Special approval 1

Special approval 2

Cart approved

Branch 1

Branch 2

LevelBranchApprover

22Special Appr 2

12Special Appr 1

21Manager 2

11Manager 1

Level 1

Level 2

Page 14: EBP Shopping Cart Approvals

Standard Workflow

● EBP has been provided with an n-step workflow (WS14000134)

● There is no parallel branch supported in the standard product

Page 15: EBP Shopping Cart Approvals

Standard WorkflowGet Next Approver

(BADI)

Any more approvers

Approval Shopping Cart

Increment Index

Get Next Approver (BADI)

Yes

End

No

Page 16: EBP Shopping Cart Approvals

Get Next Approver (BADI)

Any more approvers

Approval Shopping Cart

Increment Index

Get Next Approver (BADI)

Yes

End

No

Get Next Approver (BADI)

Any more approvers

Approval Shopping Cart

Increment Index

Get Next Approver (BADI)

Yes

No

Shopping Cart Created

Branch ID - 1 Branch ID – 2

ModifiedWorkflow

Page 17: EBP Shopping Cart Approvals

BAdi Architecture

Shopping cart

Item 1

Item 2

Item 3

Item 4

Item n

Header

BAdi

Approvers

OrganizationStructure

ManagerialApprovers

Special Approvals

Table

SpecialApprovers

GET_REMAING_APPROVERS

Prepare approver Table

Workflow Runtime

PreviewSave

ApproverTable

Page 18: EBP Shopping Cart Approvals

Approver Preview

Page 19: EBP Shopping Cart Approvals

Approver Preview

Page 20: EBP Shopping Cart Approvals

Approver Preview

Page 21: EBP Shopping Cart Approvals

Approver Preview

Page 22: EBP Shopping Cart Approvals

Reusability in other projects

● Who can reuse this solution ?

○ Organizations which use EBP for their procurement process and need a parallel/independent and dynamic approval system

○ Who wants to reduce the approval process time

Page 23: EBP Shopping Cart Approvals

References

● One can find the more info on ICM with the title “SAP-EBP Shopping Cart with n-step Dynamic Parallel Approval”

● More on EBP can be found at SAP help http://help.sap.com/saphelp_srm40/helpdata/en/cf/4813fac6cbba46a6d67e14abdb1480/content.htm

Page 24: EBP Shopping Cart Approvals

Summary

● Business Need: To have independent managerial and

special approval● Objective: To have a parallel dynamic approval system for

EBP shopping cart● Implementing n-step dynamic BAdi● Populating Approval Table, understanding approver index

and branch index● Enhancement of the standard workflow● Reusability of the system in other projects

Page 25: EBP Shopping Cart Approvals

Appendix A

● Event linkage

Page 26: EBP Shopping Cart Approvals

Appendix B

MOVE guid TO lv_guid.CASE object_type.* ====================== shopping cart =========================== *WHEN c_shop.*** get the details of the shopping cartCALL FUNCTION 'BBP_PD_SC_GETDETAIL'EXPORTINGi_guid = lv_guidi_object_id = object_idIMPORTINGe_header = ls_header.

IF ls_header-total_value < 490000000.*** 2 step approvalCASE actual_approval_index.WHEN 0.ls_approver-approval_index = 1.ls_approver-approval_agent = 'USMANAGER1'.ls_approver-name = 'Arthur Manager1'.ls_approver-approval_description = 'First approval step'.APPEND ls_approver TO approval_table.

ls_approver-approval_index = 2.ls_approver-approval_agent = 'USMANAGER2'.ls_approver-name = 'Arnold Manager2'.ls_approver-approval_description = 'Second approval step'.APPEND ls_approver TO approval_table.ls_approver-approval_index = 2.ls_approver-approval_agent = 'USMANAGER4'.ls_approver-name = 'Thomas Manager4'.ls_approver-approval_description = 'Second approval step'.APPEND ls_approver TO approval_table.

WHEN 1.ls_approver-approval_index = 1.ls_approver-approval_agent = 'USMANAGER1'.ls_approver-name = 'Arthur Manager1'.ls_approver-approval_description = 'First approval step'.APPEND ls_approver TO approval_table.

ls_approver-approval_index = 2.ls_approver-approval_agent = 'USMANAGER2'.ls_approver-name = 'Arnold Manager2'.ls_approver-approval_description = 'Second approval step'.APPEND ls_approver TO approval_table.ls_approver-approval_index = 2.ls_approver-approval_agent = 'USMANAGER4'.ls_approver-name = 'Thomas Manager4'.ls_approver-approval_description = 'Second approval step'.APPEND ls_approver TO approval_table.WHEN 2.ls_approver-approval_index = 2.ls_approver-approval_agent = 'USMANAGER2'.ls_approver-name = 'Arnold Manager2'.ls_approver-approval_description = 'Second approval step'.APPEND ls_approver TO approval_table.ls_approver-approval_index = 2.ls_approver-approval_agent = 'USMANAGER4'.ls_approver-name = 'Thomas Manager4'.ls_approver-approval_description = 'Second approval step'.APPEND ls_approver TO approval_table.WHEN OTHERS.no_further_approval_needed = 'X'.ENDCASE.ENDIF

Code snippet for GET_REMAINING_APPROVERS method

Page 27: EBP Shopping Cart Approvals

Q & A

Questions please ???How

What

Why

Who

Where

When

Why

Why

What

Who

When

When

Where

Where

How

How Who

Who

Page 28: EBP Shopping Cart Approvals

Thank you …

Contact:Email: [email protected]