cancel
Showing results for 
Search instead for 
Did you mean: 

How to do submit multiple transaction in single JSON envelope via HANA Service Layer.

divyanshuvyas
Explorer
0 Kudos

Team,

Currently we are using DI-Server to submit various transactions to SAP. In one of our business case we are submitting two transactions simultaneously in one XML envelop & it works successfully. If any one of the transactions rollbacks, then other transaction will not submit to SAP.

Example: Allocating lots on Sales Order, After picking new lot for a pick list via DI SERVER

See following two transactions in one XML Envelope OF DI Server which is working fine.

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <env:Header>
      <MsgHeader xmlns="http://www.sap.com/SBO/DIS">
         <SessionID>$$SESSIONID$$</SessionID>
         <ServiceName>PickListsService</ServiceName>
      </MsgHeader>
   </env:Header>
   <env:Body>
      <dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
         <BOM>
            <BO>
               <AdmInfo>
                  <Object>oOrders</Object>
               </AdmInfo>
               <QueryParams>
                  <DocEntry>134</DocEntry>
               </QueryParams>
               <Document_Lines>
                  <row>
                     <ItemCode>Orange Juice</ItemCode>
                     <LineNum>0</LineNum>
                  </row>
               </Document_Lines>
               <BatchNumbers>
                  <row>
                     <BatchNumber>Orange Juice07</BatchNumber>
                     <ManufacturerSerialNumber />
                     <InternalSerialNumber />
                     <Quantity>10.000000</Quantity>
                     <BaseLineNumber>0</BaseLineNumber>
                  </row>
               </BatchNumbers>
               <SerialNumbers />
            </BO>
         </BOM>
      </dis:UpdateObject>
      <dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
         <BOM>
            <BO>
               <AdmInfo>
                  <Object>oPickLists</Object>
               </AdmInfo>
               <QueryParams>
                  <Absoluteentry>17</Absoluteentry>
               </QueryParams>
               <PickLists>
                  <row>
                     <UseBaseUnits>tNO</UseBaseUnits>
                     <U_PICKFROMWMS>Y</U_PICKFROMWMS>
                     <Name>manager</Name>
                     <Remarks>Pick From BatchMaster WMS :</Remarks>
                  </row>
               </PickLists>
               <PickLists_Lines>
                  <row>
                     <OrderEntry>134</OrderEntry>
                     <OrderRowID>0</OrderRowID>
                     <PickedQuantity>10.000000</PickedQuantity>
                     <U_REASONCODE />
                     <BaseObjectType>17</BaseObjectType>
                  </row>
               </PickLists_Lines>
               <BatchNumbers>
                  <row>
                     <BatchNumber>Orange Juice07</BatchNumber>
                     <ManufacturerSerialNumber />
                     <InternalSerialNumber />
                     <Quantity>10.000000</Quantity>
                     <BaseLineNumber>0</BaseLineNumber>
                  </row>
               </BatchNumbers>
               <SerialNumbers />
               <DocumentLinesBinAllocations>
                  <row>
                     <BinAbsEntry>1</BinAbsEntry>
                     <Quantity>10</Quantity>
                     <AllowNegativeQuantity />
                     <SerialAndBatchNumbersBaseLine>0</SerialAndBatchNumbersBaseLine>
                     <BaseLineNumber>0</BaseLineNumber>
                  </row>
               </DocumentLinesBinAllocations>
            </BO>
         </BOM>
      </dis:UpdateObject>
   </env:Body>
</env:Envelope>
<br>

With respective to above example, How I can achieve the same logic in HANA Server Layer ?.

I have gone through various documentation regarding Batch Posting with service layer, but in case of service layer if one of the transaction rollback then other transaction does not rollback.

Kindly do the needful

Thanks

Regards

Divyanshu Vyas.

divyanshuvyas
Explorer
0 Kudos

Team,

Your earlier response for above will be much appreciated.

Can any-one help us ??

Best Regards

Divyanshu VYas

Accepted Solutions (0)

Answers (0)