Entry points >  Module Stock >  Standard script STKMAJ  

Display all Hide all

PCU_IDENT: During the unpacking of a stock line

This entry point is called before the update of the new stock line coming from the unpacking of the line which an action is being carried out on (issue, location and status change, etc.).

The characteristics of this new stock line are contained in the work screen [M:STW].

Modifying the content of this work screen enables to intervene on the characteristics of the new line and in particular to modify identifiers 1 and 2 that are those of the unpacked line by default.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The original stock line has just been updated (reduction of 1 packing unit and n stock units).

A new line of n stock units will be created with the same characteristics or a line with identical characteristics will be updated (increase of n stock units).

The characteristics of this new line are in the screen [M:STW] indexed via the I variable.

Example: Reset to zero of identifiers 1 and 2

            Raz [M :STW]PALNUM(I)

            Raz [M :STW]PALNUM(I)

Warning: Avoid intervening on other fields than the 2 identifiers since the STOWORK [STW] screen contains all the data used to update stock.

Open tables

All the tables of the stock engine are open but their content is not significant.

The stock update interface screen: STOWORK [STW] is open and contains all the characteristics of the issues to carry out.

GENANA: Analysis number assignment on receipt

This entry point is used to intervene on the update of a receipt into stock when the analysis number is assigned.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

No trace file is open

Different call cases

Call if creation of a new analysis request, therefore only in the case of stock receipt movements with the ‘Q’ status.

Available variables and masks

Variable or mask

Definition

Global char WANA

Analysis number

If the WANA variable is loaded via this entry point, no automatic assignment of the analysis number by the standard sub-program will be carried out.

If this entry point reuses an existing analysis number, the quality control recording must be updated concerning the quantity by status fields.

Open tables

All the tables opened by the stock engine.

 

MAJ_ITH: Updating the Products-sites totals history

Use this entry point in order not to update the history of the products-sites totals (ITMMVTHIS table).

Context and operating mode

Transaction

There is one transaction in progress.

Log file

No trace file is open.

Different call cases

Call upon update of stock in product shortage when the products-sites totals are being updated.

In order not to update the history of the products-sites totals, the GPE variable must be set to 1.

Warning: this entry point is the equivalent of the entry point located in the STKVALMAJ2 processing. The same behavior will probably be required in both cases.

Available variables and masks

Variable or mask

Definition

Section 1 of the STOWORK screen

It contains the characteristics of the document line for which the stock is being updated, among which:            - [M:STW]TRSTYP: transaction type (local menu 704)    - [M:STW]VCRTYP: document type (local menu 701) 

 

Open tables

All the tables opened by the stock engine.

 

AGRSTJ: stock movements should not be aggregated

Use this entry point in order not to aggregate the stock movements.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

Call upon stock update on each stock movement entry.

In order not to aggregate stock movements, the GPE variable must be set to 1.

Available variables and masks

Variable or mask

Definition

Section 1 of the STOWORK screen

It contains the characteristics of the document line for which the stock is being updated, among which:            - [M:STW]TRSTYP: transaction type (local menu 704)    - [M:STW]VCRTYP: document type (local menu 701) 

 

Open tables

All the tables opened by the stock engine.

QLH_CRIT: adding a criterion upon generation of an analysis request

Use this entry point to define an additional differentiation criterion when generating analysis requests.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

Call upon stock update on each stock movement entry.

To use the lot as an additional differentiation criterion when generating analysis requests, the WQLH_CRIT local variable must be declared and loaded as follows:

Local Char WQLH_CRIT

WQLH_CRIT = "LOT = [M:STW]LOT(I)"  

Prerequisites

The lot must be added to the STOQLYH table. It is automatically loaded via the transclasses.

Available variables and masks

Variable or mask

Definition

Section 1 of the STOWORK screen

It contains the characteristics of the document line for which the stock is being updated, among which:            - [M:STW]TRSTYP: transaction type (local menu 704)    - [M:STW]VCRTYP: document type (local menu 701) 

 

Open tables

All the tables opened by the stock engine.

STA_CRIT: adding a criterion when searching for an allocation

Use this entry point to define an additional differentiation criterion when searching for the allocations to be followed on a new stock line.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

Call when updating stock if the characteristics of a stock line with allocations are modified. Calling this entry point only occurs when searching for an allocated quantity equal to the quantity of the new stock line.   

Used to determine the allocations to be followed on this new stock line. 

To define an additional differentiation criterion for allocations, the WSTACRIT local variable must be loaded with the additional filter to be applied.

Open tables

All the tables opened by the stock engine.

 

PURQLC: not to purge a quality control in the case of an issue in Q status

Use this entry point not to purge a quality control in the case of an issue in Q status.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

Call upon update of stock placed in the PURGE_STOQLYD label.

The GPE variable must be set to 1 in order not to purge a quality control in the case of an issue in Q status.

Available variables and masks

Variable or mask

Definition

 

Open tables

All the tables opened by the stock engine.