Skip to end of metadata
Go to start of metadata

A Project Management Project is created based on a Portfolio Item. Below you can find the coding parts which are called when opening the Project Management Project and navigating to tab "Portfolio Data".

 

The object link between portfolio item and Project management project is stored in table RPM_OBJ_LINK and should be filled as follows:

GUID                         ...
PROJECT_GUID     filled with Item-Guid
OBJECT_TYPE       0INMCPROJECT
OBJECT_KEY         filled with Project-Guid
INTERNAL_ID          filled with Project-Guid

 

 

Open Project Management Project

CL_INM_DFM_REPOSITORY
GET_LINKS_AND_CONTEXT
* Getting the object instances where the current object is the reference
    CALL METHOD get_linked_object_sources
      EXPORTING
        iv_object_key     = lv_object_key
      IMPORTING
        et_linked_objects = lt_linked_object_sources.


LV_OBJECT_KEY contains the Project-Guid
LT_LINKED_OBJECT_SOURCES contains the entry for OBJECT_TYPE: 0INMCPROJECT
     PROJECT_GUID                                filled with Item-Guid
     OBJECT_TYPE                                  0INMCPROJECT
     OBJECT_KEY                                    filled with Project-Guid

 

CL_INM_DFM_REPOSITORY
GET_LINKED_OBJECT_SOURCES
SELECT guid
         project_guid
         task_guid
         object_type
         internal_id AS object_key
    FROM rpm_obj_link  
...


CL_INM_DFM_REPOSITORY
GET_LINKS_AND_CONTEXT
* Merge both types of object references to one internal table
    CALL METHOD merge_object_links
      EXPORTING
        it_linked_objects        = lt_linked_objects
        it_linked_object_sources = lt_linked_object_sources
      IMPORTING
        et_linked_objects        = lt_linked_object_merge.

 

Navigate to tab "Portfolio Data"
Selection from table RPM_OBJ_LINK

CL_RPM_OBJ_LINK_PERSIST
FETCH_FROM_DB
 SELECT *
    FROM rpm_obj_link
    INTO CORRESPONDING FIELDS OF TABLE et_attributes
    FOR ALL ENTRIES IN it_guid
    WHERE project_guid = it_guid-guid.

 

Back

  • No labels