on 2020 May 04 5:06 PM
Our middle ware is using API_BUSINESS_PARTNER ODATA service to pull BP address data from S/4HANA 1909 (on Premise) system. There are multiple addresses returned by the ODATA services for the entity A_BusinessPartnerAddress . How can the middle ware determine which one is the default address in S/4HANA ? What is the use of A_BuPaAddressUsage ? The validity end dates returned are not displaying proper date time stamps.
Can you suggest the best way to determine the BP default address using this ODATA service?
Thank you
Sanu
Dear Sanu,
Create an oData call to: API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='xxxx')?$expand=to_BusinessPartnerAddress,to_BusinessPartnerAddress/to_AddressUsage
You will need to expand to the "to_BusinessPartnerAddress/to_AddressUsage".
It will return the different address usages. Search for the entities:"to_AddressUsage/AddressUsage" with the value: "XXDEFAULT".
The current active standard address is where the current date is between "ValidityStartDate" and "ValidityEndDate"
"to_AddressUsage": {
"results": [ { "__metadata": { "id": "xxxx", "uri": "xxxx", "type": "API_BUSINESS_PARTNER.A_BuPaAddressUsageType" }, "BusinessPartner": "xxx", "ValidityEndDate": "/Date(253402300799000+0000)/", "AddressUsage": "XXDEFAULT", "AddressID": "xxx", "ValidityStartDate": "/Date(1582070400000+0000)/", "StandardUsage": false, "AuthorizationGroup": "" } ]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.