Script MFGLIB: WO management

CHECKCOMP: Additional controls on the validity of components

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available screens, variables and masks

  • The [ITM] buffer is loaded when calling the entry point.
  • The [ITF] buffer is loaded when calling the entry point.

Code context

Use this entry point to insert additional logic within the component validity control subprogram.

You can use it to add additional controls to the standard controls and to prevent the use of components.

When calling the entry point, the following setup is available:

  • Char LFCY. Production site.
  • Integer LMSG flag message. If it has the value 1, you receive a message.
  • If a component is not considered to be valid, the mksat variable has a value <>0 assigned to it, to refuse the entry of the field.

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

MFGHEAD

No

WO header

MFGITM

No

Released products

MFGOPE

No

Operations

MFGMAT

No

Materials

MFGPRN

No

Documents

ORDERS

No

Pending movements

SCHEDULING

No

Scheduling

OPERATIONS

No

Loading

ROUTING

No

Routing header

ROUOPE

No

Routing operations

ROUSCD

No

Route - Scheduling

BOM

No

BOMs

BOMD

No

BOM lines

FACILITY

No

Site

ITMMASTER

Yes

Product

ITMFACILIT

Yes

Product-site

LTICAL: Additional controls on the Production lead time calculation

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Code context

Use this entry point to insert additional logic into the calculation of the production lead time.

When calling the entry point, the following setup is available:

  • ORIDAL. Original lead-time
  • WEXTQTY. Quantity
  • WDEL. Production lead-time
  • WCOEF. Regression coefficient
  • WLOT. Technical lot if not null. Economic lot if null

The result of the calculation must be entered in the DSTDEL variable (decimal).

The GPE variable must be set to 1 so that the standard calculation is not carried out.

Available screens, variables and masks

The [ITF] buffer is loaded when calling the entry point.

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

ITMFACILIT

Yes

Product-site

MFGCLSCHK: Additional controls on the validity of released products (category)

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available screen and file classes

The [ITM] buffer is loaded when calling the entry point.

Code context

Use this entry point to authorize the use of a phantom product upon production release.

This entry point is called when the system has detected the entry of a product belonging to a non-manufactured product. In that case, [F:ITM]CLSTYP does not equal to 2, 3 or 4.

The GPE variable is used to authorize the release (GPE = 1).

Example:

Copy
############################################################################
# Class [ITM] available on entry
# On exit:
# GPE = 0 for standard process (error message)
# GPE = 1 to validate the category type
###########################################################################
$ACTION
ACTION example
 When "MFGCLSCHK": Gosub MFGCLSCHK
Endcase
Return
#---------------------------------------------------------------------
$MFGCLSCHK
If [F:ITM]CLSTYP = 7: GPE = 1: Endif
Return

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

ITMMASTER

Yes

Product

ITMCTL: Bypassing the message displayed during product validity checks

Context and operating method

Transaction

There is no transaction in process.

Log file

There is no open log file.

Code context

Use this entry point to insert additional logic within the component validity control subprogram.

You can use it to bypass the Product not managed in stock message in the standard script.

The GPE variable is used and defaults to 0.

Set it to 1 to bypass the error message in the standard script.

When returning to the standard script, the GPE variable is tested. If it is not set to 0, the error message is bypassed.

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

MFGHEAD

No

WO header

MFGITM

No

Released products

MFGOPE

No

Operations

MFGMAT

No

Materials

MFGPRN

No

Documents

ORDERS

No

Pending movements

SCHEDULING

No

Scheduling

OPERATIONS

No

Loading

ROUTING

No

Routing header

ROUOPE

No

Routing operations

ROUSCD

No

Route - Scheduling

BOM

No

BOMs

BOMD

No

BOM lines

FACILITY

No

Site

ITMMASTER

Yes

Product

ITMFACILIT

Yes

Product-site

CTLCAT: Bypassing the message displayed during product category checks

Context and operating method

Transaction

There is no transaction in process.

Log file

There is no open log file.

Code context

Use this entry point to insert additional logic within the component validity control subprogram.

You can use it to bypass the Product category incompatible message in the standard script.

The GPE variable is used and defaults to 0.

Set it to 1 to bypass the error message in the standard script.

When returning to the standard script, the GPE variable is tested. If it is not set to 0, the error message is bypassed.

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

MFGHEAD

No

WO header

MFGITM

No

Released products

MFGOPE

No

Operations

MFGMAT

No

Materials

MFGPRN

No

Documents

ORDERS

No

Pending movements

SCHEDULING

No

Scheduling

OPERATIONS

No

Loading

ROUTING

No

Routing header

ROUOPE

No

Routing operations

ROUSCD

No

Route - Scheduling

BOM

No

BOMs

