Skip to Content
Author's profile photo Amit Singh

PPM: Create Item Version Snapshot When the Portfolio Item Status is changed

Dear Friends,

I recently came across a requirement to create Item Version snapshot when the Portfolio Item Status is changed to Approved/Rejected and update the notes tab with approvers Comments. I searched SDN Forum but couldnot find any content for this. I decided to create a small blog to list down the function modules and tables which can be used to meet the requirement.

Solution: To track the Portfolio Item status change I used BADI RPM_PROJ_CUST_FIELDS, Interface method CUST_PROJ_ON_COMMIT_CHANGES.

1. To Create snap Shot: We can use Function Module /RPM/ITEMS_VERS_CREATE_SYNCH which calls method CREATE_ITEMS_VERSION of Class /RPM/CL_ITEM_D_API and subsequently calls function Module /RPM/SAVE_CHANGES to save the version.

We need to pass parameters; Portfolio Item GUID, Version Type (01 for snapshot) and Version Name like ‘TEST’ to create Snapshot using above function module.

2. To update Notes tab with the Approvers Comments: We need to use Function Module “/RPM/COMMENTS_MODIFY” and Pass the Item Version GUID.

This function Module Internally calls method MODIFY_COMMENTS of class /RPM/CL_OBJECT_API.

Following the function module /RPM/COMMENTS_MODIFY we need to calls function Module /RPM/SAVE_CHANGES to Save the comments.

Feel free to post your queries on this 🙂 or if you feel that above information is helpful.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Friends,

      Recently we had a similar requirement where we need to automate snapshots creation on change of project status of specific type,  as the BAPI's were not Updating the data correctly in case there are multiple status changes and the data is not saved on every status change, we did used the SAP standard Class and Methods to achieve this and this was a perfect solution as the data to internal views were also getting updated instantaneously. Our Solution was :

      Solution Using Classes and Methods:

      Step 1. Pass the Project Number to ls_Action-parameters field:

           GET REFERENCE OF <Variable for Project Number> INTO ls_action-parameters.

      Step 2. Set the Version to ls_action GUID field:

           ls_action-guid = <Variable for Snapshot Version>.

      Step 3. Set Action Key as below

        ls_action-action_key = 'VERSION_SNAP'.

      Step 4. Append the Lines to lt_actions internal table and pass them to Attribute MT_ACTION (Store Actions in Component Controller).

           APPEND ls_action TO lt_actions.

           wd_this->mt_action = lt_actions[].

      and finally start change manager events

      * start change manager

        cl_dpr_ui_event_source=>start_report_change_events(  ).

      Author's profile photo Former Member
      Former Member

      Thanks for the useful information


      Author's profile photo Former Member
      Former Member

      Hello Amit,Mohit,

      I have used same function module to create snapshot but data is blank in cost allocation tab.

      Do you have any idea about this?