cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Staffing to a cProject

Former Member
0 Kudos

Hi All,

My requirement is such that after a cproject gets created, a user should automatically get assigned to the project manager role in the resources\staffing tab.

I tried to find out what BAPI can add staffing & found out BAPI_BUS2177_STAFFING_ADD.

However I am unable to figure out how to use this BAPI.

1) Where can I get the project role guid??

2) Where can I get the BP guid??

3) Just passing the project role & user, does this BAPI staffs the user to the role??

Helpfull answers will be rewarded points.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member201206
Active Contributor
0 Kudos

Hi Sonali,

It depends on, at which time should the user (who created the project or anyone?) be staffed to a particlular role.

If it should be staffed AFTER the projects created and save, then the cProject Bapi mehtod should be used.

1. BAPI_BUS2172_GET_SUBOBJECTS => get the role

2. Determine the GUID of the BP, try with the info. posted above.

3. BAPI_BUS2177_STAFFING_ADD => staffing

4. BAPI_CPROJECTS_COMMIT_WORK

If it should be staffed during save process or beofe. The the BaDi (not BAPI) method of cProject should be used to enhance the flow logic. DRP_EVENTS may be the right one. But I would not use call cProject BAPI within the method, rather use some normal class method.

kind regards,

Zhenbo

mariano_sabiche
Active Participant
0 Kudos

Hi Zhenbo;

Did you find a way to link a resource to the Project Definition at Project Management.

We use the RPLM_PSS_UPDATE_BL_EL fm without any positive result.

Best regards,

Mariano

former_member189058
Active Contributor
0 Kudos

Hi Sonali,

When the Project is created in cProjects, you need to automatically assign a BP as the Resource to a particular project Role.

I assume you have created a Project Role prior to this when creating the project.

Create an implementation of the BAdI DPR_EVENTS

Use the Filter Method: ON_IF_DPR_COMMON_CREATED

You will get the project GUID from

ir_sender->GET_GUID().

To get BP GUID use the FM: BAPI_BUPA_GET_NUMBERS provided you have the BP Number to use.

To Get Project Role GUId use the FM: BAPI_BUS2172_GET_SUBOBJECTS use project GUID from ir_sender->GET_GUID()..

in IS_STAFFINGLINK-PARTNER_GUID add the GUID of the BP

Make sure you have set IS_STAFFINGLINK_X-PARTNER_GUID = 'X'

Hope this helps.

Regards,

Reema.

Former Member
0 Kudos

Hi Sonali,

There is no specific Guide for the Roles, you can note the following roles which are the composite roles offered by SAP (please refer cProjects 4.00 Configuration Guide - Page 21).

● SAP_CPR_DECISION_MAKER

● SAP_CPR_INTERESTED

● SAP_CPR_MEMBER

● SAP_CPR_PROJECT_LEAD

● SAP_CPR_TEMPLATE_RESPONSIBLE

● SAP_CPR_RESOURCE_MANAGER

The composite roles contain several single roles. SAP supplies the following single roles for

cProjects as standard:

● SAP_CPR_PROJECT_ADMINISTRATOR

● SAP_CPR_TEMPLATE_ADMINISTRATOR

● SAP_CPR_USER

For BP you can refer SAP Help link..

http://help.sap.com/saphelp_tm60/helpdata/en/7a/c50b6a0edc4cb686e0a1585d5116ee/frameset.htm

Please confirm whether the cProjects creator happens to be the cProjects administrator in your scenario, so that can answer your query further.

Regards,

Nishit

Points welcome on useful information.

Former Member
0 Kudos

Hi Nishit,

I already have a role defined in which I have to add the user. It is a Z role.

And the cProject will not be created by administrator.

Can you tell me how to use the BAPI_BUS2177_STAFFING_ADD.

Where can I get the project role guid??Where can I get the BP guid??

I have the participant role. & I have project number & User Id. Now from which tables/FM I can get further information to use the Staffing BAPI.

Thanks & Regards,

Sonali.

Former Member
0 Kudos

Hi !

Been a long time since you posted this thread. Hope it is still relevant.

You can get the Project role GUID from FM BAPI_BUS2172_GET_SUBOBJECTS. If you pass the project GUID it returns a ET_SUBOBJECT structure. In that sturcture the object type 'MTG' are project roles and the GUIDs for the same are also returned.

To get the GUIDs of the BPs search in table BUT000.