Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

API exposed by Service Layer

0 Likes
743
  • SAP Managed Tags

Good morning,

I have to update a stage of a subproject. To do this I use, from Service Layer API Reference, ProjectManagementService.

This API enables me to invoke the interfaces defined on 'ProjectManagementService'.

I invoke the method 'UpdateSubproject' on this service by specifying the payload 'PM_SubprojectDocumentData' in the JSON format.

POST ProjectManagementService_UpdateSubproject

with this json,
{

"PM_SubprojectDocumentData":

{ ... }

}

This method work if my stage don't have document. "PMS_DocumentsCollection": []

in particular PMS_DocumentsCollection.length = 0

This method don't work if my stage have documents. "PMS_DocumentsCollection": [...]

in particular PMS_DocumentsCollection.length > 0

and return this error

{

"error": {

"code": -5002,

"message": {

"lang": "en-us",

"value": "StageID is invalid. [PHA4.StageID][line: 1]"

}

}

}

Does it exist a different method to update a stage with documents connected?

Can you help me?

Good morning,

I have to update a stage of a subproject. To do this I use, from Service Layer API Reference, ProjectManagementService.

This API enables me to invoke the interfaces defined on 'ProjectManagementService'.

I invoke the method 'UpdateSubproject' on this service by specifying the payload 'PM_SubprojectDocumentData' in the JSON format.

POST ProjectManagementService_UpdateSubproject

with this json,
{

"PM_SubprojectDocumentData":

{ ... }

}

This method work if my stage don't have document. "PMS_DocumentsCollection": []

in particular PMS_DocumentsCollection.length = 0

This method don't work if my stage have documents. "PMS_DocumentsCollection": [...]

in particular PMS_DocumentsCollection.length > 0

and return this error

{

"error": {

"code": -5002,

"message": {

"lang": "en-us",

"value": "StageID is invalid. [PHA4.StageID][line: 1]"

}

}

}

Does it exist a different method to update a stage with documents connected?

Can you help me?

1 REPLY 1
Read only

lenastodal
Product and Topic Expert
Product and Topic Expert
672
  • SAP Managed Tags

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with our Q&A Tutorial: https://developers.sap.com/tutorials/community-qa.html, as it provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond: https://www.youtube.com/watch?v=46bt1juWUUM
Many thanks!

Keep in mind, when you receive an answer that was helpful to you, accept it as best answer.


Join or subscribe to SAP Community Groups to stay up-to-date, including SAP TechEd Group.