CALWALLQTY: Modification of the quantity to be allocated to the sales order asso

This entry point is used to modify the quantity to be allocated to a sales order line in the case of production reporting for an affected work order.

 

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is no open log file.

Available screen and file classes

The MFGHEADTRK ([F :MTK], MFGITMTRK ([F :MKI]) , SORDER ([F :SOH]), and SORDERQ [F :SOQ] tables are loaded at the moment that the entry point is called.

 Use

The work variables WALLQTY and WREQQTY are loaded respectively with the quantity remaining to be allocated for the order line and the quantity produced under this production tracking.

As standard, the quantity produced (WREQQTY) is allocated up to the limit of the quantity remaining to be allocated (WALLQTY), that is to say if the quantity produced is greater than the ordered quantity, only the remaining quantity is allocated to this order line.

The quantity to be allocated (WALLQTY) is calculated as follows:

For an order with direct invoicing:

Quantity to be allocated = ordered quantity - allocated quantity - shipped quantity - invoiced quantity.

For the other orders:

Quantity to be allocated = ordered quantity - allocated quantity - shipped quantity - invoiced quantity- quantity in process of being shipped.

If, for example, the total quantity produced should be allocated, it is necessary to initialize the quantity to be allocated (WALLQTY) with the quantity produced(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

 

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (…).

Table

Significant content

Table Title

MFGHEADTRK

Yes

Tracking header

MFGITM

Yes

Released product tracking

SORDER

Yes

Sales order

SORDERQ

Yes

Sales order line

 

CUSTRTALL: Custom/specific management of the sales order allocation.

In the creation and cancellation of production reporting on the back-to-back works orders, this entry point is used to insert additional logic in the sales order allocation management, in order, for example, to manage global allocations instead of detailed allocations.

Context and operating mode

Transaction

There is one transaction in progress.

Log file
 
Available screen and file classes

The MFGHEADTRK ([F :MTK], MFGITMTRK ([F :MKI]) , SORDER ([F :SOH]), and SORDERQ [F :SOQ] tables are loaded at the moment that the entry point is called.

 Use

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.

In production reporting ([M:MLIK]MAJCOD="E"), the work variables WALLQTY and WREQQTY are loaded respectively with the quantity remaining to be allocated for the order line and the quantity produced under this production tracking.

In production reporting cancellation ([M:MLIK]MAJCOD="S"), it is necessary to assign the SAV_WALLQTY variable with the de-allocated quantity * - 1 (de-allocation quantity as a negative).

In creation, SAV_WALLQTY is managed as standard.

On exiting the entry point, the GPE global variable should be set to 1 to inhibit the standard processing of creation or the cancellation of detailed allocations.

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (…).

Table

Significant content

Table Title

MFGHEADTRK

Yes

Tracking header

MFGITM

Yes

Released product tracking

SORDER

Yes

Sales order

SORDERQ

Yes

Sales order line