I've been working developing a Web Page to make Sales Orders in SAP using B1IF version 1 as my API to send the data to SAP. For the API I followed this tutorial to create a Scenario package for the API, there are a few steps for the Package to use, the one I'm using is the Root Tag method as shown in the tutorial. It works okay, I can add fields which are part of Sales Order as we can see in the tables ORDR and RDR1.
All the fields were working properly, until I tried to use "WhsCode" to select a Warehouse for the products, giving me an error:
Exception : Invoke of: GetBusinessObjectFromXML
Source:
Description: Property 'WhsCode' of 'DocumentLine' is invalid
-The di call #1 did fail.
This is the XML format I use to send the information to SAP:
<SalesOrder>
<Documents> <Row> <CardCode>LAL0012</CardCode>
<DocDueDate>20200615</DocDueDate>
<Comments>Some comments</Comments>
<NumAtCard>A RFC</NumAtCard>
<ShipToCode>Ship</ShipToCode>
<Series>222</Series> </Row>
</Documents>
<Document_Line> <Row> <WhsCode>A01-TAL</WhsCode>
<ItemCode>A00001</ItemCode>
<Quantity>1</Quantity>
<UnitPrice>100</UnitPrice>
</Row>
<Row>
<WhsCode>A01-TAL</WhsCode>
<ItemCode>A00002</ItemCode>
<Quantity>2</Quantity>
<UnitPrice>200</UnitPrice>
</Row> </Document_Line> </SalesOrder>
¿Can somebody help to resolve this problem?
Thanks