cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using SAP ByDesign's OData API to update WorkplaceAddress

landerson
Explorer
0 Likes
751

My goal: be able to set the Work Email of a new hire via OData API.

I have created a Custom OData Service in our SAP BBD test environment. The service is uploaded from this example file:

https://github.com/SAP-samples/byd-api-samples/blob/main/Custom%20OData%20Services/khemployee.xml

I can confirm that the service is working -- using Postman, I am able to query employees, and I am also able to patch the emails of EXISTING users without issue.

My problem is that, when an employee is first hired, not only do they not have a Work Email address, but the "WorkplaceAddressCollection" node for their user does not even exist. And I do not know how to initiate/create this for an individual user.

Example: 
Existing user 264 has a WorkplaceAddressCollection ID of ADGEN34D53E6A974B31EDEBEEE2838C75057DC. If I reference that ObjectID with a PATCH call, am I able to modify the values with whatever I put in the body of my request: (https://xxxxxxxxx.sapbydesign.com/sap/byd/odata/cust/v1/khemployee/WorkplaceAddressCollection('ADGEN...

However, new user 419 has no WorkplaceAddressCollection or WorkplaceAddressInformation ObjectID yet, so I have nothing to reference when trying to insert a new Workplace EMail.

**Note: if there is a way to accomplish this via SOAP API instead, I'd prefer that, but I could not see any way to do so**

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

Hey,

Employee object behind scene probably has different associated objects for employment details.

Can you try standard SOAP webservice? Here's link to the ticket.

https://userapps.support.sap.com/sap/support/knowledge/en/2654330

Thanks,
Anand Shukla
anand@crossoverit.consulting
CrossOver IT Consulting Services LLP

landerson
Explorer
0 Likes
Hi Anand,
landerson
Explorer
0 Likes
Hi Anand, thanks for your reply. I think I can use this solution -- it would appear that the "ManageEmployeeIn2" is the module I would need. However, I am not able to find any documentation on this in the ByD SOAP docs (https://api.sap.com/package/BYD/soap). Can you help me find some documentation?
0 Likes

https://userapps.support.sap.com/sap/support/knowledge/en/3234367

Looks like documentation is not released. Usually Application User Management - Service Explorer documentation is provided.

Your best recourse is to configure comm scen, download WSDL, and playaround with request payload.
Thanks,
Anand Shukla
anand@crossoverit.consulting

landerson
Explorer
0 Likes
Yeah, I downloaded the WSDL but have not figured out how to modify the Workplace Address.
landerson
Explorer
0 Likes
Let me simplify my question: does anyone know how one can modify the workplace email address of an existing SAP user via API? It seems like it shouldn't be so complicated
landerson
Explorer
0 Likes
For anyone who might find it useful, here is the SAP ByDesign documentation for ManageEmployeeIn
landerson
Explorer
0 Likes
{{baseUrl}}/sap/ap/ui/repository/SAP_BYD_UI/HTML5/cp5.html?objname=II_MANAGE_EMPLOYEE_IN&type=PSM_ISI_R