Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
akhilanand0612
Participant
Hey mates,

During my journey for integration with S4/HANA, I happen to encounter one of the peculiar scenarios where we need to handle multiple entity set but the real amaze was to use the PATCH operation to update them at the target system. Upon browsing through different blogs and spending hours for looking out the resolution, I was left empty handed.

However, as you know, we need to resolve the issue so tried to dirty my hands with finding the solution and in the process, it was a great learning for me. I am sharing the below findings to help you if you encounter any similar scenario in future, it could be good help to you.

In blog post, we are making OData Batch Request with PATCH operations on multiple entity sets relates to Business Partner Entity.

To implement the scenario: Update in one entity set, also requires an update in another functionally related entity set.

As per the standard deliverables from SAP, we have pre-catered Business Partner API available. Please follow the link to get an overview of this API.

We need the capability to update the functionally related multiple entity set present under one parent entity and send them to API service in one HTTP request, furthermore, receive a single HTTP response with the response for all the entity set.

For this scenario, we are using the Business Partner API service which enables us to make batch processing.

Integration Flow:



The above integration flow steps are explained below:




  1. Create an i-flow with a trigger point as "Timer" to "Run Once".

  2. Add a content modifier to initialize the flow with a payload.

  3. You can add the payload in XML but in our case payload was in JSON hence we added an extra step as JSON to XML converter.

  4. Post converter, Since we are using three different entity sets, therefore, we multicast the payload to three different routes for message mapping. For the target mapping structure, we need to have their respective xsds. Steps to create the same are mentioned in following blog.

  5. After mapping to the target structure we need to combine all the entities set together hence we require to place a gather pallet function.

  6. Here comes, the main flavor of this blog viz. posting by $batch query using request-reply through OData Adapter.

  7. We need to capture the successful response from S4/HANA so we placed an attachment logger script at the end.




 

The output payloads from each message mapping are clubbed together using the Gather step:


 

ODATA Receiver Adapter Configuration:


In the Resource path, we need to mention $batch and Operation Details as POST:


 

Incoming Sample Payload:
{
"root": {
"BPGeneralMaster": {
"FKClient": "300",
"PKBusinessPartnerNum": "200024",
"BusinessPartnerCategory": "2",
"FKBusinessPartnerGrouping": "INCO",
"SearchTermOne": "Test CHANGE",
"SearchTermTwo": "Test UPD Two",
"CentralBlockForBusinessPartner": "true",
"NameOrganization": "Test UPD",
"OrganizationNameTwo": "qqq",
"OrganizationNameThree": "rrr",
"OrganizationNameFour": "sss",
"FKBpLegalFormOfOrganization": "01",
"FKIndustrySector": "02",
"FKNationality": "US",
"FKObsoleteFieldCntax": "US",
"FKCoutryOfOrigin": "US",
"FKBankCountryKey": "US"
},
"BPBankDetailsMaster": {
"FKClient": "300",
"PKFKBusinessPartnerNum": "200024",
"PKBankDetailsId": "0001",
"FKCountryRegionKey": "US",
"BankKey": "043000261",
"BankAcctNum": "0306931",
"BankControlKey": "01",
"BankReferenceDetails": "xyz",
"AcctHolderName": "qwerty",
"IndCollectionAuthorization": "true",
"NameOfBankAcct": "Axis",
"BankValidityStart": "2022-12-09",
"BankValidityEnd": "2022-12-09",
"InternationalBankAcctNum": "0011121122",
"BankAcctType": "001"
},
"BPRolesMaster": [
{
"PKBpRole": "FLCU00"
},
{
"PKBpRole": "FLVN00"
},
{
"PKBpRole": "FLVN01"
}
]
}
}

 

We have defaulted the method as PATCH in all the target mappings.

Note: We can perform Multiple operations such as PATCH, POST, etc on entities records at a time using $batch query. For our scenario, we needed only PATCH method.