BOMD

No

BOM lines

FACILITY

No

Site

ITMMASTER

Yes

Product

ITMFACILIT

Yes

Product-site

CTLITMSTA: Additional controls on the validity of components (status)

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Code context

Use this entry point to insert additional logic during the validity checks on components.

You can use it to bypass the control on the status of the product (component).

The controls are based on the rules defined in the LCTLFLG variable. Each character of this variable must correspond to a code:

  • 0: No control
  • 1: Error must be corrected before tracking
  • 2: Information displayed
  • 3: Warning displayed.
  • 4: Creation of work order/external order impossible

The position of each code corresponds to a control:

  • 1: Component (ITM) exists
  • 2: Component/Product-site (ITF) exists
  • 3: In development
  • 4: In shortage
  • 5: Not renewed
  • 6: Obsolete
  • 7: Not usable
  • 8: Control of category
  • 9: Component is not managed in stock and is not a phantom
  • 10: Component is not managed in stock and is a phantom

The standard value depends on the document being created.

For example, when adding an unexpected material, such as LCTLFLG="1122111111", no error is permitted. There is an exception for positions 3 and 4 which correspond to the product status In development or In shortage, in which case a non blocking message displays.

To change the standard rules, for example to remove the control on the product statuses 2 to 6, which correspond to In development, In shortage, Not renewed, Obsolete and Not usable, you need to change the value of the variable LCTLFLG as follows: LCTLFLG=left$ (LCTLFLG,2)+"00000"+right$ (LCTLFLG,8).

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

MFGHEAD

No

WO header

MFGITM

No

Released products

MFGOPE

No

Operations

MFGMAT

No

Materials

MFGPRN

No

Documents

ORDERS

No

Pending movements

SCHEDULING

No

Scheduling

OPERATIONS

No

Loading

ROUTING

No

Routing header

ROUOPE

No

Routing operations

ROUSCD

No

Route - Scheduling

BOM

No

BOMs

BOMD

No

BOM lines

FACILITY

No

Site

ITMMASTER

Yes

Product

ITMFACILIT

Yes

Product-site

CTLMFGBOM: Additional controls on the validity of BOM fields when processing WOs

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available screens, variables and masks

Multiple. It is determined by the application, using the validation function.

Code context

Use this entry point to control the validation of BOM fields which are executed when creating or modifying a work order.

The enabling or disabling of the validation is controlled by the GPE variable, by setting the value for position 1 to 5 with the value 1, which corresponds to enable, or with the value 0, which corresponds to disable.

The default value of the GPE variable is 11111, which means that all validations are enabled.

The following positions control the defined validation:

  • 1: BOM site equals to current site.
  • 2: BOM used in manufacturing, either Yes or No.
  • 3: BOM check use status is valid. It corresponds to Available to use and not In development.
  • 4: Work order start date equals to or is greater than the BOM start date.
  • 5: Work order end date is less than or equals to the BOM end date.

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

BOM

No

BOM header

ACCES

No

User access

TABBOMALT

No

BOM codes

ROUQTYCTL: Additional controls on the validity of ROU fields when processing WOs

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available screens, variables and masks

Multiple. It is determined by the application, using the validation function.

Code context

Use this entry point to control the validation of routing fields which are executed when creating or modifying a work order.

The enabling or disabling of the validation is controlled by the GPE variable, by setting the value for position 1 to 6 with the value 1, which corresponds to enable, or with the value 0, which corresponds to disable.

The default value of the GPE variable is 110110 when modifying a work order in the GESMFG function. Otherwise, the default value is 111110.

The following positions control the defined validation:

  • 1: Routing site equals to current site.
  • 2: Routing used in manufacturing, either Yes or No.
  • 3: Routing check use status is valid. It corresponds to Available to use and not In development.
  • 4: Work order start date equals to or is greater than the Routing start date.
  • 5: Work order end date is less than or equals to the Routing end date.
  • 6: Internal validation. Set to 0.

Open tables

In the table below, the significant content column indicates that the content is coherent with the context.

Table

Significant content

Table title

ROUTING

No

Routing header

ACCES

No

User access

TABROUALT

No

Routing codes

MFGLIBEXE: Calculate specific needs at the start of the update of the WO header

Context and operating method

Transaction

There is a transaction in progress.

Log file

There is no open log file.

Code context

Use this entry point to calculate your personal needs for excipient quantities, just before the final update of the MFGHEAD table and its related calculations.

You can also use it for any other needs at the start of the update of the work order header. Ensure that all needed tables and screens are opened. The [F:MFG] class for work order header is open as well.

Available variables and masks

  • [F:MFG] MFGHEAD class variables

Open tables

Table Significant content Table title
MFGHEAD No WO header