cancel
Showing results for 
Search instead for 
Did you mean: 

Remove a Selling Order item, using DI Server

Former Member
0 Kudos

Hi,

I work with SAP BO DI Server.

I create a new document "Selling Order" using DI Server application.

Now I need to Remove a row from this document using DI Server.

I see that there is a method called "RemoveObject", but this remove all the document object. How can I remove only a row (Item) from the document object?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use the command that updates the row with a quantity of zero.

Former Member
0 Kudos

Hi, I tried to update the quantity to 0, but does not work.

The server responds with this error :

<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  <env:Body>
    <env:Fault>
      <env:Code>
        <env:Value>env:Receiver</env:Value>
        <env:Subcode>
          <env:Value>-1029</env:Value>
        </env:Subcode>
      </env:Code>
      <env:Reason>
        <env:Text xml:lang="en">Impossible update field (ODBC -1029)</env:Text>
      </env:Reason>
      <env:Detail>
        <Object>17</Object>
        <ObjectIndex>1</ObjectIndex>
        <Command>UpdateObject</Command>
        <SessionID>775CAE11-C39C-4DDA-BB2A-B46D57AF896D</SessionID>
      </env:Detail>
    </env:Fault>
  </env:Body>
</env:Envelope>

I have sent to the DI-Server the command Soap :

<?xml version="1.0" encoding="UTF-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
  <env:Header>
    <SessionID>775CAE11-C39C-4DDA-BB2A-B46D57AF896D</SessionID>
  </env:Header>
  <env:Body>
    <dis:UpdateObject xmlns:dis="http://www.mio.com/SBO/DIS">
      <BOM>
        <BO>
          <AdmInfo>
            <Object>oOrders</Object>
          </AdmInfo>
          <QueryParams>
            <DocEntry>155</DocEntry>
          </QueryParams>
          <Document_Lines>
            <row>
              <LineNum>7</LineNum>
              <ItemCode>S610STW-220</ItemCode>
              <Quantity>0</Quantity>
              <WarehouseCode>PF</WarehouseCode>
            </row>
          </Document_Lines>
        </BO>
      </BOM>
    </dis:UpdateObject>
  </env:Body>
</env:Envelope>

Trinidad
Product and Topic Expert
0 Kudos

Hi Giacomo,

Have you tried B1WS tool? It should be much simpler.

http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/a0915b47-ef89-2a10-91a5-b22649e5cfab [original link is broken]

If you don't want to use B1WS mechanism you could at least install it in order to see the services b1WS is using and reproduce the SOAP message in your code (debugging B1WSHandler code).

Hope it helps

Trinidad.

Former Member
0 Kudos

I suggest checking the following:

1. Check with the docs to see that you give DI-Server all of the required fields to make the call.

2. Try to delete the row through the GUI. Maybe there is a reason the row can not be deleted.

Former Member
0 Kudos

Hi,

I do not know about DI server, But normally in the DI API we use the Document.Lines.Remove(),

Vasu Natari.

Trinidad
Product and Topic Expert
0 Kudos

Hi,

Have you tried what is proposed in the following thread? I'm not sure it will work, please let me know the results.

A way of doing it very easily is using B1WS tool (you can download it here in SDN for free).

With B1WS it is possible to remove lines in documents 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

Can I have an example of SOAP message to send to the DI-server for remove one row of the document .

Thanks