Mapping Output after Gather step:
<?xml version='1.0' encoding='UTF-8'?>
<batchParts>
<batchChangeSet>
<batchChangeSetPart>
<method>PATCH</method>
<A_BusinessPartnerBank>
<A_BusinessPartnerBankType>
<BusinessPartner>200024</BusinessPartner>
<BankIdentification>0001</BankIdentification>
<BankCountryKey>US</BankCountryKey>
<BankNumber>043000261</BankNumber>
<BankControlKey>01</BankControlKey>
<BankAccountHolderName>qwerty</BankAccountHolderName>
<BankAccountName>Axis</BankAccountName>
<ValidityStartDate>2022-12-09</ValidityStartDate>
<ValidityEndDate>2022-12-09</ValidityEndDate>
<IBAN>0011121122</IBAN>
<BankAccount>0306931</BankAccount>
<BankAccountReferenceText>xyz</BankAccountReferenceText>
<CollectionAuthInd>X</CollectionAuthInd>
</A_BusinessPartnerBankType>
</A_BusinessPartnerBank>
</batchChangeSetPart>
<batchChangeSetPart>
<method>PATCH</method>
<A_BusinessPartner>
<A_BusinessPartnerType>
<BusinessPartner>200024</BusinessPartner>
<BusinessPartnerCategory>2</BusinessPartnerCategory>
<BusinessPartnerGrouping>INCO</BusinessPartnerGrouping>
<LegalForm>01</LegalForm>
<OrganizationBPName1>Test UPD</OrganizationBPName1>
<OrganizationBPName2>qqq</OrganizationBPName2>
<OrganizationBPName3>rrr</OrganizationBPName3>
<OrganizationBPName4>sss</OrganizationBPName4>
<SearchTerm1>Test CHANGE</SearchTerm1>
<SearchTerm2>Test UPD Two</SearchTerm2>
<BusinessPartnerIsBlocked>true</BusinessPartnerIsBlocked>
</A_BusinessPartnerType>
</A_BusinessPartner>
</batchChangeSetPart>
<batchChangeSetPart>
<method>PATCH</method>
<A_BusinessPartnerRole>
<A_BusinessPartnerRoleType>
<BusinessPartner>200024</BusinessPartner>
<BusinessPartnerRole>FLCU00</BusinessPartnerRole>
</A_BusinessPartnerRoleType>
</A_BusinessPartnerRole>
</batchChangeSetPart>
<batchChangeSetPart>
<method>PATCH</method>
<A_BusinessPartnerRole>
<A_BusinessPartnerRoleType>
<BusinessPartner>200024</BusinessPartner>
<BusinessPartnerRole>FLVN00</BusinessPartnerRole>
</A_BusinessPartnerRoleType>
</A_BusinessPartnerRole>
</batchChangeSetPart>
<batchChangeSetPart>
<method>PATCH</method>
<A_BusinessPartnerRole>
<A_BusinessPartnerRoleType>
<BusinessPartner>200024</BusinessPartner>
<BusinessPartnerRole>FLVN01</BusinessPartnerRole>
</A_BusinessPartnerRoleType>
</A_BusinessPartnerRole>
</batchChangeSetPart>
</batchChangeSet>
</batchParts>

 

XSD creation for target mapping structure:

As per the below screenshots, target structure xsds are created for PATCH operation on entities for the message mappings:

Bank XSD:


Business Partner XSD:


Role XSD:


Created 3 XSDs as below:

BP XSD:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="batchParts">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="unbounded" name="batchChangeSet">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="unbounded" name="batchChangeSetPart">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="method" xmlns=""/>
<xs:element type="xs:string" nillable="true" minOccurs="0" maxOccurs="1" name="uri" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="headers">
<xs:complexType>
<xs:sequence>
<xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="header">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="headerName" xmlns=""/>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="headerValue" xmlns=""/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element nillable="false" minOccurs="1" maxOccurs="1" name="A_BusinessPartner">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="A_BusinessPartnerType">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" maxOccurs="1" name="BusinessPartner">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="AcademicTitle">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="AuthorizationGroup">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerCategory">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerGrouping">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="CorrespondenceLanguage">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="FirstName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="FormOfAddress">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="Industry">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="InternationalLocationNumber1">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="7"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="InternationalLocationNumber2">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:boolean" nillable="true" minOccurs="0" maxOccurs="1" name="IsFemale" xmlns=""/>
<xs:element type="xs:boolean" nillable="true" minOccurs="0" maxOccurs="1" name="IsMale" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="IsNaturalPerson">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:boolean" nillable="true" minOccurs="0" maxOccurs="1" name="IsSexUnknown" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="GenderCodeName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="Language">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="LastName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="LegalForm">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="OrganizationBPName1">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="OrganizationBPName2">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="OrganizationBPName3">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="OrganizationBPName4">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="OrganizationFoundationDate" xmlns=""/>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="OrganizationLiquidationDate" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="SearchTerm1">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="SearchTerm2">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="AdditionalLastName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="BirthDate" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerBirthDateStatus">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerBirthplaceName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerDeathDate" xmlns=""/>
<xs:element type="xs:boolean" nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerIsBlocked" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerType">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="GroupBusinessPartnerName1">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="GroupBusinessPartnerName2">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="InternationalLocationNumber3">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="MiddleName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="NameCountry">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="NameFormat">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="PersonFullName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="80"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:boolean" nillable="true" minOccurs="0" maxOccurs="1" name="IsMarkedForArchiving" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BusinessPartnerIDByExtSystem">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="TradingPartner">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

 

