Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Problem Description: Currently(till ByD release 1502) in the approval process definition, Work Distribution categories are fixed and pre-delivered by SAP.  There is no possibility for the customer to add their own work distribution category, with their specific custom responsible determination logic.

In some cases, customer has to create multiple steps in approval process with same condition differing only in work distribution.

Also in few cases,customer has to create multiple steps in approval process with same work distribution differing conditions.


With custom work distribution category , these duplicate steps can be avoided by PDI Studio implementation.


For example, consider the example of shopping cart(Internal Request) with same work distribution category(Direct approval) with various conditions.

Step1 : Direct approval for User 1 if the total value is less than 1000 USD

Step2 : Direct approval to User 2 if the total value is greater than 1000 USD and less than 2000 USD

Step3 : Direct approval to User 3 if the total value is greater than 2000 USD and less than 5000 USD

Step4:  Direct approval to User 4 if the total value is greater than 5000 USD


Similarly there can be many steps with only changes in conditions

Using custom responsibility determination,this can be implemented with one step.



Solution: In release 1505 of ByD, we provide the possibility for the customers to define and add their own work distribution category ,specific to a given approval process by means of Partner solution implementation.   In addition to the set of pre-delivered  Work Distribution categories, new custom Work distribution categories can now be added by defining them in Partner development (PDI) solution, along with the custom responsibility determination logic. This can be achieved broadly with the following steps,

     a) Defining the new custom work distribution category code(s) as Business configuration(BC set) entries in Partner studio

     b) Implementing the responsibility determination logic as enhancement(BADI) implementation in the Partner studio

 

a) Steps for defining the custom work distribution category in Partner(PDI) studio

As per the example given above for shopping cart(Internal request), partner has to create one work distribution category with the enhancement determination logic.

For this partner has to follow the below steps,

  1. BC set creation:

Choose the business configuration object(Object name - ApprovalCustomResponsibilityCategory)to create the BC set.

Add the entries to create the custom Work Distribution Category

Business Object type code :


Business objects which are scoped for Multi Step Approval(MSA) are allowed for custom work distribution.

Business object type code - this can be taken from the particular business object


Example :

Business Object name

Object Type Code

PurchaseOrder

001

SupplierInvoice

127                 

CustomerQuote

30

ExpenseReport

47

GoodsAndServiceAcknowledgement

56

InternalRequest(Shopping Cart)

62

ProjectBaseline

650

Responsibility Category code: This is a numeric field. Responsibility category code and business object type code combination should be unique.

2. Once the BC set is created, this BC set has to be attached with the business process relevant for the Business object using Business Adaptation Catalog (BAC element)


Create a BAC element

3. Once the BAC element is created then this business option needs to be scoped by selecting the scoping question  (which in turn would trigger the BC deployment in background)

4. After scoping, this category code will be available in Approval process

b) Implementing the responsibility determination logic as Enhancement implementation in the Partner development studio


  On creation of new shopping cart(Internal Request), this custom work distribution category will be called to determine the approver. Partner needs to implement the Enhancement implementation(BADI) to determine the approver for this custom work distribution category.

Enhancement filter should have the responsibility category as filter parameter and enhancement implementation will be called to determine the approver.

Enhancement method Input Parameter Structure has the following fields:


BOObjectTypeCode

Business Object type Code

BOName

Business Object Name

BONodeName

ESR name for Node

CategoryCode

Responsibility Category Code

KeyFieldValue

BO Instance Key field value(UUID)


Please implement the custom logic in the partner development studio.

Blow is sample Enhancement implementation for illustration purpose.

Prerequisites:

  • Custom work distribution category for a given Business Object (Object Type code) can be scoped only if the respective Business Object is Multi-step approval (MSA) enabled.
    In the following example ,
    62 object type code (Shopping cart or InternalRequest) is Multi step approval enabled, so custom work distribution category can be maintained for this business object code.
  • In partner enhancement implementation, solution check needs to be done to ensure the implementation processes for the relevant object type code.

For example , 2 partners have defined the same category code for shopping cart Business Object (62) and Expense Report (47).

Partner Solution

Business object type

Responsibility Category Code

Value with solution prefix

Y12345678Y

62

100

Y12345678Y_100

YabcdefghY

47

100

YabcdefghY_100

There can be two enhancement implementations for same Responsibility category code “100”, but one for  shopping cart(Internal request) Business object (62) and Expense Report (47).

Lets say a Shopping Cart is sent for approval. Both enhancement implementations will be called during run time since they match the filter value 100. Solution check implementation would help the enhancement implementation in 2nd solution (YabcdefghY) to skip the processing.

Though both enhancement implementations would be called, the system would consider only the results from the correct implementation (Y12345678Y) and ignore the results from the other implementations.

Limitations:

  • Currently custom work distribution category is supported only for the pre-delivered SAP business objects. Partner created Business objects are not supported
    • Business configuration entries(BC set entries) for the responsibility category code and enhancement implementation needs to be maintained in the same partner solution.(Across solution is not supported )
9 Comments