avatar image
Former Member

How to create locked batch numbers by di api

Hi all, I wrote a code that generates a Purchase Delivery Notes document by DI api.

When i populate the .BatchNumbers property of document lines, i cannot set the batch number State (OBTN.State) and SAP create it in "released" state.

In some cases i need to create it in "locked" state. I did not find any property to set the status, nor any documentation on how to do this in the ref DI documentation.

How can i get the batchnumbers to be created with state other than "released"?

We know it can be modified manually through the Batch Details edit form but it does not fit our needs.

Code snippet:

With oPDN_Lines

If (Not isFirst) Then .Add() Else isFirst = False

.ItemCode = "ItemCode"

.Quantity = 1

.UoMEntry = 1

.RequiredDate = Now

.WarehouseCode = 1

With .BatchNumbers

.BatchNumber = "1234"

.ManufacturerSerialNumber = "4567"

.Quantity = 1

.AddmisionDate = Now

.ExpiryDate = Now

.Notes = "comment"

'THERE IS NO PROPERTY For Status???????????

End With

End With

Any help would be much appreciated, thanks


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers

Skip to Content