cancel
Showing results for 
Search instead for 
Did you mean: 

DI Server - delete method for lines

greg_neilson
Explorer
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member830523
Discoverer
0 Kudos

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>

dimantha747
Explorer
0 Kudos

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.

greg_neilson
Explorer
0 Kudos

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.

Former Member
0 Kudos

Hi Greg,

Did you get a resolution to your investigation for deleting sales order lines through DI server?

Regards

Carl

greg_neilson
Explorer
0 Kudos

Hi Carl,

Unfortunately it looks like there's no way to do it through the DI Server. We haven't implmented the functionality into our system yet, but the only way it seems to do it is to use the DI API to do this.

Cheers,

Greg

Former Member
0 Kudos

Hi Greg,

Not all partners have been given this green light. If your company is one of the partner on the list, you should have enough information already. If not, check this thread for more info:

Thanks,

Gordon

greg_neilson
Explorer
0 Kudos

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

Former Member
0 Kudos

We are in process of developing the DI-Server to update Sales Orders. I believe starting 2007A (and enhanced with PL48) you can use "0" quantity to delete rows or batches. I do not know if it also works on production orders.

greg_neilson
Explorer
0 Kudos

Art, that's interesting. Have you got any more details on this? I just tried to delete a line on a Sales Order via the DI Server by using a zero quantity, and got the familiar "Zero quantity is not allowed" error back. This is on 2007A SP01 PL05.

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

Former Member
0 Kudos

Hi Greg,

I think the previous post is correct, we are using the b1sw to simplify the process. I am not sure if it's the DI-Server or the b1sw that hast he tools to remove batches. I have asked our programmer to verify and will post back.

Former Member
0 Kudos

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