BatchNumber

BatchNumber

 

Property

Description

Table

OBTN

Primary key

ItemCode/c,SystemNumber/i

$transaction

no

$branch

no

$mask

For dropdown you can use follow mask definition:
1: Batch,Version,BatchAttribute1,BatchAttribute2
You can define follow filter:
&$filter=ItemCode eq
 

 

Fields

Name

Type

Description

ItemCode

Edm.String(50)

Entity Relation: Item -> ItemCode

Database: "OBTN"."ItemCode"

SystemNumber

Edm.Int32

Database: "OBTN"."SysNumber"

DocEntry

Edm.Int32

Database: "OBTN"."AbsEntry"

Batch

Edm.String(36)

Database: "OBTN"."DistNumber"

BatchAttribute1

Edm.String(36)

Database: "OBTN"."MnfSerial"

BatchAttribute2

Edm.String(36)

Database: "OBTN"."LotNumber"

Version

Edm.String(36)

Database: "OBTN"."U_beas_ver"

Details

Edm.String(8000)

Database: "OBTN"."Notes"

AdmissionDate

Edm.DateTimeOffset

Database: "OBTN"."InDate"

ExpirationDate

Edm.DateTimeOffset

Database: "OBTN"."ExpDate"

ManufacturingDate

Edm.DateTimeOffset

Database: "OBTN"."MnfDate"

Status

Edm.String(1)

Database: "OBTN"."Status"

SelfProduction

Edm.Boolean

Database: "OBTN"."U_beas_selfprod"

 

Relations

Join to Entiy Object

Relation

Item

ItemCode

BatchNumberStock

ItemCode,SystemNumber

 

BatchNumber example GET query, that requests all BatchNumber properties filtered by primary keys ItemCode and SystemNumber:

/BatchNumber("po_batchauto",988)

 

BatchNumber support UDF fields and  GET and PUT command

 

 

Response in JSON format:

{
    "value": {
        "ItemCode": "po_batchauto",
        "SystemNumber": 988,
        "Batch": "import-1",
        "BatchAttribute1": "import1-info",
        "BatchAttribute2": "",
        "Version": "",
        "Details": "",
        "AdmissionDate": "2016-05-19T00:00Z",
        "ExpirationDate": "",
        "ManufacturingDate": "2016-12-01T00:00Z",
        "Status": "0",
        "SelfProduction": true
    }
}

 

 

 

PUT

With follow code you can change an existing batch number

PUT BatchNumber("ItemCode",SysNumber) 
PUT BatchNumber(DocumentNumber)   -> related to OBTN.AbsEntry

 

PUT command support database field names too. You can use same (wrong) field names as described in SAP SDK documentation, same field names in SerialNumber object or the current database field names.

UDF's supported

 

 

beasscript-logo-small

Example

instance bsl b
b.put=BatchNumber("RM_B",10)<tab>{"Status":"1"}
if <b.ret_code> <> 1 then
  messagebox=error$$<b.ret_text>
end if