Reservation

Reservation

beas reservation list

 

Property

Description

Table

BEAS_RESERVATION_LINE

Primary key

DocEntry/i,LineNumber/i

$transaction

no

$branch

no

$mask

no

 

Fields

Name

Type

Description

DocEntry

Edm.Int32

LineNumber

Edm.Int32

DocDate

Edm.DateTimeOffset

ReservationType

Edm.String(1)

BaseType

Edm.String(2)

BaseDocEntry

Edm.Int32

BaseLineNumber

Edm.Int32

BaseLineNumber2

Edm.Int32

LinkType

Edm.String(1)

LinkDocEntry

Edm.Int32

LinkLineNumber

Edm.Int32

LinkLineNumber2

Edm.Int32

ItemCode

Edm.String(50)

WhsCode

Edm.String(20)

IVersion

Edm.String(20)

DistNumber

Edm.String(50)

SysNumber

Edm.Int32

BinCode

Edm.String(20)

RFID

Edm.String(20)

Quantity

Edm.Decimal

UoMStock

Edm.String(1)

SetQuantity

Edm.Decimal

SupplierBatchNumber

Edm.String(40)

StationId

Edm.String(50)

PersonnelId

Edm.String(20)

USER_ID

Edm.String(20)

SSCC

Edm.String(20)

 

Relations

Join to Entiy Object

Relation

Item

ItemCode

UoM

UoMCode=UoMStock

 

Functions

Function

Parameter

Description

UpdateReservationTransferDocument

DocEntry/i

 

 

POST

Follow example create a reservation for Work order 1014, Work order position 10, Material Position (Pos_id)=20 for Material RM for 5 Pcs on Warehouse 01

(Attention: The system don't check, if stock is available or if Material is reserved)

If you send the reservation the second time, the system add the quantity to first item

ODATA4/Reservation Body

{
"BaseType": "wo",
"BaseDocEntry":1344,
"BaseLineNumber":10,
"BaseLineNumber2":20,
"ItemCode":"RM",
"WhsCode":"01",
"Quantity":5
}
Return Status 201 with created document

 

ODATA4/Reservation linked to

{
"BaseType": "wo",
"BaseDocEntry":1344,
"BaseLineNumber":10,
"BaseLineNumber2":20,
"ItemCode":"RM",
"WhsCode":"01",
"Quantity":5
}
Return Status 201 with created document
{
"DocEntry": 39,
"LineNum": 1,
"LastLineNum": 1,
"LifeTime": "2022/03/07"
}
Docentry/LineNum = created reservation document

In BaseType you can define the base document. For Sales / PreInvoice you must define the line number in "BaseLineNumber2"

 

 

Automatic Reservation

With Property "automatic":true you can create automatically the reservation based on Batch Number / Serial number and Bin Code Priority
odara4/Reservation

{
"Automatic":true,
"BaseType": "wo",
"BaseDocEntry":1344,
"BaseLineNumber":10,
"BaseLineNumber2":20,
"WhsCode":"BEAS-BIN"
"ItemCode":"RMB",
"Quantity":50
}

 
In this case the system search for the Batches, which inside the Bin managed WareHouse "BEAS-Bin" with oldest Shelf life or production time (see configuration wizzard) and search, on which Bins this is available - Priority is the issue - order.

Note: Only beas Bin management supported

 

If you need more then one Batch, then beas create more then one Reservation line, example: 40* Batch 1 and 10*Batch 2
In the result you see the generated First and Last line (Property LastLineNum)

 

Return value:

{
"DocEntry": 39,
"LineNum": 1,
"LastLineNum": 4,
"LifeTime": "2022/03/07"
}

 

 

Working with SAP Pick and Pack List

You can link a reservation with LinkType="picklist", LinkDocEntry=Pick List PKL1.AbsEntry and LinkLineNumber=Pick List PLK1.PickEntry

if you create a reservation, you increment the pick quantity in the pick list.

The system don't insert Batch / Serial information or bin location inside the Pick list. Only the Picked quantity will be changed

 

Batch and Serial numbers

You can define Batch and Serial numbers with DistNumber or SysNumber. The SysNumber has higher priority

 

Example Json work with SysNumber or DistNumber

{
"BaseType": "wo",
"BaseDocEntry":1344,
"BaseLineNumber":10,
"BaseLineNumber2":20,
"ItemCode":"RM_B",
"WhsCode":"01",
"SysNumber":105,
"Quantity":5
}
 
{
"BaseType": "17",
"BaseDocEntry":1344,
"BaseLineNumber":0,
"BaseLineNumber2":1,
"ItemCode":"RM_B",
"DistNumber":"A111",
"WhsCode":"01",
"Quantity":5
}

 

Example with beasScript

instance bsl b
#define ls_json
{
"BaseType": "wo",
"BaseDocEntry":20190406,
"BaseLineNumber":10,
"BaseLineNumber2":10,
"ItemCode":"RM",
"WhsCode":"01",
"Quantity":5
}
#end
b.post=Reservation=<ls_json>
//messagebox=<b.ret_code> <b.ret_text> <b.ret_value>
destroy=b

 

Delete

Delete the reservation line

 

DELETE Rerservation(DocEntry,LineNumber)
 
Example
 
DELETE Reservation(1014,1)

 
This delete this Reservation line
Return 201 for ok
or 204 no content, if no entry found
if the reservation is linked to a pick list, then the picked quanity will be reduced with current reserved material from current reservation
beas ignore errors, if the pick list is not existing or change is not possible.