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

Internal Document Number for this reservation line

It's not linked to another document, it's only a internal numbering

Primary key

Database: "BEAS_RESERVATION_LINE"."DocEntry"

LineNumber

Edm.Int32

Internal Document Line Number for this reservation line

It's not linked to another document, it's only a internal numbering

Primary key

Database: "BEAS_RESERVATION_LINE"."LineNum"

DocDate

Edm.DateTimeOffset

Database: "BEAS_RESERVATION_LINE"."DocDate"

ReservationType

Edm.String(1)

Type of Reservation

S=Stock related

P=Planned (Example from Work order)

A=Archived (beas archive reservation, if this is comming from Planned work order)

Describe Reservation Type

Constraints:

Stock reservation=S

Planned reservation=P

Archive=A

Database: "BEAS_RESERVATION_LINE"."RESERVATIONTYPE"

BaseType

Edm.String(2)

This is the Document, for which the Reservation was created

Example for Work order

Type: "wo" for Work order or the SAP Object Id

 

Database: upper(rtrim("BEAS_RESERVATION_LINE"."BASE_TYPE"))

BaseDocEntry

Edm.Int32

This is the Document, for which the Reservation was created

Example for Work order (Table BEAS_FTHAUPT.BELNR_ID)

Or Sales Order (ORDR.DocEntry)

 

Assign to document

Workorder (BEAS_FHHAUPT.BELNR_ID) or Document example (ORDR.DocEntry)

Mandatory field

Database: "BEAS_RESERVATION_LINE"."BASE_DOCENTRY"

BaseLineNumber

Edm.Int32

Assign to document line

Workorder (BEAS_FTPOS.BELPOS_ID) or Document example (RDR1.LineNum)

Mandatory field

Database: "BEAS_RESERVATION_LINE"."BASE_LINENUM"

BaseLineNumber2

Edm.Int32

Assign to work order Bill of Material position

Workorder (BEAS_FTSTL.POS_ID)

Mandatory field

Database: "BEAS_RESERVATION_LINE"."BASE_LINENUM2"

LinkType

Edm.String(1)

Second Link, example Pick list

 

Picklist:

If you work with link to a Picklist, then beas change automatically the picked quantity in the pick list, if you make a reservation

beas use for this the DI API. It don't create a batch reservation or serial number reservation in SAP. It change only the picked quantity

Constraints:

Pick List=picklist

Work order=wo

 

Database: "BEAS_RESERVATION_LINE"."LINK_TYPE"

LinkDocEntry

Edm.Int32

Database: "BEAS_RESERVATION_LINE"."LINK_DOCENTRY"

LinkLineNumber

Edm.Int32

Database: "BEAS_RESERVATION_LINE"."LINK_LINENUM"

LinkLineNumber2

Edm.Int32

Database: "BEAS_RESERVATION_LINE"."LINK_LINENUM2"

ItemCode

Edm.String(50)

Entity Relation: Item -> ItemCode

Mandatory field

Database: "BEAS_RESERVATION_LINE"."ItemCode"

WhsCode

Edm.String(20)

Mandatory field

Database: "BEAS_RESERVATION_LINE"."WhsCode"

IVersion

Edm.String(20)

Database: coalesce("BEAS_RESERVATION_LINE"."Version",'')

DistNumber

Edm.String(50)

Dist Number from Batch / Serial related item

Database: coalesce("BEAS_RESERVATION_LINE"."DistNumber",'')

SysNumber

Edm.Int32

Database: coalesce(case when "OITM"."ManBtchNum"='Y' then "OBTN"."SysNumber" else "OSRN"."SysNumber" end,0)

BinCode

Edm.String(20)

Database: coalesce("BEAS_RESERVATION_LINE"."BINCODE",'')

RFID

Edm.String(20)

Database: coalesce("BEAS_RESERVATION_LINE"."RFID",'')

Quantity

Edm.Decimal

Mandatory field

Database: "BEAS_RESERVATION_LINE"."Quantity"

UoMStock

Edm.String(1)

Integration hub: Importable

Database: "OITM"."InvntryUom"

SetQuantity

Edm.Decimal

Database: "BEAS_RESERVATION_LINE"."SETQUANTITY"

SupplierBatchNumber

Edm.String(40)

Database: "BEAS_RESERVATION_LINE"."SUPPLIERBATCH"

StationId

Edm.String(50)

Created from Station Id

Not possible to change this

BSL: The name of client

Remote Terminal Server: The current Remote user

 

 

Database: "BEAS_RESERVATION_LINE"."STATION_ID"

PersonnelId

Edm.String(20)

The current Personnel Id

It is not possible to define this. The system use always current logged in Personnel Id

Linked table: BEAS_PERS

Linked column: PERS_ID

Database: "BEAS_RESERVATION_LINE"."PERS_ID"

USER_ID

Edm.String(20)

The current SAP User Id

It is not possible to change or define this. Always current User Id will be used

Database: "BEAS_RESERVATION_LINE"."USER_ID"

 

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.