Skip to Content
0
Former Member
Nov 11, 2008 at 09:43 AM

problem about DI API for Purchase Delivery Notes

824 Views

Hi All,

I want to create a Purchase Delivery Notes with DI API. The version of DI API and SBO is 2007.

I use the following example to explain my problem:

1. Create a item, item code is ITEM-A, it is a serialization item.

2. Create a Purchase Delivery Notes for ITEM-A. Create a two new serial #: SN1 and SN2.

3. Create a Purchase Goods Return for ITEM-A. Let SN1 and SN2 go out the stock.

4. Create a Purchase Delivery Notes for ITEM-A again, the document is created by DI API. The document have two lines for same item ITEM-A. The first line is for SN1, the second line is for SN2.

5. After saving, the table that Purchase Delivery Notes Detail have two records. But, the SRI1 table just have one record SN2.

Please see the slice of DI API XML:

<Document_Lines>

<row>

<LineNum>0</LineNum>

<ItemCode>ITEM-A</ItemCode>

<ItemDescription>Item A</ItemDescription>

<WarehouseCode>REPLACE</WarehouseCode>

<DiscountPercent>0</DiscountPercent>

<Quantity>1.00</Quantity>

<UnitPrice>0</UnitPrice>

<Address>asdfa</Address>

<ShippingMethod>-1</ShippingMethod>

<FreeText>a3adf895-0b56-4eb3-9ffb-cb9e5b5b8c3f</FreeText>

</row>

<row>

<LineNum>1</LineNum>

<ItemCode>ITEM-A</ItemCode>

<ItemDescription>Item A</ItemDescription>

<WarehouseCode>REPLACE</WarehouseCode>

<DiscountPercent>0</DiscountPercent>

<Quantity>1.00</Quantity>

<UnitPrice>0</UnitPrice>

<Address>asdfa</Address>

<ShippingMethod>-1</ShippingMethod>

<FreeText>83a4773f-d0e6-447e-b1c2-582844fdd37b</FreeText>

</row>

</Document_Lines>

<SerialNumbers>

<row>

<InternalSerialNumber>SN1</InternalSerialNumber>

<SystemSerialNumber>1</SystemSerialNumber>

<BaseLineNumber>0</BaseLineNumber>

</row>

<row>

<InternalSerialNumber>SN2</InternalSerialNumber>

<SystemSerialNumber>3</SystemSerialNumber>

<BaseLineNumber>1</BaseLineNumber>

</row>

</SerialNumbers>

Please help me.

Thanks.

Liu Ming