BatchNumber
Property |
Description |
Table |
OBTN |
Primary key |
ItemCode/c,SystemNumber/i |
$transaction |
no |
$branch |
no |
$mask |
For dropdown you can use follow mask definition: |
Name |
Type |
Description |
|
ItemCode |
Edm.String(50) |
|
|
SystemNumber |
Edm.Int32 |
|
|
DocEntry |
Edm.Int32 |
|
|
Batch |
Edm.String(36) |
|
|
BatchAttribute1 |
Edm.String(36) |
|
|
BatchAttribute2 |
Edm.String(36) |
|
|
Version |
Edm.String(36) |
|
|
Details |
Edm.String(8000) |
|
|
AdmissionDate |
Edm.DateTimeOffset |
|
|
ExpirationDate |
Edm.DateTimeOffset |
|
|
ManufacturingDate |
Edm.DateTimeOffset |
|
|
Status |
Edm.String(1) |
|
|
SelfProduction |
Edm.Boolean |
|
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
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