cancel
Showing results for 
Search instead for 
Did you mean: 

DISERVER Update Order Problem (DI-SERVER DI SERVER UPDATING oOrders)

Former Member
0 Kudos

Hi,

I am trying to update an order with DiServer, and am although the code is not crashing, the update is not being reflected in the database. Can you please help me understand what the problem is?

The XML is:


<?xml version="1.0" encoding="UTF-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Header>
  <SessionID>F33324B4-09BA-4AEC-9B23-936BFDFC0E88</SessionID>
 </env:Header>
 <env:Body>
  <dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
   <BOM>
    <BO>
     <AdmInfo>
      <Object>oOrders</Object>
     </AdmInfo>
     <QueryParams>
      <DocEntry>6</DocEntry>
     </QueryParams>
     <Document_Lines>
      <row>
       <ItemCode>ZZZ-CHO</ItemCode>
       <Quantity>3</Quantity>
      </row>
     </Document_Lines>
    </BO>
   </BOM>
  </dis:UpdateObject>
 </env:Body>
</env:Envelope>

Your help is much appreciated.

Thank you,

Mike

Cygnusoft

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mike,

You may try this:

<?xml version="1.0" encoding="UTF-16"?>

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">

<env:Header>

<SessionID>4B1A5E5F-355F-40A2-9010-66A32793CB86</SessionID>

</env:Header>

<env:Body>

<dis:Update xmlns:dis="http://www.sap.com/SBO/DIS">

<Service>OrdersService</Service>

<Document>

<DocEntry>6</DocEntry>

<DocNum>1005</DocNum>

<DocDate>20060919</DocDate>

<DocDueDate>20061002</DocDueDate>

<CardCode>COL</CardCode>

<CardName>COLO-PAC PRODUCE</CardName>

<DocumentLines>

<DocumentLine>

<LineNum>0</LineNum>

<AcctCode>_SYS00000001264</AcctCode>

<ItemDescription>Sample</ItemDescription>

<ItemCode>ZZZ-CHO</ItemCode>

<Quantity>3</Quantity>

<Price>2.000</Price>

</DocumentLine>

</DocumentLines>

</Document>

</dis:Update>

</env:Body>

</env:Envelope>

Best regards,

Lin

Former Member
0 Kudos

Hi Lin,

Thank you, I will try it. We've also been able to get this to work:


<?xml version="1.0" encoding="UTF-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Header>
  <SessionID>F33324B4-09BA-4AEC-9B23-936BFDFC0E88</SessionID>
 </env:Header>
 <env:Body>
  <dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
   <BOM>
    <BO>
     <AdmInfo>
      <Object>oOrders</Object>
     </AdmInfo>
     <QueryParams>
      <DocEntry>80081</DocEntry>
     </QueryParams>
     <Document_Lines>
      <row>
       <ItemCode>GA10</ItemCode>
      </row>
     </Document_Lines>
    </BO>
   </BOM>
  </dis:UpdateObject>
 </env:Body>
</env:Envelope>

It turns out that the problem was a data-validation process in B1. The order I was trying to update was closed, and it seems that B1 won't allow updates on closed order. This appears to be rational behaviour, and "user error"

Thank you so much for your help!

Mike

Former Member
0 Kudos

Hi,

I have also tried this XML combination, with the same results of nothing being written to the database:


<?xml version="1.0" encoding="utf-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
	<env:Header>
		<SessionID>4B1A5E5F-355F-40A2-9010-66A32793CB86</SessionID>
	</env:Header>
	<env:Body>
		<dis:UpdateObject xmlns:dis="http://www.sap.com/SBO/DIS">
			<BOM>
				<BO>
					<AdmInfo>
						<Object>oOrders</Object>
					</AdmInfo>
					<QueryParams>
						<DocEntry>6</DocEntry>
					</QueryParams>
					<Documents>
						<row>
							<DocNum>1005</DocNum>
							<DocDate>20060919</DocDate>
							<DocDueDate>20061002</DocDueDate>
							<CardCode>COL</CardCode>
							<CardName>COLO-PAC PRODUCE</CardName>
						</row>
					</Documents>
					<Document_Lines>
						<row>
							<AcctCode>_SYS00000001264</AcctCode>
							<ItemDescription>Sample</ItemDescription>
							<ItemCode>ZZZ-CHO</ItemCode>
							<Quantity>3</Quantity>
							<Price>2.000</Price>
						</row>
					</Document_Lines>
				</BO>
			</BOM>
		</dis:UpdateObject>
	</env:Body>
</env:Envelope>

Your help is appreciated!

Thank you,

Mike

Edited by: Michael Gurevich on Sep 12, 2008 2:20 AM

Edited by: Michael Gurevich on Sep 12, 2008 2:21 AM