POST

POST

 

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 does not check if stock is available or the Material is reserved)

If you send the reservation the second time, the system adds 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 searches for the Batches, which inside the Bin managed WareHouse "BEAS-Bin" with oldest Shelf life or production time (see Configuration wizard) and searches on which Bins this is available - Priority is the issue - order.

Note: Only Beas Bin management is supported.

 

If you need more than one Batch, Beas creates more than one Reservation line, example: 40* Batch 1 and 10*Batch 2
In the result you can 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 does not 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