This function is used to execute configuration scenarios set up by the Scenario Configurator function. They can be executed either from the actual function or from the quote or order entry functions.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

The execution of a scenario can be broken down into several phases.

Entry screen

Window selection

Before the entry and generation of the configurator data, it is necessary to complete a selection window that is used to choose for a given site, the scenario to be executed.

Site: Choose the configuration site for the scenario.

Scenario : Choose the scenario code based on 5 characters.

Business Partners: Optional field that is used to indicate the BP number for which the configuration will be initiated. This information will be saved in the configuration history.

BP reference: Optional field that is used to indicate a configuration reference. This reference will be saved in the configuration history.

Reference date: Date that will serve as a reference to the configurator for the active BOM link choices.

[OK]: This button is used to validate the header information then to execute the scenario.

[Cancel]: Exit the configurator.

Response entry

The running of a scenario is sequential. It follows the order of the tabs (start/sel parents, parent creation) and for each tab, the line order.

Following this, the display of new questions is triggered on changing the tab, but also when:

 The next line is not a question.

 The condition for the next question is different from the current question.

 The next question contains a formula or a calculator with a question that will be set.

 The next question is a symbol linked to a table and that a filter (symbol FILTER) is specified (that is to say FILTER does not contain an empty chain).

Several entry methods are then possible:

Simple entry

According to the setup carried out on the scenario, the questions are proposed to the user.

Il is necessary to compose the response according to the format type expected by the configurator (alphanumeric, numeric, date or tick box). An automatic upper case or lower case conversion will be carried out if it is required at the level of the question definition. The selection key is active if a table of responses is associated with a symbol and is used to choose the response from amongst a list of values.

Entry of a shape and pattern

After having selected or entered the shape and pattern code, a secondary window opens to set the questions associated with this shape and pattern.

Options / Variants entry

As a function of a response given to a question, the scenario can call an options/variants window. The options/variants are chosen by the user in the displayed window.

Entry of product selections

See above, "Options /variants entry".

Notes

During the question entry phase in the principal window of a scenario, the user can validate their entry by :

 Clicking on the [OK] button of the window.

 Tabulating from the last field currently being entered. This automatically triggers the same action as when clicking on the [OK] button

By this latter function, the entry is more flexible because the user responds an moves field to field using the tab then finds themselves on the next questions by a simple tab key move.

In the same way, after the display of a "warning message" set up in a scenario, it is necessary to click on the [OK] button of the box in order to resume the scenario.

Finally, once all the questions have been answered, the [OK] button is grayed out while the [Validation] button is activated with the focus.

Entry error correction

One click on the [Correction] button makes it possible to access all fields previously entered. It is then possible to correct them, then end the modification by using the [OK] button. The configurator deletes the fields following the first modified field (configurator classification) and the entry restarts on this field.

Notes

The presentation order can be different to the logical order of the configurator.

Following a correction, the scenario restarts its normal running from the modified question. This implies that the lines that contain a formula or a calculation are re-evaluated. For the questions situated after the correction there are two cases:

 No formula or calculation table: the question is displayed with the last entered value.

 Formula or calculation table: the question is displayed with the revaluated content.

Modification of an existing configuration

It is possible to modify the routing and /or BOM of a configured product whilst conserving the code of the parent product previously created. For this it is necessary, immediately after the entry into the principal configuration window, to activate the [Search] button. The system then displays all the configurations carried out for the BPs and BP references entered, on the condition that the BPRNUM and BPRREF symbols are set up as search criteria. It is then necessary to select the required configuration, then activate the [Modification] button. The system then returns to the main question window, suggesting by default the responses given for the selected configuration, responses that can then be modified. During the generation, the system provisionally assigns a new product code, which is replaced at the time of validation by the selected product code. The base data for this product is modified as a function of the new responses given.

Miscellaneous questions on response entry

[Answers]: At any time, it is possible to display the answers given to all the questions (certain questions no longer being visible), as well as the value of the variables using the button at the bottom of the screen.

Entry validation

