cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create Portfolio Item and cProject Link

Former Member
0 Kudos

Auto creation of PPM. 

Successful steps as follows:

1)      * copy project from template
 
call function 'BAPI_BUS2172_COPY'

2)  * Update new project with unique field values
 
call function 'BAPI_BUS2172_CHANGE'

3)  * Commit CProject Updates
 
call function 'BAPI_CPROJECTS_COMMIT_WORK'

4)  "Create Portfolio Item
 
call function '/RPM/ITEM_MODIFY'

5)  "Display Portfolio Item in Edit Mode
 
call function '/RPM/ITEM_DISPLAY'

6)  "Update Portfolio Item
 
call function '/RPM/ITEM_MODIFY'

7)      * Commit Portfolio Updates

  call function '/RPM/SAVE_WITH_COMMIT'

How do I create link between Portfolio Item and Project?

Please be specific on steps needed and necessary parameter values.

I’ve been supplied several function modules and methods like using object Link 0INMCPROJECT and method Create_object_link, and I still have not had success.

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Finally got this to work using a modified version of the standard function RPM_CREATE_OBJ_LINK. The modifications were:

1) "Initialize RPM Object Type" (do a select on DPR_OBL_OBTYP instead of the method call)

2) "Check and validate object in the proxy" (just commented it out)

3) "Check the proper state of the project" (commented it out)

4) Call it in simulation mode.

Calling in simulation mode was done because the program short dumped with a MESSAGE_TYPE_X error when the Save_Changes method was called. Oddly, despite the dump, the link was actually saved properly. Since the function no longer does the save, the following function is now called immediately after the modified RPM_CREATE_OBJ_LINK.

/RPM/SAVE_CHANGES

The dump I received was not very helpful as it related to a situation we were not in - namely calling a commit while in the middle of a commit block. According to the SAP developers I was working with, some customers have this problem and some don't. Anyway, here is the dump info:

MESSAGE_TYPE_X

Error analysis

    Short text of error message:

    COMMIT WORK during ON COMMIT or ON ROLLBACK

"MESSAGE_TYPE_X"

"CL_DPR_TRANSACTION_MANAGER====CP" or "CL_DPR_TRANSACTION_MANAGER====CM009"

"ON_TRANSACTION_FINISHED"

So with the changes listed above, I now have a function that I can call to link a portfolio item to a cproject (PPM project) with a save step at the end.

Hope this helps,

Ryan Kane

Answers (3)

Answers (3)

Former Member
0 Kudos

I understand it is a very very late response. But still... I feel it might help somebody who would be wandering for a solution on the same issue ( as I was looking for one but couldn't find...! ).

Finaly I could achieve it (creating the Object Link with Item), & it is so simple..! check it out:

Use F.M /RPM/OBJECT_LINK_MODIFY. All I got to do was, maintain the IV_CHANGE_MODE as "C" and very importantly, in IS_CONTEXT OBJECT_TYPE should be passed as OAG. Following this FM execute /RPM/SAVE_CHANGES FM for committing the changes...!

It worked for mE...!

Chill fellaas......!

Santhosh

Former Member
0 Kudos

Hi,

The SAP note "1699048 - Unexpected short dumps in ST22" might helpful about the dump.

Regards.

Piyush R. Sakharkar.

Former Member
0 Kudos

HI ,

  Use the method MODIFY of the class /RPM/CL_OBJECT_LINK_API.

Thanks

Mahesh

Former Member
0 Kudos

You should be able to establish the link between item and cProject as long as you have set the assignment on the item > relationship tab > related objects > assign Project.

hope this helps.

NK