Sei sulla pagina 1di 28

I B M

l o g o

m u s t

SAP-EBP Shopping Cart n-step Dynamic Parallel Approval


Karthik C Sunil

n o t

b e

m F o o v r e d c , l i a e d n d t e d p r t e o s , e n o t r

T i

Contents
Introduction Objectives BAdi Implementation Approver Table Workflow changes Actual Results Reusability References Summary Appendix

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

Introduction - EBP Architecture

Intranet/Extranet/ Internet

Enterprise Buyer

Backend System

Business Workflow Approval ALE/ BAPIs SAP/ non-SAP

HTTP

Web server/ ITS Enterprise Buyer

Web browser

EBP Scenario

Shopping Cart Item


Pens Methane Total

Approvers 1. Line Manager 1 2. Line Manager 2 3. Approver for Chemicals Workflow Process

Qty
1000 Pcs 100 Lts 2000

Workflow Approvals
Managerial Approval
Organization Structure
Shopping cart created Based on Product category Manager 1 Special approval 1

Special Approval
Product Category Plant Purchase Organization

Parallel Approval
Approvals are independent Reducing the process time

Manager 2

Special approval 2

Cart approved

Dynamic Approval
Determining approvers at runtime

Cart Level Approval


No Item level approval possible

Product Category
Special Approval Table

Category Oils/Coolants Chemicals Electronics

Approver USXXXX1 USXXXX2 USXXXX3

Gap Analysis
EBP Has
Dynamic approval, but without parallel branch supported Parallel approval, without dynamic approval facility

EBP Doesnt have


The Standard EBP system does not contain the Workflow for handling the n-Step Dynamic Parallel branch approval facility

Objective
Objective of this presentation:
Enabling BAdi and selection of the approvers dynamically Extend the standard workflow to support n-step dynamic parallel approval

Solutions
Dynamic Approval BAdi
BADI definition BBP_WFL_APPROV_BADI has to be implemented Method GET_REMAING_APPROVERS has to be defined

BAdi Calls
Shopping Cart Transactions
Create Approver Preview Change Cart

Actions during transaction

BAdi

Method call GET_REMAING_APPROVERS Importing


OBJECT_ID: OBJECT_TYPE: GUID ACTUAL_APPROVAL_INDEX APPROVAL_HISTORY_TABLE

Cart Save Check Status

Exporting
APPROVAL_TABLE NO_FURTHER_APPROVAL_NEEDED

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

Approver Table
Shopping cart created

Approver
Manager 1 Manager 2 Special Appr 1 Special Appr 2

Branch Level
1 1 2 2 1

Manager 1

Level 1

Special approval 1

Manager 2

Level 2

2 1 2
Br an ch 1
Cart approved

Special approval 2

Br an ch 2

Standard Workflow

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

There is no parallel branch supported in the standard product

Standard Workflow
Get Next Approver (BADI)

Any more approvers Yes Approval Shopping Cart

No

Increment Index

Get Next Approver (BADI)

End

Modified WorkflowApprover Get Next


(BADI) Any more approvers Yes Approval Shopping Cart

Shopping Cart Created

Branch ID - 1

Get Next Approver (BADI)

Branch ID 2

No

Any more approvers Yes Approval Shopping Cart

No

Increment Index

Increment Index

Get Next Approver (BADI) End

Get Next Approver (BADI)

BAdi Architecture
Shopping cart
Header Item 1 Item 2 Item 3 Item 4 Item n A pp ro ve rs Approver Table
GET_REMAING_APPROVERS

Workflow Runtime

Organization Structure Managerial Approvers

Preview Save

BAdi

Prepare approver Table

Special Approvers

Special Approvals Table

Approver Preview

Approver Preview

Approver Preview

Approver Preview

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

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/4813fac6cbba46a6d67 e14abdb1480/content.htm

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

Appendix A
Event linkage

Appendix B
MOVE guid TO lv_guid. CASE object_type. * ====================== shopping cart =========================== * WHEN c_shop. *** get the details of the shopping cart CALL FUNCTION 'BBP_PD_SC_GETDETAIL' EXPORTING i_guid = lv_guid i_object_id = object_id IMPORTING e_header = ls_header. IF ls_header-total_value < 490000000. *** 2 step approval CASE 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.

Code snippet for GET_REMAINING_APPROVERS method 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

Q&A
Why Whe n Who Why Whe n Wher e Ho w Ho w Whe n Wher e

Questions please ???


What What Wher e Who Why Who

Ho w

Who

Thank you

Contact: Email: karthikseeyes@gmail.com

Potrebbero piacerti anche