Once all the questions have been answered, the [OK] button is grayed out while the [Validation] button is activated with the focus. This is used to link on this phase by using the "Enter" key.

When all the questions necessary to the configuration have been set, it is sufficient to choose the button [Correction] or [Validation].

After validation, it is no longer possible to return in correction mode: only to [Cancel] the configuration is possible.

After validation, a window with 4 tabs is displayed. This window is used to view, for a configured product or for the equivalent product found by the configuration, the BOM, the operational routing, the stock information and the summary of the values of the different symbols. The detailed information can be obtained by right click on the "BOM" and "Routing" tabs.

The phases in the scenario

1. Parent product selection

This first scenario phase corresponds to the tab "Start./ sel parent". It is used to:

 Set the primary questions.

 Calculate the variables.

 Open the product selection windows.

 Open the options / variants selection windows (less appropriate).

If the parent product selections take place during this phase, the scenario executes the final variable control phase (for those variables used that have controls) and finishes. In this case there is no history log created.

SEEINFOA maximum of 100 parent products can be selected.

2. Parent product creation

This phase corresponds to the "Creat. parent product", it will only be executed if this phase is defined and if parent product creation is authorized at the level of the setup.

This scenario phase is used to:

 Set additional questions.

 Calculate the additional variables.

 Create a new parent product (Product, Product-site, Product-sales).

 Prepare the "BOM header" record (if required).

 Prepare the "Routing header" record (if required).

The "Product", "Product-site" and "Product-sales" records are initialized from the "Reference parent product".

The "Product-customer" is initialized from the first record of the "Reference parent product".

All the actions defined in this phase are executed.

According to the "Equivalence search" setup of the "Creat.parent product" tab of the scenario, the following process is carried out:

 No search

The product is created if it does no't exist. An error is displayed if the product reference is not defined and that no automatic sequence number counter is defined for the product category.

 Equivalence search

An equivalence search is made according to the product line of the parent product and the product is created if the search is negative.

 Always create

The product is systematically created. An error is displayed if the product exists (no definition of the new reference product or no automatic sequence number counter at the category level).

SEEINFO The assignment of the product number in an automatic fashion based on the category is the priority for the scenario. The "Product-customer" record is only created if the customer number is entered in the selection screen.

3. Component selection

This phase corresponds to the "Sel.components" tab and serves to:

 Set additional questions.

 Calculate the additional variables.

 Open the product selection windows.

 Open the options / variants selection windows.

It is used to create the parent product BOM (if a new parent product) from existing components. The link quantities are then the quantities entered in the selection windows. This phase is optional and it can be used in combination with the next phase (component creation).

SEEINFO It is advisable to enter the quantities in "stock unit" in the product selection or options / variants windows because this unit corresponds to the link unit in the BOM.

4. Component creation

This phase corresponds to the "Component create." tab and serves to:

 Set additional questions.

 Calculate the additional variables.

 Create the BOM links.

 Create the new components.

For each component, if the creation condition is satisfied:

 The default component record is loaded.

 The link is initialized with the quantities given in the component line.

 If they exist, the redefinition of the "BOM link" or "component product" fields is carried out.

The link is then created accorded to the "Search mode" defined in the component line, during the scenario setup:

 No search

The product is created if it does not exist. An error is displayed if the product reference is not defined and that no automatic sequence number counter is defined for the product category.

 Equivalence search

An equivalence search is made according to the product line of the component and the product is created if the search is negative.

 Always create

The component is systematically created. An error is displayed if the product exists (no definition of the new reference product or no automatic sequence number counter at the category level).

SEEINFO It is not possible to create two links with the same sequence number for the same component. The configurator firstly creates the links obtained by selection.

5. Operation creation

This phase corresponds to the "Operations Creat." and serves to:

 Set additional questions.

 Calculate the additional variables.

 Create the operations.

For each operation if the creation condition is satisfied: The default operation record is loaded (origin reference routing or standard operation). The operation times and rates are initialized with the times given in the operation line. If they exist, the redefinition of the operation fields will take place.

