SerialNumber
Property |
Description |
Table |
OSRN |
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 |
|
|
WarrantyStart |
Edm.DateTimeOffset |
|
|
WarrantyEnd |
Edm.DateTimeOffset |
|
|
Status |
Edm.String(1) |
|
|
SelfProduction |
Edm.Boolean |
|
Join to Entiy Object |
Relation |
Item |
ItemCode |
SerialNumberStock |
ItemCode,SystemNumber |
SerialNumber example GET query, that requests the ItemCode and ExpirationDate properties of all SerialNumbers:
/SerialNumber?$select=ItemCode,ExpirationDate
Response in JSON format:
{
"value": [
{
"ItemCode": "PROSERMBIN",
"ExpirationDate": "2011-05-03T00:00Z"
},
{
"ItemCode": "PROSERMBIN",
"ExpirationDate": "2011-05-03T00:00Z"
},
{
"ItemCode": "PROSERMBIN",
"ExpirationDate": "2011-05-03T00:00Z"
},
{
"ItemCode": "PROSERMBIN",
"ExpirationDate": "2011-05-03T00:00Z"
}
]
}
PUT
With follow code you can change an existing batch number
PUT SerialNumber("ItemCode",SysNumber)
PUT SerialNumber(DocumentNumber) // related to OSRN.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.
Example beas script
instance bsl b
b.post=SerialNumber("RM_S",10)<tab>{"InternalSerialNumber":"2349494"}
if <b.ret_code> <> 1 then
messagebox=error$$<b.ret_text>
end if