Skip to Content
0
Jun 24 at 12:33 AM

Goods Change of Stock with SOAP - What is an External ID

145 Views Last edit Jun 24 at 01:23 AM 3 rev

hello.

I have one question about ByDesign SOAP API.

I would like to change stock in internal logistics using SOAP API.

You have specified the type of Communication Scenarios to use the SOAP API.

I created a Communication Arrangement and downloaded the WDSL file.

soap-통신시나리오en.png

soap-통신규약en.png

The WDSL file was imported from the SOAP UI tool and the following was written in the Requst of DoGoodsChangeOfStock.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a00="http://sap.com/xi/AP/CustomerExtension/BYD/A0014">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:GoodsAndActivityConfirmationGoodsConsumptionForChangeOfStock>
         <GoodsAndActivityConfirmation>
            <ExternalID>1</ExternalID>
            <SiteID>101</SiteID>
            <TransactionDateTime>2022-06-23T06:44:00.1234567Z</TransactionDateTime>
            <InventoryChangeItemGoodsConsumptionInformationForChangeOfStock>
               <ExternalItemID>110</ExternalItemID>
               <OwnerPartyInternalID>10000000</OwnerPartyInternalID>
               <SourceMaterialInternalID>110</SourceMaterialInternalID>
               <SourceInventoryRestrictedUseIndicator>false</SourceInventoryRestrictedUseIndicator>
               <SourceInventoryStockStatusCode>1</SourceInventoryStockStatusCode>
               <SourceIdentifiedStockID>4</SourceIdentifiedStockID>
               <SourceLogisticsAreaID>101-10</SourceLogisticsAreaID>
               <TargetMaterialInternalID>110</TargetMaterialInternalID>
               <TargetInventoryRestrictedUseIndicator>false</TargetInventoryRestrictedUseIndicator>
               <TargetInventoryStockStatusCode>1</TargetInventoryStockStatusCode>
               <TargetIdentifiedStockID>7</TargetIdentifiedStockID>
               <TargetLogisticsAreaID>101-10</TargetLogisticsAreaID>
               <InventoryItemChangeQuantity>
                  <Quantity unitCode="EA">2</Quantity>
                  <QuantityTypeCode>EA</QuantityTypeCode>
               </InventoryItemChangeQuantity>
            </InventoryChangeItemGoodsConsumptionInformationForChangeOfStock>
         </GoodsAndActivityConfirmation>
      </glob:GoodsAndActivityConfirmationGoodsConsumptionForChangeOfStock>
   </soapenv:Body>
</soapenv:Envelope>

I checked HTTP 200 OK by adding only the required data.

However, the stock has not been changed and the following error message continues to appear in the XML Response.

"No inventory items found for external id 1 item id 110"

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
   <soap-env:Header/>
   <soap-env:Body>
      <n0:GoodsAndActivityConfirmationGoodsChangeOfStockResponse xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:K7R:/1SAI/TAECBA0FE924AE3D5A93396:804">
         <Log>
            <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
            <Item>
               <TypeID>003(/APGAC_A2X_GM_MSG/)</TypeID>
               <CategoryCode>INC.BOI</CategoryCode>
               <SeverityCode>3</SeverityCode>
               <Note>No inventory items found for external id 1 item id 110</Note>
            </Item>
         </Log>
      </n0:GoodsAndActivityConfirmationGoodsChangeOfStockResponse>
   </soap-env:Body>
</soap-env:Envelope>


What is an external ID and what is an external item ID?

What I checked in the documentation is

- Though External ID field is mandatory, it is not used in creation of Goods and Activity Confirmation. It is only used for error handling purpose that is if an error occurs in creation of Goods And Activity Confirmation for any of the record in input message, the error message will be thrown indicating the External ID for which it failed.

- Significance of External Item ID is the same as that of External ID at root level explained above.

After seeing these explanations, I just thought of it as a value that I set arbitrarily.

Am I correct?

And,

- External Item ID. This is mandatory field.

- External ID. This field is mandatory.

Since both values are required values, API communication continues to fail.

let me know what my problem is, If anyone knows the answer, please reply.

Thank you.