Skip to Content
author's profile photo Former Member
Former Member

How to Programmaticlly Retrieve BP assigned to a cProject Role

Hello Folks,

I am working on a workflow for a custom object in a xRPM/cProjects 4.5 environment. I need to find the Business Partners (and their User ids) given a Role Name (id) and the external id of the cProject. Are there any BAPIs that I could use to get the information needed? If not what are the tables I need to read? I tried SQL trace but was not successful in finding the necessary relations between the DB tables.

Cheers,

Ramki.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 08, 2008 at 07:28 AM

    Hello,

    I don't remember the BAPI names, but you should be able to retrieve some of them by searching with a wild card description. However, I can explain you the flow in the database:

    In DPR_PART, from the participant ID, you can get the role (or particiant) GUID.

    From the role GUID, you can find all the shadow roles (each one linked to one BP) in table CGPL_HIERARCHY, with GUID = role GUID. The shadow roles will be in field DOWN.

    Then, in DPR_BUPA_LINK, you will find the relashionship between the shadow role and the business partner, with PARTICIPANT_GUID = shadow role. You will find the BP GIUD in field BP_GUID.

    Then, in table BUT000, you can find the resource name with key PARTNER_GUID = BP GUID.

    For the user ID, you have to go first through the Central Person from the BP, then get the user ID.

    Matthias

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Matthias,

      Thanks very much for the answer. I had two BPs assigned to a Role and following your logic I only get one BP. I did some more analysis and came up with the following.

      Get the task GUIDs for the project from CGPL_TASKS.

      Get the GUID (key) from DPR_PART where GUID = TASK GUID and Participant_Role = 'ZROLE'.

      The GUIDs from CGPL_HEIRARCHY for the Project with UP = DPR_PART-GUID are the BP GUIDs.

      I still am interested in knowing how to get this information using BAPIs. BAPI_BUS2172_GET_SUBOBJECTS does get me the BPs but does not tell me which h BP is for which Role (No Technical name for the Role either).

      Cheers,

      Ramki Maley.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.