cancel
Showing results for 
Search instead for 
Did you mean: 

BAdI for staffing

anuradha_majumdar
Active Participant
0 Kudos

Hello,

Is any BAdI or enahncement available for staffing a role?

We have a requirement to staff the creator of project as the PM during project creation. There is also a requirement to staff based on location.

We have tried using BAPI but it tries to lock the project which is being edited.

Thanks,

Anuradha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anuradha,

I am not sure but you can try this.

Use BAdI DPR_EVENTS (create an implementation)

Filter Method: ON_IF_DPR_COMMON_CREATED

get the project GUID

get BP GUID .

get Project Role GUID 

in IS_STAFFINGLINK-PARTNER_GUID add the GUID of the BP

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

Regards,

Runjhun

Answers (1)

Answers (1)

former_member201206
Active Contributor
0 Kudos

Hi Anuradha,

there is no explicit BAdI for that purpose.

You may use the DPR_EVENTS as Runjhun mentioned.

Import is, not use the BAPI rahter use call method

  lr_bupa_link = lr_role->mr_bupa_links->add( lv_partner_guid ).

Using the guid of the created role (PM role) to determine the lr_role. The lv_partner_guid refers the BP guid of the project creator.

Using BAPI call within the standard process is really very 'dirty'.

Kind regards,

Zhenbo

anuradha_majumdar
Active Participant
0 Kudos

Thanks Runjhun, thanks Zhenbo

Trying out your suggestions

Yes Zhenbo, I know BAPIs shouldn't be included in transactions, they have their own LUWs

Regards,

Anuradha

anuradha_majumdar
Active Participant
0 Kudos

Thanks it is working for cprojects

But we are not able to make it work for initiatives. We have also tried FM

INM_INIT_SET_RESPONSIBLE. Any idea which class can be used for initiatives?

Regards,

Anuradha