POST

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
}

 

beasscript-logo-small

Create Reservation entry

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