cancel
Showing results for 
Search instead for 
Did you mean: 

Inheritance of responsible cost center in project builder

mohammedrahman4
Participant
0 Kudos
104

Hi All, 

We need to inherit reponsible cost center automatically from top WBS element to sub-wbs element . Currently this field is made mandatory for all level of WBS element . Once we enter cost center at top level wbs , it should automatically inherit to sub wbs element . Can any one please suggest any BAPI / API for this requirement or can it be addressed through configuration ?

Thanking you .

Mohammed

View Entire Topic
james783
Discoverer
0 Kudos

Hello,

Absolutely, Mohammed. You're looking to automate the inheritance of a responsible cost center from a top-level WBS element to its sub-WBS elements in SAP Project System (PS). Here's a breakdown of how to achieve this, focusing on BAPIs/APIs and configuration:

1. Configuration Approach (Recommended for Simplicity):

User Exit or Business Transaction Event (BTE):
This is generally the most straightforward and maintainable approach.
User Exit: Look for user exits within the WBS element creation or change transactions (e.g., CJ20N). You can write ABAP code within the user exit to:
Check if the current WBS element is a sub-WBS element.
Retrieve the responsible cost center from the parent (top-level) WBS element.
Populate the responsible cost center field in the sub-WBS element.
BTE: Business Transaction Events are similar to user exits, and offer a better, standardized way to hook into standard SAP process.
Derivation Rules (If Applicable):
In some cases, depending on your SAP version and configuration, you might be able to use derivation rules. However, this is less likely to be applicable for cost center inheritance within WBS elements directly without custom ABAP development.
Project Profile Configuration:
While you cannot directly configure inheritance, you can use the project profile to define default values. But this would be a static default value, and not a dynamic inheritance from parent.
2. BAPI/API Approach (More Complex, but Flexible):

BAPI_BUS2001_SAVE_MULTIPLE:
This BAPI is used to create or change WBS elements.
You can use it in conjunction with custom ABAP code to:
Read the responsible cost center from the top-level WBS element.
Construct the necessary data structures to update the sub-WBS elements with the inherited cost center.
Call BAPI_BUS2001_SAVE_MULTIPLE to apply the changes.
Function Modules:
There are function modules for reading and changing WBS element data. You could use these to read the top level cost center, and then update the child WBS elements.
Examples of function modules that could be used are those within the function group CNCI.
Enhancement Framework:
Use the enhancement framework to add your own logic to the WBS element creation or change process.
Implementation Steps (General Outline):

Identify the Trigger Point:
Determine when the inheritance should occur (e.g., when a sub-WBS element is created, when the top-level WBS element's cost center is changed).
Retrieve the Parent Cost Center:
Write ABAP code to navigate the WBS hierarchy and retrieve the responsible cost center from the parent (top-level) WBS element.
Update the Sub-WBS Elements:
Use either a BAPI or function module to update the responsible cost center field in the sub-WBS elements.
Error Handling:
Implement robust error handling to manage situations where the parent WBS element doesn't exist, the cost center is invalid, or the update fails.
Testing:
Thoroughly test the implementation to ensure that the inheritance works as expected in all scenarios.
Recommendation:   e-zpassnj com

Configuration (User Exit/BTE) is generally preferred due to its simplicity and maintainability. It avoids the complexities of direct BAPI calls and provides a more integrated approach.
The BAPI method is more complex to implement, and requires a lot of testing, but it can be more flexible.

 

Best Regards

mohammedrahman4
Participant
0 Kudos
Hi James, Thanks for your detail explanation . Can you please suggest user exit name to implement this enhancement .