cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BAPI for person assignment to project activity

joe_moore3
Discoverer
0 Kudos

We required a BAPI to update a person assignment in a PS Network Activity. After contacting SAP Support and searching the internet, it seemed we were out of luck as no BAPI exists for this functionality. We were surprised that this sensible integration did not exist out of the box.

As a result, we studied CN22 and CJ20N functionality and wrote our own BAPI. In our testing, it works perfectly with the following inbound parameters:

Network
Activity
Sub-Activity
Personnel Number
Start Date
End Date
Work Hours
External Split ID

The external split ID can be any string that is a unique link to the external systems person assignment which we store in an appended Z field in table KBED (which contains the person assignments and splits). For example: Our external project management system has a unique ID for every person assignment to an activity and this is now stored as the external split ID in table KBED.

The effort to develop this capability was significant. In our view SAP should have made a standard BAPI for everyone to have this functionality.

We had the same issue when we wanted to release activities in a PS project via a BAPI. The standard BAPI BAPI_BUS2002_SET_STATUS does not work the same way as CJ20N. It does not set parent objects (WBS, Network, Project Definition) system status to PREL (partial release) when releasing a specific activity in the project. We had to produce our own BAPI using function module CJDW_INTEGRATED_STATUS_CHANGE which worked perfectly.

My question: Is there anywhere to make improvement suggestions directly to SAP so that other customers who require this functionality do not have to reinvent the wheel?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Joe,

We have same requirment to mass upload the person assignment in project activities.

Can you please give code snipet of the BAPI which you created for the same.

Thanks in advance

Biswa

joe_moore3
Discoverer
0 Kudos

Please contact me directly at moorej999@gmail.com

Also note:

We used function group MP03, function modules MPP_SPLITS_PUT and then MPP_SPLITS_POST to post into the DB followed by a commit work and wait. We only do assignments to network activities.

We also made a core mod to add an external field linked to the split number. We called it the "external split ID" and this is a unique identifier in our source system for each split (resource assignment in time = split).

We also have another source system were we consolidate all assignments by personal number and create one split in time by personnel number. This code scans all splits, finding the split (if existing) by personal number and updating accordingly.

The trick in these FMs is that they require the complete list of splits each time when updating (existing + new) and you have to retrieve any of the existing splits based on something (in our case using the external ID field created or by using the personnel number), then reuse the split numbers. Otherwise you will run out of split numbers (maximum of 254).

If you use the personnel number to link to the split, you will only have one unique personnel number assigned to the activity. That is why we created the additional external split field - so that we can assign the same personnel number to different splits (different time periods) based on the external ID in our source system for each split.

MTerence
Active Contributor
0 Kudos

Hi Joe,

Check out this space

https://ideas.sap.com/

Regards

Terence