Skip to Content

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

Shopping cart approval with various conditions.JPG

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.

Pic2.jpg

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.

Filter Value.png

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

Pic4.jpg

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)

Pic5.jpg

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

Shopping cart approval process.JPG

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.

Pic7.png

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

Pic8.png

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.

Untitled.png

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 )
To report this post you need to login first.

7 Comments

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

  1. Fred K

    Hi Sumithra,

        Thanks.

        Is it only possible for the following BOs?

    Business Object name

    Object Type Code

    PurchaseOrder

    001

    SupplierInvoice

    127                

    CustomerQuote

    30

    ExpenseReport

    47

    GoodsAndServiceAcknowledgement

    56

    InternalRequest(Shopping Cart)

    62

    ProjectBaseline

    650


    Best Regards

    Fred

    (0) 
    1. Sumithra Sudharsanam Post author

      Hi Fred,

      Custom work distribution category is possible for all the BO’s which are enabled for muti step approval(Approval Process).

      Currently only these BO’s are supporting Multi step approval. Hence it is limited to these.

      Regards,

      Sumithra

      (0) 
      1. Fred K

        Hi Sumithra,

              Thanks.

              How can I know which BO has which kind of Approval Process?

        Best Regards

        Fred

        (0) 
        1. Sumithra Sudharsanam Post author

          Hi,

          List of BO’s scoped for multi step approval process are shown in the UI,
          application user management->Approval processes

          For all other BO’s you can refer the relevant documentation.

          Regards,

          Sumithra

          (0) 
  2. Meghna Sharma

    Hello Sumithra,

    We have same requirement in C4C where we want to add custom work distribution category for approval process of Ticket. But its not possible to achieve the first step itself which is to create responsibility category. It involves the use of SAP provided BCO to create BC set and that functionality is only available in ByD partner development tenant. How can we use this Enhancement Implementation for C4C or is there any other way to determine approver based on custom logic?

    Thanks & Regards,

    Meghna Sharma

    (0) 

Leave a Reply