Use this entry point to modify the quantity to allocate to a WO or EO material assigned to the purchase order.
There is one transaction in progress.
There is no open log file.
The PORDER ([F :POH], PORDERQ ([F :POQ]) tables are loaded when calling the entry point, as well as a component of the order from which this order originates (WO, EO or sales order):
The WALLQTY and WREQQTY work variables are loaded respectively with the quantity remaining to allocate for the order line and the received quantity.
In standard, the received quantity (WREQQTY) is allocated up to the limit of the quantity remaining to be allocated (WALLQTY), that is to say if the received quantity is greater than the ordered quantity, only the remaining quantity is allocated to this order line.
The quantity to allocate (WALLQTY) is calculated as follows:
For an order with direct invoicing:
Quantity to allocate = ordered quantity - allocated quantity - delivered quantity - invoiced quantity.
For the other orders:
Quantity to allocate = ordered quantity - allocated quantity - delivered quantity - invoiced quantity- quantity being delivered.
For example, to allocate the total produced quantity, it is necessary to initialize the quantity to allocate (WALLQTY) with the quantity received (WREQQTY).
Example of standard processing:
$ACTION
Case ACTION
When "CALWALLQTY" : Gosub CALWALLQTY
Endcase
Return
$CALWALLQTY
If WREQQTY-ENT_CUMALLQTY > WALLQTY
WALLQTY = WREQQTY - ENT_CUMALLQTY
[M:MLIK]LIKQTY = WALLQTY
Endif
Return
In the table below, the significant content flag indicates that the content is in phase with the context.
Table | Significant content | Table Title |
MFGHEAD | No | WO header |
MFGITM | Yes | Released product |
SCOHEAD | Non | EO header |
SCOITM | Yes | Released product |
PORDER | Yes | Purchase order |
PORDERQ | Yes | Purchase order - line |
In creation and cancellation of WO/subcontract orders, use this entry point to take over when managing the allocation on the order, in order, for example, to manage global allocations instead of detailed allocations.
There is one transaction in progress.
The PORDER ([F :POH], PORDERQ ([F :POQ]) tables are loaded when calling the entry point, as well as a component of the order from which this order originates (WO, EO or sales order):
Testing the value of the [M:MILK]MAJCOD variable (possible values "E" for receipt into stock and "S" for deletion) in order to identify the call context.
When receiving a purchase order ([M:MLIK]MAJCOD="E"), the WALLQTY and WREQQTY work variables are loaded respectively with the quantity remaining to be allocated for the order line and the received quantity.
When canceling a purchase order receipt ([M:MLIK]MAJCOD="S"), it is necessary to assign the SAV_WALLQTY variable with the deallocated quantity * -1 (quantity deallocated negatively).
In creation, SAV_WALLQTY is managed as standard.
When resuming the execution of the processing, the GPE global variable must be set to 1 to prevent the allocation creation or cancellation standard processing.
In the table below, the significant content flag indicates that the content is in phase with the context.
Table Significant content Table title MFGHEAD No WO header MFGITM Yes Released product SCOHEAD No WO header SCOITM Yes Released product SORDER Yes Sales order SORDERQ Yes Sales order line PORDER Yes Purchase order PORDERQ Yes Purchase order - line
Use this entry point to modify the quantity to allocate to a sales order assigned to the purchase order.
There is one transaction in progress.
There is no open log file.
The SORDER ([F :SOH ], SORDERQ ([F :SOQ]), PORDER ([F :POH] and PORDERQ ([F :POQ]) tables are loaded when calling the entry point.
The WQTERES and WREQQTY work variables are loaded respectively with the quantity remaining to be allocated for the order line and the received quantity.
In standard, the received quantity (WREQQTY) is allocated up to the limit of the quantity remaining to be allocated (WQTERES), that is to say if the received quantity is greater than the ordered quantity, only the remaining quantity is allocated to this order line.
The quantity to allocate (WQTERES) is calculated as follows:
For an order with direct invoicing:
Quantity to allocate = ordered quantity - allocated quantity - delivered quantity - invoiced quantity.
For the other orders:
Quantity to allocate = ordered quantity - allocated quantity - delivered quantity - invoiced quantity- quantity being delivered.
For example, to allocate the total produced quantity, it is necessary to initialize the quantity to allocate (WQTERES) with the quantity received (WREQQTY).
Example of standard processing:
$ACTION
Case ACTION
When "CALWALLQTY" : Gosub CALWALLQTY
Endcase
Return
$CALWALLQTY
If WREQQTY-ENT_CUMALLQTY > WQTERES
WQTERES = WREQQTY - ENT_CUMALLQTY
[M:MLIK]LIKQTY = WQTERES
Endif
Return
In the table below, the significant content flag indicates that the content is in phase with the context.
Table | Significant content | Table title |
SORDER | Yes | Sales order |
SORDERQ | Yes | Sales order line |
PORDER | Yes | Purchase order |
PORDERQ | Yes | Purchase order - line |
This entry point is located in the part of the processing which manages the stock allocation on a request (sales order, material requirement for internal or external production) upon a receipt into stock via receipt of a purchase order when a assignment exists between the request and the resource.
This entry point is voluntarily restricted in the case where the request assigned is a sales order.
There is one transaction in progress.
There is no open log file.
Upon calling the entry point, neither the assignment WIP, nor the assignment itself have been updated in the ORDERS ([F:ORDB]) and MTOLINK tables respectively.
Upon calling the entry point, the [M:MLIK] mask class is specified:
The call is carried out after the update of the sales order detail [SOQ] and before the update of the sales order header [SOH].
WQTE2 is the quantity that has been added to the allocated quantity in stock unit of the sales order line ([F:SOQ]ALLQTYSTU+=WQTE2).
In the table below, the significant content flag indicates that the content is in phase with the context.
Table | Significant content | Table title |
SORDER | Yes | Sales order |
SORDERQ | Yes | Sales order line |
SORDERP | Yes | Sales order - price |
PRECEIPTD | Yes | Receipt - line |
PORDERQ | Yes | Purchase order - line |
This entry point is called upon receipt of a sales order assigned to a sales order, be the assignment of back-to-back order or not.
In case of back-to-back order, [F:SOQ]FMI=3 & [F:SOQ]FMINUM=[F:POQ]POHNUM.