cancel
Showing results for 
Search instead for 
Did you mean: 

Delete line in RDR1 using DI SERVER

86yoa123
Discoverer
0 Kudos

Hello everyone:

I'M TRYING TO DELETE LINES FROM A SALES ORDER USING DI-SERVER, CREATE AND UPDATE VALUES AND CREATE A NEW LINE WORK PERFECT, BUT IF I DELETE A LINE (OMIT THE LINE TO REMOVE WHEN CREATE THE XML), DONT REMOVE FROM SAP THE LINE THAT I WANT TO REMOVE.


THIS IN AND EXAMPLE THE XML AND I AM SENDING TO DI SERVER:

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

<env:Header>

<env:SessionID>""SOME SESSION _ID</env:SessionID>

</env:Header>

<env:Body>

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

<BOM>

<BO>

<AdmInfo>

<Object>oOrders</Object>

<Version>3</Version>

</AdmInfo>

<QueryParams>

<DocEntry>9084</DocEntry>

</QueryParams>

<Documents>

<row>

<DocDate>2022-12-30T00:00:38.6208543Z</DocDate>

<DocDueDate>2022-12-30T00:00:38.6208547Z</DocDueDate>

<CardCode>999999</CardCode>

</row>

</Documents>

<Document_Lines>

<row>

<LineNum>0</LineNum>

<ItemCode>ppppppp</ItemCode>

<Quantity>4</Quantity>

<UnitPrice>5</UnitPrice>

</row>

</Document_Lines>

</BO>

</BOM>

</UpdateObject>

</env:Body>

</env:Envelope>

IN SAP I HAVE 2 LINES, AND IN THIS XML I OMIT THE 2ND LINE AND I HOPE THAT WHEN RUN THIS XML DELETE FROM SAP THE 2ND LINE.

I AM USING .NET AND SAP BUSINESS ONE 9.3

HAS ANYONE SEEN THIS KIND OF PROBLEMS ??

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi 86yoa123.,

As far as I know, DI server does not support removing row using UpdateObject function.

You will have to use the DocumentServices like OrdersService or QuotationsService, if you would like to remove the rows.

Check a sample request in the following post:

DI Server - delete method for lines

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

86yoa123
Discoverer
0 Kudos

Hi ANKIT CHAUHAN:

Thanks for answering me, based on you said, I need to delete sales order lines using DOCUMENT SERVICES, UPDATE OBJECT not support that option to delete, I am going to check that post.

Thanks so much again.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi 86yoa123.,

Yes, instead of Documents object use the DocumentServices like OrdersService or QuotationsService, if you would like to remove the rows.

Hope that the provided link helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support