on ‎2023 Jul 07 6:56 PM
Hi All,
I am trying to use SAP ODATA v2 API to create a business partner (customer) in SAP S/4 HANA On-Prem. The ODATA service for Business Partner was activated by SAP admin and I can access the APIs. My understanding is if we create a business partner with role FLCU01 and provide to_Customer level fields, API will create a customer business partner. I guess I am mostly wrong so please correct me.
When I hit the API with the attached payload, I am getting success response, business partner gets created successfully and I can see the business partner fields in UI (HTML UI in browser). When I switch the role to 'FLCU01 Customer' to see the customer fields, I cannot see any to_Customer level fields or to_CustomerSalesArea level fields. Even in the attached API response, you can see only 'BusinessPartner' field is populated with value but 'Customer' field is empty. I confirmed with GET calls that customer is not created.
I also referred this page and used the sample request provided here, did minor changes and hit the API. Again, BP got created, no customer / vendor got created.
What am I doing wrong? Anything needs to be done by SAP admin to allow this deep entity insert (to_Customer)? Or my request is wrong? Could you please help?
Request clarification before answering.
https://me.sap.com/notes/3567506
As the synchronization from business partner to supplier/customer takes place only after the OData response is generated, even in a separate logical unit of work, the response is not capable of returning the new supplier/customer number during creation.
In this case, the only solution is to execute a new get request to receive the supplier/customer number.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried passing the validity dates in the to_BusinessPartnerRole?
"to_BusinessPartnerRole" : [
{
"BusinessPartnerRole" : "FLCU01",
"ValidFrom" : "\/Date(1451606400000+0000)\/",
"ValidTo" : "\/Date(253402300799000+0000)\/"
}
],
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.