on 10-13-2009 3:30 PM
Hi,
Recently, support has been added to the DI API for deleting lines (e.g. production order lines, or item warehouse info for items, etc).
Has this support also been added to the DI Server? If so, how do we access it?
Regards,
Greg
This problem is solved in three steps:
1.- READ the document using GetbyParams:
<?xml version="1.0" encoding="UTF-16UCS-4"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<SessionID>1F6C7E11-CC5B-A5F3-0206-D1F4A8B9D84A</SessionID>
</env:Header>
<env:Body>
<dis:GetByParams xmlns:dis="http://www.sap.com/SBO/DIS">
<Service>QuotationsService</Service>
<DocumentParams>
<DocEntry>1</DocEntry>
</DocumentParams>
</dis:GetByParams>
</env:Body>
</env:Envelope>
2.- MODIFY the document (ONLY delete the LineNum 1):
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<dis:GetByParamsResponse xmlns:dis="http://www.sap.com/SBO/DIS">
<Document>
...
<DocumentLines>
<DocumentLine><LineNum>0</LineNum>...</DocumentLine>
<DocumentLine><LineNum>2</LineNum>...</DocumentLine>
</DocumentLines>
<DocumentAdditionalExpenses/>
</Document>
</dis:GetByParamsResponse>
</env:Body>
</env:Envelope>
3.- UPDATE the document:
<?xml version="1.0" encoding="UTF-16UCS-4"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<SessionID>93E41C6E-2091-1B9B-36BC-7CE94EDC677E</SessionID>
</env:Header>
<env:Body>
<dis:Update xmlns:dis="http://www.sap.com/SBO/DIS">
<Service>QuotationsService</Service>
<Document>DOCUMENT HERE</Document>
</dis:Update>
</env:Body>
</env:Envelope>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Greg,
I also come a cross similar situation where I have multiple Items in sales order /sales quotation.
and customer should be able to delete/remove one or more items from "open" order.
DI Server is the integration mechanism.
tried by sending 0 quantities but it is not working with DI server
so did you implement solution or have an idea how to do ?
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guys, there's some useful info in here, thanks.
Art, it sounds like you're referring to removing batches on lines in documents as opposed to removing the lines themselves. Removing batches in this way may well work, I'll have to try it and it may be useful to us, but I wanted to remove the lines themselves in a document (specifically a Sales Order).
Trinidad, I'll go an investigate the undocumented services. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gordon,
Thanks for replying, but that wasn't quite what I was asking. You pointed me at a thread advertising a session about altering the DB directly, which although interesting, isn't what I wanted to know.
I want to know if on a general basis, not on a case by case one, if the recently introduced functionality in the DI API is available in the DI Server. Does anyone have any information on this?
Cheers,
Greg
Edited by: Greg Neilson on Oct 19, 2009 10:59 AM
Hi Greg,
I haven't tried to remove lines with DI Server by using the UpdateObject command but I don't think it is possible, maybe you can ask confirmation to support whether it is possible or not and how to proceed.
With B1WS it is possible as it is using the new services infrastructure (that is not documented in the help file).
Just have a look to the B1WS services list and check whether the object you need to use is available.
If it is available then you have 2 options in order to do it:
1. Use directly B1WS (much easier to develop as it gives you webreferences and you work with objects)
2. You install B1WS and have a look to the wsdl or the xml format sent by B1WS in order to reproduce the same SOAP message in your code (it is using services that correspond to each one of the objects in the DI API).
Hope it helps
Trinidad.
Greg,
This is what the programmer responded with:
"We delete batches by updating an order object and setting the quantity of the batch for the line item to 0. Then we call the update command.
The update command is from DIServer. B1WS is like a passthrough for DIServer and has no real data commands of its own. It makes programming DIServer much easier."
As I said previously I believe these tools became available in SAP 2007, or maybe after SAP 2007 PL47
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.