Process FUNCBN: FUNCBN
LECORD: Reading an ORDERS record
Filter on the orders in process in the net requirements calculation.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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.
Available classes and variables
| Class or 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. |
STRSTO: Starting stock calculation
Requirements calculation starting stock.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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.
Available variables
| Variable | Definition |
|---|---|
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
CALCOUV: Coverage calculation
Non-standard calculation of the coverage for all the buckets.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called on the calculation of the coverage for the products concerned.
Available variables
Variables on entry:
| Variable | Definition |
|---|---|
| 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:
| Variable | Definition |
|---|---|
| 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. |
Open tables
All the requirements calculation tables.
| Class | Definition |
|---|---|
| [CBH] | Work file header loaded. |
| [ITF] | Product-site loaded. |
AFTREAPCB: Read of calculation parameters
Processing start for a site.
Context and operating method
Transaction
There is no transaction in progress.
Log file
There is an open log file.
Different call cases
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.
Available classes and variables
| Class or variable | Definition |
|---|---|
|
Class [F:PCB] |
Contains the site parameters. |
|
WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
BEFWRICBH: Before writing work table header
The entry point is called before posting each record in the CBNHEA and PDPHEA work tables.
Context and operating method
Transaction
There is one transaction in progress.
Log file
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 [CBH] class buffer.
The records in the CBW table (work table for the expired lots) have already been written.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] | Contains the data giving arise to the posting. |
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
BEFWRICBD: Before writing work table detail
The entry point is called before the posting of each record in the CBNDET and PDPDET work tables.
Context and operating method
Transaction
There is one transaction in progress.
Log file
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 [CBH] class buffer from the ORDERS table.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] | Contains the data giving arise to the posting. |
| Class [F:CBD] | Contains the buffer giving rise to the posting. |
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
CRESUG: Suggestion creation in work table
The entry point is called before posting each suggestion in the CBNDET and PDPDET work tables.
Context and operating method
Transaction
There is one transaction in progress.
Log file
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 [CBH]class buffer for each suggestion of type Purchase or Production.
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.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] | Contains the header data. |
| Class [F:ITF] | Contains the products-sites 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. |
ENDSTEP4: After phase 4 (generation of the MRP detail file)
The entry point is called at the end of the generation of the CBNDET table (phase 4).
Context and operating method
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 allows warning the user through messages. For example, it warns the user of the end of this phase by sending a message.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] | Contains the data giving arise to the posting. |
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
ENDSTEP6: After phase 6 (update of the WIP)
The entry point is called at the end of update of the WIP (phase 6).
Context and operating method
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 6 (update of the ORDERS file).
It allows warning the user through messages. For example, it warns the user of the end of this phase by sending a message.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] | Contains the data giving arise to the posting. |
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
CUSMODLTI: Modification of the quality control lead-time for the work orders
The possibility to modify the quality control lead-time for the works orders.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] |
Contains the data being processed (Site, Product...). |
| Class [F:ORD] | Contains the ORDERS record. |
| Integer variable Q |
Contains 1 if MPS. Contains 2 if MRP. |
MRPQTYSUG: Modification of the quantity to reorder
The possibility to modify the quantity to be reordered.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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 suggestions, while respecting the reorder strategy (net or economic quantity, sub-division etc.).
Available classes and variables
| Class or 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. |
COR_STOSEC: Application of the seasonal nature of the safety stock
The possibility of replacing the standard application mode for the seasonality of the safety stock.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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 suggestions, while respecting the reorder strategy (net or economic quantity, sub-division etc.).
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] | Contains the data being processed. |
| Class [F:ITF] | Contains the data for the product or site processed. |
| Date variable WDAT | Contains the start date for the bucket concerned. |
| Variable decimal WSAISON |
This variable needs to be loaded with the calculated safety stock. |
| Global variable GPE | To be set to 1 to inhibit the standard seasonality application. |
XTRA_ORD: Taking into account of the WIP for additional products
This entry point is used to add WIPs for additional products.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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 example, adding WIPs 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
Available classes and variables
| Class | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| Class [F:ITF] |
Contains the data for the product or site processed. |
SUGREQAVA: Preparation lead-time taken into account
This entry point is used to take into consideration the preparation lead-time within the framework of the calculation of the suggestions dates.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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
Classes and variables available
| Class | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| Class [F:ITF] |
Contains the data for the product or site processed. |
CHECK_CBNDET: Control before update of WIPs
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.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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 and CBNDET tables, following the processing).
REPLANNING: Before suggestion replanning
The possibility to replace the standard application mode for the seasonality of the safety stock.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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.
Available classes and variables
| Class | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| Class [F:ITF] |
Contains the data for the product or site processed. |
LOAD_BUCKET: Before buckets correction
To make the buckets preparation specific and avoid standard corrections.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
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 GPE > 0 parameter.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently 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. |
ENDSTEP5: After phase 5 (suggestions calculation)
This entry point is called at the end of suggestions calculation (phase 5).
Context and operating method
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 5 (suggestions calculation).
For example, this entry point allows to add specific WOS records into CBNDET before WIPs are generated.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
NOHINT: Optimization of the ITM-ITF link
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.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called in the net requirement calculation, immediately before the loop on products with the MRP and MPS reorder mode.
The GPE variable is used and is set to 0 by default. Set the GPE to 1 in the specific or custom process linked to the entry point to add the With Nohint instruction in the used query.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently 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. |
NOLOCK: Optimization of previous results deletion
This entry point avoids long Readlock and Delete operations on large databases by using single‑user mode with a global lock on the PUR_TABLES_MONO tables.
It is called in the FUNCBN processing.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called in the calculation of the net requirements immediately before deleting the previous results.
The GPE variable is used and is set to 0 by default. Set the GPE to 1 in the specific or custom process linked to the entry point to use the single-user mode with a global lock on the tables involved.
Available classes and variables
| Class or variable | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently 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. |
CRE_SUG_SPLIT: Split of the suggestions
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.
Context and operating method
Transaction
There is no transaction in process.
Log file
There is an open log file.
Different call cases
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
#--------------------------------------------------------------------------------------
# Entry point CRE_SUG_SPLIT
For customizing the splitting of suggestions
# [F:CBH] is online
# Variables:
# - WSUG = suggested qty
# - WDATS = suggested date
# - WNBR = nbr of splits according to reorder policy
# - WSTO = stock balance
#--------------------------------------------------------------------------------------
$ACTION
Case ACTION
When "CRE_SUG_SPLIT" : Gosub CRE_SUG_SPLIT
Endcase
Return
#--------------------------------------------------------------------------------------
$CRE_SUG_SPLIT
# parameters mask
If clalev ([M:ZCSP]) <= 0 : Local Mask ZCSP [ZCSP] : Endif
# test case >> only for purchased item "SPLIT" (GX3APP)
If [F:CBH]ITMREF <> "SPLIT" : Return : Endif
# only for PO suggestions
If [F:CBH]REOCOD <> 2 : Return : Endif
# fill ZCSP parameters mask
Raz [M:ZCSP]
[M:ZCSP]STOFCY = WFCY
[M:ZCSP]ITMREF = [F:CBH]ITMREF
[M:ZCSP]QTY = WSUG
[M:ZCSP]DAT = WDATS
[M:ZCSP]STOBAL = WSTO
[M:ZCSP]PROCESS = "ZFUNCBN"
Gosub POS_SPLITTING
GPE = 1
Return
#--------------------------------------------------------------------------------------
$FEEDBACK
WSUG = [M:ZCSP]QTYOUT
WDATS = [M:ZCSP]DATOUT
WBPRO = [M:ZCSP]BPROUT
WSTO = [M:ZCSP]STOBAL
Gosub CRE_UNE_SUG From FUNCBN
Return
#--------------------------------------------------------------------------------------
# Purchase orders suggestions splitting
#--------------------------------------------------------------------------------------
# parameters mask ZCSP must be open and filled (mask ZCSP needs to be created)
#--------------------------------------------------------------------------------------
$POS_SPLITTING
Local Char TSUG_BPR(GLONBPR)(3)
Local Integer TSUG_BPRPCT(3)
Local Decimal TSUG_BPRMINQTY(3)
Local Decimal WWRK, WREO, WREOTOT, WDELTA
Raz TSUG_BPR, TSUG_BPRPCT, TSUG_BPRMINQTY
# test case (GX3APP) split on 3 suppliers
TSUG_BPR(0) = "FOU001"
TSUG_BPRPCT(0) = 40
TSUG_BPRMINQTY(0) = 250
TSUG_BPR(1) = "FOU002"
TSUG_BPRPCT(1) = 40
TSUG_BPRMINQTY(1) = 200
TSUG_BPR(2) = "FOU003"
TSUG_BPRPCT(2) = 20
TSUG_BPRMINQTY(2) = 150
# -------------------------------
# process 1st split - supplier 1
WWRK = int(([M:ZCSP]QTY * TSUG_BPRPCT(0)) / 100)
If WWRK < TSUG_BPRMINQTY(0) : WREO = TSUG_BPRMINQTY(0) : Else : WREO = WWRK : Endif
WREOTOT += WREO
[M:ZCSP]QTYOUT = WREO
[M:ZCSP]DATOUT = [M:ZCSP]DAT + 1
[M:ZCSP]BPROUT = TSUG_BPR(0)
Gosub FEEDBACK From =[M:ZCSP]PROCESS
If WREOTOT >= [M:ZCSP]QTY : Return : Endif
# -------------------------------
# process 2nd split - supplier 2
WWRK = int(([M:ZCSP]QTY * TSUG_BPRPCT(1)) / 100)
If WWRK < TSUG_BPRMINQTY(1) : WREO = TSUG_BPRMINQTY(1) : Else : WREO = WWRK : Endif
WREOTOT += WREO
[M:ZCSP]QTYOUT = WREO
[M:ZCSP]DATOUT = [M:ZCSP]DAT + 1
[M:ZCSP]BPROUT = TSUG_BPR(1)
Gosub FEEDBACK From =[M:ZCSP]PROCESS
If WREOTOT >= [M:ZCSP]QTY : Return : Endif
# -------------------------------
# process 3rd split - supplier 3
WWRK = int(([M:ZCSP]QTY * TSUG_BPRPCT(2)) / 100)
If WWRK < TSUG_BPRMINQTY(2) : WREO = TSUG_BPRMINQTY(2) : Else : WREO = WWRK : Endif
WREOTOT += WREO
[M:ZCSP]QTYOUT = WREO
[M:ZCSP]DATOUT = [M:ZCSP]DAT + 1
[M:ZCSP]BPROUT = TSUG_BPR(2)
# last split, adjust stock balance for MRP calculation
[M:ZCSP]STOBAL += (WREOTOT - [M:ZCSP]QTY)
Gosub FEEDBACK From =[M:ZCSP]PROCESS
Return
CTLSTOSEC: Specific case safety stock on 1st requirement
This entry point is used to control how the Safety stock variable is reset to zero.
It is called in the FUNCBN processing, when the Match safety stock parameter is set to the on 1st requirement value, only on the first bucket and if WBESBUC = 0. This means that there is no requirement, or that this requirement is covered or allocated on the available stock.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Available classes
| Class | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| Class [F:ITF] |
Contains the data for the product or site processed. |
NOADJUST: Start stock adjustment
Starting stock used for requirements calculation.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called before the start stock adjustment, if the physical stock was requested.
The adjustment consists in ignoring the packing slips or picking tickets which are pending validation.
The GPE=1 variable allows to skip the start stock adjustment, and switch back to the Version 5 behavior (V5) operating mode, deducting all allocations from available stock.
Available variables
| Variable | Definition |
|---|---|
| WPRO |
Contains 1 if MPS. Contains 2 if MRP. |
BEFWRICBD1: Before MRP result
This entry point is used to control and correct data before generating the requirement in the CBNDET or PDPDET table.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called during the calculation of net requirements (MRP and MPS) just before inserting the requirement in the MRP and MPS result (it is executed twice).
The GPE variable is used and set to the value 0 by default. Set the GPE to 1 in the specific process linked to the entry point if the current line must not be posted.
The variables that can be modified or accessed are in the [F:CBD1] buffer.
Available classes
| Class | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| Class [F:ITF] |
Contains the data for the product or site processed. |
CTLDATSUG: Suggestion date control
This entry point is used to control and correct data before generating the requirement in the CBNDET or PDPDET table.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called during the MRP calculation (MRP and MPS) after the suggestion start and end dates have been calculated ($CALDATSUG).
The variables that can be modified or accessed are WDATD (suggestion start date) and WDATF (suggestion end date).
Other information relating to the current suggestion are in the [F:CDB1] buffer.
Available classes
| Class | Definition |
|---|---|
| Class [F:CBH] |
Contains the data currently being processed (Site, Product...). |
| Class [F:ITF] |
Contains the data for the product or site processed. |
CTLSTO: Quality control stock resource
This entry point provides access to the creation of a miscellaneous resource for stock under quality control.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called during the MRP and MPS calculations, before each quality control stock a miscellaneous resource is created ($CTL_STO).
The entry point is positioned immediately before the Write operation on the [CBD] table.
The GPEvariable can be modified:
-
GPE = 0 creates the resource,
-
GPE <> 0 does not create the resource.
The values of fields in the [F:CBD] class (Detail net need calculation) can be modified before resource creation. For example the quantity and required date.
Setting GOK < 1 will stop the transaction.
STARTSTOCKECC: Reorganise versioned starting stock
This entry point is used to reorganise starting stock calculated per product version.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called during MRP and MPS immediately after the starting stock is calculated per product version.
It allows the calculated starting stock to be reorganised, for example by assigning the total starting stock across all versions to one particular version (the latest one).
The starting stock for each version is in WECCSTODIS(n). The corresponding major and minor version are in WECCVALMAJ(n) and WECCVALMIN(n), where n is the maximum number of versions, defined by activity code ECCMX.
Setting GOK < 1 will stop the transaction.
REOMGT: Ignore Not managed products
Ignore products (sites) with Reorder mode set to Not managed.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file
Code context
This entry point allows products (sites) with Reorder mode set to Not managed to be ignored during the MRP process. No record is written to the CBNHEA table (MRP header) for these products, which may improve performance.
Available variable
| Variable | Definition |
|---|---|
| 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. |
BUCKETBALECC: Reorganise versioned buckets balance
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Code context
This entry point is called during MRP and MPS immediately after the bucket balance is calculated per product version.
This entry point can be used to reorganize the calculated bucket balance. For example, if the balance is negative for the current version and positive for a previous version, then the balance from the previous version can be moved to the current version so that the current version balance is reduced.
Available variables and masks
The bucket balance for each version is in WECCSTODIS(n). The corresponding major and minor version are in WECCVALMAJ(n) and WECCVALMIN(n), where n is the maximum number of versions, defined by activity code ECCMX.
DETECCBOM: Determining BOM version during MRP
Context and operating method
Transaction
There is one open transaction for [CBH] and [CBD].
Log file
There is an open log file.
Code context
This entry point can be found in the FUNCBN (MRP run) script, just before the call of the INIECCBOM standard function and only in the TRT_ORD function.
The MRP treatment needs to determine which BOM version to use for the product managed by version found in the ORDERS table, whether the suggestion type is Manufacturing or Subcontracting.
Use this entry point if you have to choose a BOM version different from what the INIECCBOMstandard function would choose.
When developing the custom script, you can use the call of the INIECCBOM standard function in the MFGECCLIB library, as a reference example. The only difference between the custom script and the standard one, should be the different version statuses that will be filtered to determine the BOM version.
The script must fill the variables:
-
[F:CBD]ECCVALMAJ: The valid major version of the product.
-
[F:CBD]ECCVALMIN: The valid minor version of the product if defined.
-
WECCALT: The valid BOM code.
-
GPE: Common entry point flag.
Set the GPE to 1 if the values of the filled variables must be kept.
Set the GPE to 0 if the INIECCBOM standard function must be executed.
It is likely that this function overwrite the values if GPE has not been set to 1.
The WECCALT variable set to 0 will execute the standard function to find the product's version amongst the stock versions.
Available classes and variables
| Class | Definition |
|---|---|
| [F:CBD] | File class for MRP detail. |
| [F:CBH] | File class for MRP header. |
| [F:ORD] | File class for ORDERS table. |
| GPE |
Set to 1 to use results of entry point script. Set to 0 if standard function shall be called. |
| WECCALT | Variable to store the BOM code of the determined version. |
Open tables
| Table | Significant content | Table title |
|---|---|---|
| CBNDET | No | MRP detail |
| CBNHEA | No | MRP processing |
| ORDERS | No | Work in progress |