on 08-01-2008 3:41 PM
I have a SOAP interface with SAP BO 2005 by using the DI Server.
Now adding and updating sales orders goes fine. But the problem is when i want to remove some lines. If i have like 10 lines, and do an update with 9 lines, it overwrites the first 9 lines, but the 10th line is still there. It isn't removed. Is there a way to do this with the DI server?
I was able to do this using the DI service GetByParams and then removing the rows you want deleted from the DocumentLines node and finally doing an Update to commit the changes.
I'm using SAP/B1 2005B PL41.
Regards,
Albert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike,
Please refer to the SAP Business One SDK Help Center.
Go to DI Server -> SOAP Message Types -> DI Services -> Document Services.
The applicable SOAP messages are shown in GetQuotationsByKey and UpdateQuotation.
The technique is to use the GetByParams service to retrieve the document. From the response, we are only interested in the XML node <Document></Document>. Parse this to EXCLUDE the <DocumentLine></DocumentLine> node that corresponds to the line number of the item you wish to delete or remove.
The following is an example GetByParams response <Document></Document> node having 3 line items.
<Document>
...
<DocumentLines>
<DocumentLine>
<LineNum>0</LineNum>
...
</DocumentLine>
<DocumentLine>
<LineNum>1</LineNum>
...
</DocumentLine>
<DocumentLine>
<LineNum>2</LineNum>
...
</DocumentLine>
</DocumentLines>
...
</Document>If the 2nd line item (node containing <LineNum>1</LineNum>) is to be deleted, then the Document node should be
<Document>
...
<DocumentLines>
<DocumentLine>
<LineNum>0</LineNum>
...
</DocumentLine>
<DocumentLine>
<LineNum>2</LineNum>
...
</DocumentLine>
</DocumentLines>
...
</Document>Please note that no other changes to the Document node is made other than the exclusion.
The Document node may now be used in an Update service SOAP message request and when successful will remove the 2nd line item of the document.
I hope this helps.
Best regards,
Albert
Edited by: Albert Miles Enabe on Sep 25, 2008 2:51 PM
Hi,
This is an existing problem in DIServer and will be covered soon. Now I suggest using DI API (but don't update the sales order lines from XML) to avoid the problem.
Best regards,
Lin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
Yes of cource it will be not removed. (If you entering the same in standard B1 Client it is also removes? not).
You must have to call in DI API .Delete method to delete the line.
I do not know how to do it in DI Server, but i am suggesting to ask somebody at SAP. You can find names here also in SDN / or create a message.
Regards,
J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.