/scripts/ahub.form.attachments.js
8

How to create locked batch numbers by di api

Apr 06, 2017 at 02:41 PM

105

avatar image

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

Regards,

10 |10000 characters needed characters left characters exceeded

This funcionality would be very useful to have - many times I have needed to update some property of a batch using the DI

1
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content