cancel
Showing results for 
Search instead for 
Did you mean: 

Problems retrieving data from project (project GUID) in PPM 5.0

Former Member
0 Kudos

Hi gurus,

We have a requirement for data saving in custom fields within a custom tab when creating a project with a template in Project management PPM 5.0 (cprojects) application. We found the way to save data into nodes contained within webdyn pro components, this data is saved into a custom table.

The problem comes when trying to retrieve data from tables in the project and show them in the fields since path to data seems to be lost. We are unable to find Project_guid this problem arises only when creating project using template, not when creating a project in a normal way.

The procedure we follow to show data is:

- Call method lr_ui_log_projects_view->GET_OBJECT_ID to retrieve phase ID

- Use phase ID to select GUID from table DPR_PHASE

- Use phase GUID together with Hierarchy-up to retrieve project GUID (Here comes the problem)

--> When getting project Guid seems to be the wrong one. We are getting Project_template_Guid so when saving data in this GUID all projects created with this template will have same GUID so data will be overwritten.

Any help using BAPIs, FUNCTIONs, METHODs, Tables that can retrieve Correct GUIDs wether it is a Project, Project Template or Project created with template?

Thank you very much.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Hector,

This is because the phase ID is not unique.
When you create a project from a template, phase ID is copied as well.
The system retrieves the first ID it finds, therefore the template phase. You should not rely on the phase ID for your search, but rather on the phase GUID directly.

I guess you could find the current processed object GUID in the component controller attributes, or in the session_state attribute (cl_dpr_session_state->get_focusobject).

BR
Matthias

Former Member
0 Kudos

Thanks a lot Matthias, applying method Get_focuobject would definetely solve my problem.

Issue closed.

former_member209919
Active Contributor
0 Kudos

Hi Hector,

We have custom field in custom tabs in cProjects but fields are stored in normal tables  ( includes)

DPR_PROJECT --> projects

DPR_PHASE --> Phases

DPR_TASK --> tasks

I think you have a special enhancement that stores something in a Z table and you should review how this information is being stored, it seems that here it is the problem.

Sorry!!!