If at least one operation is created, a routing header is generated (from the reference routing, its redefinition can be made during the "parent product creation" phase"). The "scheduling" records are automatically generated with the type "successor" and the last operation is of the type "production".

6. Final checks

This phase corresponds to the "Final checks" tab in the scenario and serves to:

 Set additional questions.

 Calculate the additional variables.

 Carry out the checks and controls that can only be carried out at the end of the technical data generation (for example incompatibility between components).

By using the "advanced" options of the configurator, the cost calculation actions are defined in this phase (according to the cost calculation setup).

 For each component the "material cost" actions are carried out and will load the CST system variable with the unitary material cost.

 For each machine operation the "machine cost" actions are carried out and must load the CST variable with the unitary machine cost.

 For each labor operation the "labor cost" actions are carried out and must load the CST variable with the unitary labor cost.

 For each sub-contractor operation the "sub-contractor cost" actions are carried out and must load the CST variable with the unitary sub-contractor cost.

Remarks on the cost valuation by a scenario:

In the scenario screen setup, it is possible to choose between two valuation methods:

 Management control (recommended)

 Scenario specific

"Management control" method

The secondary choices available are:

 Standard cost(and not 'Standard price')

 Revised cost (and not 'Revised standard price')

 Budget cost

The standard calculation for this module is the set up using the BOM descent option and the implicit update of the product-cost tables. This calculation takes place after the scenario validation (the data is created) is then followed by a revision of the principal parent product.

This maybe the time to calculate the base price (BASPRI field in the Product-sales ITMSALES table).

The "Standard cost" tab displays the global results of the calculation. A grid displays the messages that belong to this calculation as well as any errors that occur.

Parent product table

The "Unitary cost" and "Total cost" fields are valued by the calculation results.

The "Base price" field of the ITMSALES file is displayed.

Components table

The "Unitary cost" and "Total cost" fields are valued by the calculation results (including multi-level display).

 

Routing table

No valuation is displayed on the routing operations.

 


'Scenario specific’ case

The possible choices are:

 Base price

 Last price

 Formula evaluation (and not by 'Calculated by scenario')

In the case of "Base price" and "Last price", the following configurator variables are available:

 CSTMAT (Material): This is the sum of the final components. According to the choice, the program takes the base price (BASPRI field in the Product-Sales file) or the last price (LASRCPPRI field (last price entered) in the Product-Site totals file).

 CSTTOT: Sum of the variables shown above

In the case of an evaluation by formulas, the following are available:               

 CSTMAT (Material): Sum arising from the BOM details. The available tables are the BOM detail (BOO) and the component product (ITM).

 CSTLAB (Labor), CSTMAC (Machine) and CSTSCO (Sub-contractor) : Sum arising from all the operations with the principal work center, labor work center and structural sub-contractor work center. The tables available are the operations (ROO) and the work centers (MWS). The CSTMAC or CSTLAB valuation is made depending on the work center type.

 CSTTOT: Sum of the variables shown above

In both cases, it is possible to VALUE the parent product fields with the help of the scenario setup (revision method).

Display of the validation result:

Parent product table

The 'Total cost' field is given by CSTTOT and the 'Unitary cost' by CSTTOT/ITMQTY.

The "Base price" field of the ITMSALES file is displayed.

Components table

The "Unitary cost" is valued by the component cost and the "total cost" is the product of the "unitary cost" multiplied by the requirement.

 

Routing table

The Cost fields are assigned only in "Calculation by scenario" mode.

 

7. Data generation

By activation of the [Generation] button at the screen bottom on the window summarizing the data that will be created or the selected data by the configuration, the configuration is validated. A new product and the base data are generated if required. A configuration number is also assigned. Thanks to this number, the configuration can be viewed in the history file. Similarly, this number is saved in the product created at the level of the product line fields.

Notes on the assignment of the configuration number and on the sequence number counter in the configurator

Configurator document number

This number is allocated during the validation phase and its calculation comes from the X3 sequence number counter "CFG".

As standard this sequence number counter is defined with a grouped sequence type and is made up of 20 numbers, this is in order to reduce the waiting times in multi-user systems.

The use in a scenario of this document number is available by using the S_CPTCFG symbol.

Product codes created by the configurator

Different options are available to create the new product code:

Coding based on ####

Example for a parent product:

Master product

ITMREF

"CAM_####"

In this case, the system allocates an automatic number by searching for the last product with the same root in the database.

In the example above, the root is "CAM_" and if the last product for this root code is "CAM_0027" then the system will allocate the code "CAM_0028" to the new product.

This option is made for occasional use because it can lead to long waiting time by users working on the same prefixes at configuration validation or generation.

Coding using the configurator document number

Example for a parent product:

Master product  

ITMREF

"CAM_"+S_CPTCFG

In this case, the product code includes the item number (or a part of it) generated by the grouped sequence number counter.

In this way, two users working on their own data will not be constrained by the waiting times that are sometimes long.

Coding using the sequence number counter defined in the product category

To activate this mode, it is necessary to define a sequence number counter for the product and specify an empty code for the product.

Example for a parent product:

Master product

ITMREF

""

In this case, the product code is calculated by the sequence number counter of the category.

Used occasionally, this method is not too important. On the other hand, it must be defined as "grouped" sequence type if the usage is more intensive to avoid long waiting times.


Coding using a "variable" symbol assigned to a sequence number counter

To activate this method, a configurator symbol of the variable type is assigned to an X3 sequence number counter.

the product code makes reference to this variable.

Master product

ITMREF

S_CPT1

In this case, the product code is calculated by the sequence number counter specified on the symbol.

This variable will be evaluated a single time at the moment of the configuration validation.

If several sequence number counter values are required, it is necessary to use several symbols using the same X3 sequence number counter.

Used occasionally, this method is not too important. On the other hand, it must be defined as "grouped" sequence type if the usage is more intensive to avoid long waiting times.

Multi-level configurator: notes on the execution of sub-scenarios

 The sub-scenarios depend on the main scenario and must use the following:

 the same routing code

 the same BOM code

 the same cost calculation method

This information is forced by the configurator on execution and it is therefore recommended to ensure the coherence of the setup.

During the execution of a sub-scenario and in the parent product tab, the fields defined with "No setup" are ignored, whilst the fields with "revision" are processed. This usage is rare but can be useful in the cost calculation method "scenario specific" (base, last price or formula) to assign for the example, a price to a parent product.

Example        

Product-Sales / BASPRI (base price)  with the formula= S_CSTTOT * 1.1
Reminder: S_CSTTOT is a global cost, the unitary cost is equal to S_CSTTOT/S_ITMQTY. In general, S_ITMQTY equals 1 and S_CSTTOT is equal to the unitary cost.

On the other hand, it is not possible to carryout such a calculation in cost calculation method "Management control" because the calculation is triggered at the end of the validation. In this method, only the revision of the principal parent product is possible (master scenario) and the equivalent calculation will be:

Formula: [F:ITC]VLTTOT*1.1 (VLTOT being the global cost of the product)

Notes on the configuration batch interface

A basic batch launching process is as described below. For batch launching configuration scenarios, this process requires a specific development.

 Initializing the scenario (gosub CFGINITBAT)

 Loading all the necessary questions for the scenario using the mask CFGFUN

 Starting the execution of the scenario (gosub CFGEXEBAT).

During the initialization phase, all the questions are initialized in their mode.

The loading of the questions must be programmed to allow the running of the scenario up to the end (response coherence).

During the execution of the scenario, the configurator is based on the global variables of the scenario and does not have a scenario entry screen. Nevertheless, it applies a verification on executing the checks and controls linked to the questions.

In this context, only the entry points CFGCTRALP (alphanumeric), CFGCTRNUM (numeric), CFGCTRDAT(Date) and CFGCTRCAS(0/1) can be used.

In these entry points, the LQST variable contains the name of the symbol question in process and the VALEUR variable contains the value to be controlled.

SEEINFO The variables of the type 'zoncou' are not available.

The entry points of the type CFGASxxx (before entry) are not called.

These entry points are called from the standard process CFGLIB.

 
Documentation on the return code ([M :CFGF]RETCOD)

The [M :CFGF]RETCOD field contains the following return codes in addition to the values already specified :

CFGFUN mask for insufficient dimension

Symbol not found

Documentation on CFGEXEBAT execution

GERR=2 – Correct end

GMESSAGE contains a message of the type : Configuration successfully completed.

Data generated with the document number: WE3-0312000226

GERR<>2 – Abnormal end

GMESSAGE is evaluated

If S_AUTCFG >1, the error is produced before the data creation and S_AUTERR contains the symbol code for the error.

Example of program: 

 ############################################################
# Configurator call in batch mode example
# The "PULL" scenario is used to create the products of the type "Pull Over"
#
# 3 questions are set:
# PUCO: Color (numeric response)
# PUSA: Season (alphanumeric response)
# PUTA: Size (alphanumeric response)
############################################################
# Batch configurator call example
# The scenario "PULL" creates items "Pull Over"
#
# 3 questions:
# PUCO: Color  (numeric answer)
# PUSA: Season  (alphanumeric answer)
# PUTA: Size      (alphanumeric answer)
############################################################
Call OUVRE_TRACE("Configurator interface") From LECFIC
# Open mask CFGFUN
Local Mask CFGFUN [CFGF]
Local Integer W_I
# Parameter loading
Rtz [M:CFGF]
[M:CFGF]FCY    = "GIE"   : # Site              Facility< span>
[M:CFGF]SCENUM = "PULL"  : # Scenario
[M:CFGF]BPRNUM = ""      : #BP number Business partner
[M:CFGF]IPTDAT = date$   : # Reference date
#
# Initialization routine call
#
Gosub CFGINIBAT From CFGLIBE
If [M:CFGF]RETCOD=0    # init ok
#
# Loading the answers on to the screen
#
For W_I = 0 To [M:CFGF]QSTNBR-1 
Case [M:CFGF]QSTNUM(W_I)   
 When "PUCO" : [M:CFGF]ASWNUM(W_I) = 2  
 When "PUSA" : [M:CFGF]ASWALP(W_I) = "P"   
 When "PUTA" : [M:CFGF]ASWALP(W_I) = "XS" 
 Endcase
Next W_I
#
# Run of the scenario
#
Gosub CFGEXEBAT From CFGLIBE
If GERR = 2    # correct end   
    Call MESSAGE("Summary: \S_AUTCFG:"-num$(S_AUTCFG)-"GERR:"-num$(GERR)-"\Mes:"-GMESSAGE) From gesecran
 Else           #  Management in case of error  
    Call ERREUR("Anomaly: \S_AUTCFG:"-num$(S_AUTCFG)-"S_AUTERR:"-S_AUTERR-"\GERR:"-num$(GERR)-"\Mes:"-GMESSAGE) From gesecran
Endif
#
# End program
#Else# Error management  
   Call MESSAGE("Error on initialization: \RETCOD:"-num$([M:CFGF]RETCOD) -"GERR:"-num$(GERR)-"\Mes:"-GMESSAGE) From gesecran
Endif
Gosub CFGENDBAT From CFGLIBE      # End (to be done even in the case of error)
 Call CLOSE_LOC From LECFIC
Call READ_LOG From LECFIC
End

Notes on the memo function

The answers to a scenario for a BP and a given BP reference are saved if the configuration is abandoned before the generation of the configured date.

In this way, the memo function recalls the question values at the time of the next execution. An exception to this rule is made for questions that depend on a formula or calculation. In this case, the question is initialized with the result of the formula or the calculation.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Several questions are assigned to a single line in the same section!

This message appears during scenario validation if several questions are assigned to a single line in the same section.  

Routing not valid for the specified date !

The validity dates for the reference routing are exceeded.

Reference routing missing!

The chosen routing does not exist.

Warning BOM not active!              

The reference BOM dates are not valid.

Routing / BOM in development!

The reference BOM or routing status is not "production".

Tables used

SEEREFERTTO Refer to documentation Implementation