cancel
Showing results for 
Search instead for 
Did you mean: 

Removing batch allocation via SDK possible?

Former Member
0 Kudos
155

Hi all.

since 9.1 PL11 it is no more possible to remove batch allocations via sdk / xml. normally we do that via:


   If order.GetByKey(docEntry) Then

         order.Lines.BatchNumbers.

         ' Auftrag als XML holen

         sboCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode

         Dim xml = order.GetAsXML()

         Dim xDoc = XDocument.Parse(xml)

         ' Chargenreservierungen holen und entfernen

         Dim batchRows = (From x In xDoc.<BOM>.<BO>.<BatchNumbers>.<row> Select x).ToArray()

         For Each batchRow In batchRows

            batchRow.Remove()

         Next

         ' XML ohne Chargenreservierungen speichern

         xDoc.Save("order.xml")

         If order.UpdateFromXML("order.xml") <> 0 Then

            Console.WriteLine(sboCompany.GetLastErrorDescription())

         End If

      End If

See note 2286694.

Does anyone knows a different mathod to remove batch allocations on a document (SO e.g.)? We tried to set the order.lines.batchnumbers empty and the quantity to zero. does not work.

Thanks in Advance.

Andreas

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member233854
Active Contributor
0 Kudos

Hi Andreas,

Have a look in this thread

How to clear batch number assignment | SCN

Former Member
0 Kudos

Hi Danilo,

thank you for your replay... I found this thread, but as I said: Setting the quantity to zero is not the solution....

Andreas

former_member233854
Active Contributor
0 Kudos

There are more comments reagard this, there is a bug in SAP 9.1 and a SAP note mentioned there as well. In the SAP note, SAP says that it is not working properly, probably in the latest PL they fixed, or in the futures PLs

Former Member
0 Kudos

Exactly the same note I mentioned...  and in contrast to the note, the issue IS NOT solved in PL13 of 9.1 (and also not in PL03 in 9.2).

Thats the reason for my message here...