Bank XSD
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="batchParts">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="unbounded" name="batchChangeSet">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="unbounded" name="batchChangeSetPart">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="method" xmlns=""/>
<xs:element type="xs:string" nillable="true" minOccurs="0" maxOccurs="1" name="uri" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="headers">
<xs:complexType>
<xs:sequence>
<xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="header">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="headerName" xmlns=""/>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="headerValue" xmlns=""/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element nillable="false" minOccurs="1" maxOccurs="1" name="A_BusinessPartnerBank">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="A_BusinessPartnerBankType">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="0" name="BusinessPartner">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="false" minOccurs="0" name="BankIdentification">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankCountryKey">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankNumber">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="15"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankControlKey">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankAccountHolderName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="60"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankAccountName">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="40"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="ValidityStartDate" xmlns=""/>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="ValidityEndDate" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="IBAN">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="34"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="IBANValidityStartDate" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankAccount">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="18"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="BankAccountReferenceText">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:boolean" nillable="true" minOccurs="0" maxOccurs="1" name="CollectionAuthInd" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="AuthorizationGroup">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

 

Role
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="batchParts">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="unbounded" name="batchChangeSet">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" minOccurs="1" maxOccurs="unbounded" name="batchChangeSetPart">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="method" xmlns=""/>
<xs:element type="xs:string" nillable="true" minOccurs="0" maxOccurs="1" name="uri" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="headers">
<xs:complexType>
<xs:sequence>
<xs:element nillable="true" minOccurs="0" maxOccurs="unbounded" name="header">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="headerName" xmlns=""/>
<xs:element type="xs:string" nillable="false" minOccurs="1" maxOccurs="1" name="headerValue" xmlns=""/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element nillable="false" minOccurs="1" maxOccurs="1" name="A_BusinessPartnerRole">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="unbounded" name="A_BusinessPartnerRoleType">
<xs:complexType>
<xs:sequence>
<xs:element nillable="false" maxOccurs="1" name="BusinessPartner">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element nillable="false" maxOccurs="1" name="BusinessPartnerRole">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="ValidFrom" xmlns=""/>
<xs:element type="xs:dateTime" nillable="true" minOccurs="0" maxOccurs="1" name="ValidTo" xmlns=""/>
<xs:element nillable="true" minOccurs="0" maxOccurs="1" name="AuthorizationGroup">
<xs:simpleType>
<xs:restriction base="xs:string" xmlns="">
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

 

Response from S4:
<batchPartResponse>
<batchChangeSetResponse>
<batchChangeSetPartResponse>
<headers>
<Accept></Accept>
<Accept-Language></Accept-Language>
<Content-Length>0</Content-Length>
<dataserviceversion>2.0</dataserviceversion>
</headers>
<statusInfo>No Content</statusInfo>
<contentId/>
<body />
<statusCode>204</statusCode>
</batchChangeSetPartResponse>
<batchChangeSetPartResponse>
<headers>
<Accept></Accept>
<Accept-Language></Accept-Language>
<Content-Length>0</Content-Length>
<dataserviceversion>2.0</dataserviceversion>
</headers>
<statusInfo>No Content</statusInfo>
<contentId/>
<body/>
<statusCode>204</statusCode>
</batchChangeSetPartResponse>
<batchChangeSetPartResponse>
<headers>
<Accept></Accept>
<Accept-Language></Accept-Language>
<Content-Length>0</Content-Length>
<dataserviceversion>2.0</dataserviceversion>
</headers>
<statusInfo>No Content</statusInfo>
<contentId/>
<body/>
<statusCode>204</statusCode>
</batchChangeSetPartResponse>
<batchChangeSetPartResponse>
<headers>
<Accept></Accept>
<Accept-Language></Accept-Language>
<Content-Length>0</Content-Length>
<dataserviceversion>2.0</dataserviceversion>
</headers>
<statusInfo>No Content</statusInfo>
<contentId/>
<body/>
<statusCode>204</statusCode>
</batchChangeSetPartResponse>
<batchChangeSetPartResponse>
<headers>
<Accept></Accept>
<Accept-Language></Accept-Language>
<Content-Length>0</Content-Length>
<dataserviceversion>2.0</dataserviceversion>
</headers>
<statusInfo>No Content</statusInfo>
<contentId/>
<body/>
<statusCode>204</statusCode>
</batchChangeSetPartResponse>
</batchChangeSetResponse>
</batchPartResponse>

 

 

Conclusion:

We need to ensure the important steps of multicast and using the entity-specific XSDs creation for the message mapping keeping in mind, the sub-level during field selection needs to be maintained at 0 at the OData adapter level.

The PATCH operation on the multiple entity set combined together to give rough patch in our journey, but we have sailed through the tough tides very smoothly using the above steps.

 

Happy Integration!
Labels in this area