SAP Odata Connector: Error Adding Address Type

0
I've got the SAP OData connector working well when creating a business partner. I've noticed that when creating a new business partner, all the child objects (eg addresses) can be created and associated to the partner and then only one call is made and the entire business partner (including al these child elements like addresses) are added.   When updating the business partner it seems you have to have to update each entity individually (ie creating a new address for an existing partner, you have to make a call to create the address, another call to retrieve the address id, and another call to create the address usage).   I'm doing this to add a new addresses for business partners for a new address type and it adds the address but when I make a call to add the new address usage for that address I get this error (despite the validitiy dates being fine and exactly the same as when I set them during the creation process)   "code":"R11/245","message":"Error for validity periods of address usages"   All the SAP articles dealing with this message suggest that I'm adding a new DEFAULT address that conflicts with the validity period of the existing DEFAULT address. This is not the case. I'm adding a new address and adding a newly created address usage "we named it CP0001" as the usage type.   The event to create the usage looks like this. The same address ID was used to create the address. This is the same validity address expression I used for the address. And again, when I add a new business partner and I create the address and address usage, this is the same "code" below.       I've tried doing this with ONE call to create the new address, and setting the address usage associated before the call. Same message. It doesn't seem to matter if I make two calls (one for address, one more usage) or if I try to do it all with one call (to create the address, associating the usage before)
asked
1 answers
0

Hello,

 

When creating a BP, SAP handles validity dates for address + usage internally, so it works. But when updating, the API expects you to pass exactly matching validity periods on both the address and the address usage. Even a small difference will trigger the  error.

The fix is to make sure the start/end dates you send for the address and for the usage are identical, or send them together in one deep PATCH call so SAP can align them in one go.

 

Regards

Reemali

answered