cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

staffing of resources to roles in a cProject

Former Member
0 Likes
208

I have a requirement wherein I need to display an error message for the roles which do not have resources assigned to them.

I was able to retrieve roles of a project by passing PROJECT_DEFINITION_GUID to BAPI_BUS2172_GET_SUBOBJECTS.

Now my problem is to get the resources(BP) assigned/staffed to each of these roles.

is there some BAPI/FM which can help me retrieve them? or some table where this data is stored?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Shweta,

You have derived the Project Role GUID, use BAPI BAPI_BUS2177_GET_DETAIL to retrieve the required details.

In the Results for ET_STAFFING, you can retrieve the STAFFINGLINK_GUID & PARTNER_GUID.

Further use BAPI-BUP_TEMP_PARTNER_WITH_GUID & Pass on the PARTNER_GUID to get the BP no.

Sejo

*Points appreciated if info is found to be useful.

Former Member
0 Likes

Hi Sejo,

Thank you so much fo rthe reply.

I tried your solution and it works when I do that without coding the logic.

BUT when I tried putting the code I am facing a runtime error because the field types are differnet.

[The function module interface allows you to specify only

fields of a particular type under "PROJECT_DEFINITION_GUID".

The field "V_PROJECT_GUID" specified here is a different

field type]

data: v_project_guid TYPE dpr_tt_guids.

LOOP AT i_project_id.

CALL FUNCTION 'DPR_GET_GUID_BY_ID_FROM_DB'

EXPORTING

iv_number = i_project_id-project_id

iv_version_number = ' '

iv_object_type = 'DPO'

IMPORTING

et_guid = v_project_guid

EXCEPTIONS

no_rfc_authorization = 1

not_found = 2

invalid_object_type = 3

OTHERS = 4.

IF sy-subrc = 0.

CALL FUNCTION 'BAPI_BUS2172_GET_SUBOBJECTS'

EXPORTING

PROJECT_DEFINITION_GUID = v_project_guid

TABLES

  • IT_SUBOBJECT_TYPE =

ET_SUBOBJECT = i_et_subject

  • RETURN =

.

Could you let me know some data type that I can use here to resolve this error?

Thank you again.