There is an open log file
This entry point is called in the net requirements calculation (MRP and MPS) on reading with the lock on each record in the ORDERS table for the creation of the calculation header work file.
Variable | Definition |
Class [F:CBH] | Contains the data being processed (Site, product...) |
Class [F:ORD] | Contains the ORDERS record |
Integer variable I | Set to I = 0 to process the order Set to I = 1 to ignore the order |
Requirements calculation starting stock
There is one transaction in progress
There is an open log file
This entry point is called before the posting of each record in the CBNHEA ([F:CBH]) table.
The starting stock field is already calculated and it can be modified depending on the context.
Variable or mask | Definition |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
Non-standard calculation of the coverage for all the buckets.
There is one transaction in progress
There is an open log file
This entry point is called on the calculation of the coverage for the products concerned.
All the requirements calculation tables
[CBH] Work file header loaded
[ITF] Product-site loaded
Variables on entry
WNBBUC Number of buckets
WNBJOU Number of days processing (End date - starts date +1)
WBUCDEB(0..WNBBUC-1) Bucket start date grid
WBUCFIN(0..WNBBUC-1) Bucket end date grid
WQTY(0..WNBJOU-1) Requirements grid day by day
I Indicator = 0
Variables to be returned
WCOUV(0..WNBBUC-1) Coverage grid by bucket
I = 0 If the standard calculation should be carried out
I <> 0 If the coverage grid has been loaded by the entry point
Processing start for a site
There is no transaction in progress
There is an open log file
This entry point is called in the net requirements calculation (MRP and MPS) after reading the requirements calculation parameters (PARMRP table) and before loading the parameters in work variables. The contents of the record can be modified in order for other setup values to be taken into account.
Variable | Definition |
WPRO | Contains 1 if MPS Contains 2 if MRP |
Class [F:PCB] | Contains the site parameters |
All the requirements calculation tables
Entry point before posting each record in the work table CBNHEA / PDPHEA
There is one transaction in progress
There is an open log file
This entry point is called in the net requirement calculation (MRP and MPS) after loading the class buffer [CBH].
The records in the CBW table (work table for the expired lots) have already been written.
Variable classes | Definition |
Class [F:CBH] | Contains the data giving arise to the posting |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
Entry point before the posting of each record in the work table CBNDET / PDPDET
There is one transaction in progress
There is an open log file
Different call cases
This entry point is called in the net requirement calculation (MRP and MPS) after loading the class buffer [CBH] from the ORDERS table.
Variable classes | Definition |
Class [F:CBH] | Contains the header data for the processed product |
Class [F:CBD] | Contains the buffer giving rise to the posting |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
Entry point before posting each suggestion in the work table CBNDET / PDPDET
There is one transaction in progress
There is an open log file
This entry point is called in the net requirement calculation (MRP and MPS) after loading the class buffer [CBH] for each purchase or production suggestion.
The buffer is loaded with the exception of the 'start date', 'end date' and 'requirement date' fields. The WDATS variable contains the reference date for the creation of the suggestion (requirement date), it can be modified to have an affect on the suggestion dates.
Variable classes | Definition |
Class [F:CBH] | Contains the header data |
Class [F :ITF] | Contains the product-site management data |
Class [F:CBD] | Contains the buffer giving rise to the posting (except the date fields) |
Date variable WDATS | Contains the reference date for the creation of the suggestion.This date can be modified to have an impact on the suggestion dates. |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
Entry point at the end of phase 4
Transaction
There is one transaction in progress
Log file
There is an open log file
Different call cases
This entry point is called at the end of phase 4 (generation of the CBNDET table). It makes it possible, for example, to warn the user of the end of this phase by sending a message.
Classes and available variables
Variable classes | Definition |
Class [F:CBH] | Contains the data giving arise to the posting |
WPRO | Contains 1 if MPS Contains 2 if MRP |
Open tables
All the requirements calculation tables
Entry point at the end of phase 6
There is one transaction in progress
There is an open log file
This entry point is called at the end of phase 6 (update of the ORDERS file). It makes it possible, for example, to warn the user of the end of this phase by sending a message.
Variable classes | Definition |
Class [F:CBH] | Contains the data giving arise to the posting |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
Possibility to modify the quality control lead-time for the works orders.
There is one transaction in progress
There is an open log file
This entry point is called in the net requirement calculation (MRP and MPS) at the time of the write to the detail work file ([F :CBD], just after having recovered the quality control lead-time for the orders of the types WOF and WOP.It is used to modify the value of the lead-time, via the assignment of the work variable "Q".
Variable | Definition |
Class [F:CBH] | Contains the data being processed (Site, product…) |
Class [F:ORD] | Contains the ORDERS record |
Variable integer Q | Contains the QC lead-time. If required assign another value to this variable. |
All the requirements calculation tables
Possibility to modify the quantity to be reordered.
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of net requirements (MPS and MRP) during the phase of the suggestions calculation for products managed in stock.It is used to intervene in the quantity to be reordered.
In all the cases, the standard process takes control of applying any loss and to generate the corresponding suggestion(s) whilst respecting the reorder strategy (net/economic quantity, sub-division...).
Variable | Definition |
Class [F:CBH] | Contains the data being processed (Site, product …) |
Variable decimal WBES | Contains the quantity to be reordered calculated as standard. If required assign another value to this variable. |
All the requirements calculation tables
Possibility to replace the standard application mode for the seasonality of the safety stock.
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of net requirements (MPS and MRP) during the phase of the suggestions calculation.It is used to intervene in the application of seasonality to safety stock.
In all the cases, the standard process takes control of applying any loss and to generate the corresponding suggestion(s) whilst respecting the reorder strategy (net/economic quantity, sub-division...).
Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product…) |
Class [F :ITF] | Contains the data for the product/site processed |
Date variable WDAT | Contains the start date for the bucket concerned |
Variable decimal WSAISON | This variable must be loaded with the calculated safety stock |
Global variable GPE | To be set to 1 to inhibit the standard seasonality application. |
All the requirements calculation tables
This entry point is used to add WIPs for additional products
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of net requirements (MPS and MRP) at the end of the product WIP loading phase. It is used to integrate additional WIPs, for instance coming from another site.
Example of an addition algorithm:
###########################################################################
$ACTION
Case ACTION
When "XTRA_ORD" : Gosub XTRA_ORD
Endcase
Return
#---------------------------------------------------------------------
$XTRA_ORD
Filter [ORD] Where STOFCY = "XXX" &
& ITMREF = [F:CBH]ITMREF &
& FMI < 2 &
& WIPSTA < 4
& Order By Key ORD1
For [ORD]
Readlock [ORD] Curr
If fstat = 0
I = 0
If [F:ORD]ENDDAT <= WCALDATF
If I = 0
# Important: reset the site on [ORD] because of the transclass [CBD] = [ORD] in TRT_ORD
[F:ORD]STOFCY = [F:CBH]STOFCY
Gosub TRT_ORD From FUNCBN
If GOK <>1
Break
Endif
Endif
Endif
Else
GOK = -1
Break
Endif
Next
Filter [ORD]
Return
Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product...) |
Class [F :ITF] | Contains the data for the product/site processed |
This entry point is used to take into consideration the preparation lead-time within the framework of the calculation of the suggestions dates.
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of the net requirements (MPS and MRP) during the phase of the suggestion date calculation.
Example of an algorithm to take the preparation lead-time into account:
$ACTION
Case ACTION
When "SUGREQAVA" : Gosub SUGREQAVA
Endcase
Return
$SUGREQAVA
Case [F:ITF]REOCOD
When 3,5 : # suggested work order
WDATR = WDATF
If [F:ITF]PRPLTI = 0
WDATF = WDATR
Else
WCOR = 8
WCOD = 2
WDEL = [F:ITF]PRPLTI
Call CALDAT("-",WCOR,WDATR,WCOD,WDEL,WCAP,WCALDATD,WDATF) From CBNLIB
Endif
When Default : # suggested purchasing order/intersite order
Endcase
Return
Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product...) |
Class [F :ITF] | Contains the data for the product/site processed |
This entry point is used to intervene after the suggestion calculation for each product and before the WIP update (ORDERS).
For example, it can be used to control, modify or delete the PDPDET and CBNDET work tables before the update.
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of net requirements (MPS and MRP) after the phase of the suggestions calculation for products managed in stock.It is used to intervene before the WIP update (Update of the ORDERS table from the PDPDET/CBNDET tables following the processing)
All the requirements calculation tables
Possibility to replace the standard application mode for the seasonality of the safety stock.
There is one transaction in progress
There is an open log file
The GREPLANNING variable is used to identify where this entry point is called:
- "RPL_INIT" at the beginning of the replanning processing for a given site
- "RPL_TRTSUGITM" suggestion calculation for a product
- "RPL_CUMSTODIS" calculation of total stock available
- "RPL_CALSUGSTO" suggestion calculation of product in stock
Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product…) |
Class [F :ITF] | Contains the data for the product/site processed |
All the requirements calculation tables
Make the buckets preparation specific, and/or avoid standard corrections.
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of the net requirements (MPS and MRP) after loading the parameters. It is used to avoid the standard calculation of buckets correction by activating the parameter GPE>0.
Variable | Definition |
Class [F:CBH] | Contains the data being processed (Site, product...) |
Class [F:ORD] | Contains the ORDERS record |
Integer variable I | Set to I = 0 to process the order Set to I = 1 to ignore the order |
Entry point at the end of phase 5
There is one transaction in progress
There is an open log file
This entry point is called at the end of phase 5 (suggestions calculation). For example, it allows to add specific WOS in CBNDET before generating WIPs.
Variable classes | Definition |
Class [F:CBH] | Contains the data giving arise to the posting |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
This entry point is used to add the "With Nohint" instruction when performance problems occur on the Link instruction between the [F:ITM] and [F:ITF] tables.
It is called in the FUNCBN processing.
There is one transaction in progress
There is an open log file
This entry point is called in the net requirement calculation, immediately before the loop on products with the MRP/MPS reorder mode.
The GPE variable is used.It is set to the value 0 by default.It will need to be set to 1 in the specific/custom process linked to the entry point if the user wants to add this "With Nohint" instruction in the used query.
Classes and available variables
Variable | Definition |
Class [F:CBH] | Contains the data being processed (Site, product...) |
Class [F:ORD] | Contains the ORDERS record |
Integer variable I | Set to I = 0 to process the order Set to I = 1 to ignore the order |
This entry point is used to avoid "Readlock ... Delete" that are too long on a large database, and to use the single-user mode instead with a global lock of the PUR_TABLES_MONO tables involved.
It is called in the FUNCBN processing.
There is one transaction in progress
There is an open log file
This entry point is called in the calculation of the net requirements immediately before deleting the previous results.
The GPE variable is used.It is set to the value 0 by default.It will need to be set to 1 in the specific/custom process linked to the entry point if the user wants to use the single-user mode with a global lock on the tables involved.
Classes and available variables
Variable | Definition |
Class [F:CBH] | Contains the data being processed (Site, product...) |
Class [F:ORD] | Contains the ORDERS record |
Integer variable I | Set to I = 0 to process the order Set to I = 1 to ignore the order |
This entry point is used to take over the suggestions generation in order to perform a split, like a distribution over several suppliers.
It is called in the FUNCBN processing.
There is no transaction in process.
There is an open log file
This entry point is called in the calculation of the net requirements immediately before generating a suggestion in the calculation tables.
The following variables are available:
WSUG suggestion quantity
WDATS Suggestion date
WNBR Number of fraction according to reorder policy
WSTO Stock balance for the current calculation
Source example
This entry point is used to take over on the rtz of the Safety stock variable.
It is called in the FUNCBN processing, when the "Match safety stock" parameter is set to the "on 1st requirement" value, only on the 1st bucket and if WBESBUC=0.This means that there is no requirement, or that this requirement is covered or allocated on the available stock.
There is one transaction in progress
There is an open log file
Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product…) |
Class [F :ITF] | Contains the data for the product/site processed |
All the requirements calculation tables
Requirements calculation starting stock
There is one transaction in progress
There is an open log file
This entry point is called before the start stock adjustment, if the physical stock was requested.
The adjustment consists in ignoring the packing slips/picking tickets which are pending validation.
The activation of variable GPE=1 allows to skip the start stock adjustment and switch back to V5 operating mode, with all the allocations being deducted from the available stock.
Variable or mask | Definition |
WPRO | Contains 1 if MPS Contains 2 if MRP |
All the requirements calculation tables
This entry point is used to control and/or correct data before generating the requirement in the CBNDET or PDPDET table.
There is one transaction in progress
There is an open log file
This entry point is called during the calculation of net requirements (MRP and MPS) just before inserting the requirement in the MRP/MPS result (2 calls).
The GPE variable is used.It is set to the value 0 by default.It must be set at 1 in the specific process linked to the entry point if the current line must not be posted.
The variables that can be modified/accessed are in the [F:CBD1] buffer.
Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product…) |
Class [F :ITF] | Contains the data for the product/site processed |
This entry point is used to control and/or correct data before generating the requirement in the CBNDET or PDPDET table.
There is one transaction in progress
There is an open log file
This entry point is called during the MRP calculation (MRP and MPS) once the suggestion start and end dates have been calculated ($CALDATSUG).
The variables that can be modified/accessed are WDATD = suggestion start date and WDATF = suggestion end date..Variable | Definition |
Class [F:CBH] | Contains the data currently being processed (Site, product...) |
Class [F :ITF] | Contains the data for the product/site processed |
There is one transaction in progress
There is an open log file
This entry point is called during MRP and MPS before each quality control stock miscellaneous resource is created ($CTL_STO)
The entry point is positioned immediately before the Write [CBD]
Variable GPE can be modified: GPE = 0 creates the resource, GPE <> 0 does not create the resource. Values of fields in the [F:CBD] class (Detail net need calculation) can be modified before resource creation for example quantity and required date
Setting GOK < 1 will stop the transaction
There is one transaction in progress
There is an open log file
This entry point is called during MRP and MPS immediately after the starting stock is calculated for a versioned product. The entry point can be used to reorganise the calculated starting stock for example: to assign the total starting stock across all versions to one particular version (the latest version).
The starting stock for each version is in WECCSTODIS(n) and the corresponding major and minor version is in WECCVALMAJ(n) and WECCVALMIN(n). Where n = max. number of versions (activity code ECCMX).
Setting GOK < 1 will stop the transaction.
This entry point provides the option to ignore all products (sites) in the MRP process where the Reorder mode = "Not managed". For these products no record will be written to the CBNHEA table (MRP header) - this will, potentially, increase performance.
Note: for manufactured products where these 'ignored' products appear as components in the BOM then an extra database read is performed - this will, potentially, decrease preformance.
Transaction
There is one transaction in progress
Log file
There is an open log file
Available variable
Integer WREOMGT Set to 0 (default) to include all products in the MRP process. Set to 1 to ignore all products (sites) in the MRP process where the Reorder mode = "Not managed".