Process TRTACHCDE1: TRTACHCDE1

CONTREMARQ: Choice of a net UP supplier for the generation of a direct order

This entry point, located in the TRTACHCDE1 processing (purchase back-to-back order creation from a sales order), generates a CONTREMARQ action.

This action allows you to choose the supplier for the purchase order and also to specify a unit price as well as a currency.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

The entry point is called for each sales order line that generates a purchase order line.

Available variables and masks

The following variables are loaded when calling the CONTREMARQ action:

  • NUMSOH: Number of the sales order being processed.

  • LINSOH: Line of the sales order being processed.

  • SEQSOH: Line sequence of the sales order being processed.

The [M:POI1] screen mask can be used, the NOL variable indicates that the table line currently being loaded.

The following file classes are loaded: [F:SOH], [F:SOQ], [F:SOP], [F:ITM].

The variables and classes given above must not be modified.

The following variables need to be modified to influence the back-to-back order processing:

  • NUMFOU: Suggested supplier number.

If this number is not specified, the first back-to-back order supplier for the product concerned will be selected.

  • PUNET: Suggested net unit price.

If this price is not specified, the purchase order line will be valued following the price list search.

If you want to force a price to 0, you need to specify a negative value in this field. The reason will be the default reason.

  • UNITE: Unit of measure used to express the unit price above.

If this unit is not specified, the unit will be the purchase unit from the product-site.

  • DEVISE: Currency used to express the unit price and, depending on the value of the flag below, default currency for the order.

If this currency is not specified, the currency will be the currency of the supplier (BPARTNER).

  • DEVISEFLAG: Flag used to use the currency value specified above, as the currency of the order (2 = DEVISE (CURRENCY) will be the currency of the order).

Open tables

In the table below, the significant content indicates that the content matches the context (the current sales order is loaded).

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Yes

Sales order headers

SORDERP

Yes

Sales order price lines

SORDERQ

Yes

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Yes

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationThe supplier product must exist. The unit price can be specified to 4 decimal places.

CTLORDMIN: Choosing the type of control to be applied on the minimum amount of an order

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a CTLORDMIN action.

This action allows you to choose the type of control to be applied on the minimum amount of the order.

Context and operating method

Transaction

There is no transaction in progress if the order is created manually (screens POH0, POH1, POH2 and POH3 are present).

There is a transaction is in progress if the order is generated automatically.

Log file

There is an open log file; only if the order is generated automatically from the workbenches (the POI1 screen is present).

Different call cases

The entry point is called every time a non inter-site purchase order is created, with an amount lower than the requested amount.

Available variables and masks

The following variables are loaded when calling the CTLORDMIN action.

For orders created manually (screens POH0, POH1, POH2 and POH3 are present):

  • [M:POH2]TOTORD: Total ex-tax amount of the order.

  • [M:POH2]ORDMINAMT: Minimum ex-tax amount requested for this order.

For orders generated automatically (the POI1 screen is present):

  • [F:POH]TOTORD: Total ex-tax amount of the order.

  • MNT1: Minimum ex-tax amount requested for this order.

The variables and classes given above must not be modified.

The following variable needs to be modified to influence the processing of the control:

  • WCTLFLG: Indicator for the type of control to be performed.

    • 0 = No control.

    • 1 = Non blocking control (with a choice if the order is created manually).

    • 2 = Blocking control (order creation rejected).

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Sales order headers

SORDERP

Sales order price lines

SORDERQ

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationThe default value of the WCTLFLG indicator is 1 (non blocking control).

CTMDIRDAT: Selection of the processing of the planned receipt date of a back-to-back order

This entry point, found in the TRTACHCDE1 processing (back-to-back purchase order creation from a sales order), generates a CTMDIRDAT action.

This action allows you to process the planned receipt date for the purchase back-to-back order in the same way as a received back-to-back order.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

The entry point is called for each sales order line that generates a purchase order line, of the back-to-back purchase order type.

Available variables and masks

The following variables are loaded when calling the CTMDIRDAT action:

  • [F:SOH]SOHNUM: Number of the sales order being processed.

  • [F:SOP]SOPLIN: Line of the sales order being processed.

  • [F:SOQ]SOQSEQ: Line sequence of the sales order being processed.

The [M:POI1] screen mask can be used, the NOL variable indicates the table line currently being loaded.

The following file classes are loaded: [F:SOH], [F:SOQ], [F:SOP], [F:ITM].

The variables and classes given above must not be modified.

The following variable needs to be modified to influence the back-to-back order processing:

DATEFLAG: Processing flag for the planned receipt date.

Open tables

In the table below, the significant content indicates that the content matches the context (the current sales order is loaded).

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Yes

Sales order headers

SORDERP

Yes

Sales order price lines

SORDERQ

Yes

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Yes

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationIf DATEFLAG = 1, the EXTRCPDAT entry point is called as in the case of a received back-to-back order.
  • 0 = The planned receipt date is the delivery date to the customer (standard case, default value).

  • 1 = The planned receipt date is processed as in the case of a received back-to-back order.

    The shipment date is retrieved and adjusted depending on the product-site preparation lead-time and the unavailabilities of the receipt site.

CTMDIRECT: Creation of an inter-company sales order following a back-to-back order

This entry point, found in the TRTACHCDE1 processing (creation of an inter-site or inter-company back-to-back purchase order), generates a CTMDIRECT action.

This action allows you to authorize the generation of an inter-site or inter-company sales order, following an inter-site or inter-company purchase back-to-back order.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The entry point is called in the loading loop of the [M:POI1] screen mask, after reading the sales order at the origin of the back-to-back order.

Available variables and masks

The following variable is loaded when calling the CTMDIRECT action:

NOL: Index of the line being loaded into the [M:POI1] screen mask.

The following variable needs to be modified to authorize the generation of the inter-company or inter-site sales order.

  • WCTMFLAG: Sales order generation flag following the purchase back-to-back order.

    • 0 = No generation (default value).

    • 1 = Generation of the inter-site or inter-company sales order.

Open tables

In the table below, the significant content flag indicates that the content matches the context (in this particular case, there is none).

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Sales order headers

SORDERP

Sales order price lines

SORDERQ

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - information

When delivering this inter-site or inter-company sales order, the RCPFLG flag needs to be updated on the delivery line by using the CFMDLVMAJ entry point of the TRTVENLIVV processing.

This flag must be set to 2 to avoid this delivery from the being suggested in the inter-site or inter-company purchase receipts.

CTMFILTRE: Additional filters on sales orders for the generation of back-to-back

This entry point, located in the TRTACHCDE1 processing (creation of a purchase back-to-back order from a sales order), generates a CTMFILTRE action.

This action allows you to set additional filters on the sales orders to be processed.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

The entry point is called before the sales order are processed but after the validation of the selections entry screen.

Available variables and masks

The following variable is loaded when calling the CTMFILTRE action:

CRITERE: Filter on the sales order headers created by the processing from the POHW selection screen.

The following variables need to be modified to influence the back-to-back order processing:

  • SOHFILTRE: Additional filter on the sales order header (SORDER).

  • SOQFILTRE: Additional filter on the sales order lines (SORDERQ).

Note - informationIt is theoretically possible to intervene in the CRITERE filter created by the processing, knowing that the selections actually carried out will not longer be compatible with it.

Open tables

In the table below, the significant content flag indicates that the content matches the context (in this particular case, there is none).

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Sales order headers

SORDERP

Sales order price lines

SORDERQ

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationAll modifications to the filter will be noted in the log file.

CTMFILTRE1: Exclusion of sales orders in order to avoid generating back-to-back

This entry point, found in the TRTACHCDE1 process (creation of a purchase back-to-back order from a sales order), generates a CTMFILTRE1 action.

This action allows you to fully exclude some sales orders to avoid generating the purchase order.

For example: Exclusion of the sales orders where at least one line does not have a price.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

The entry point is called before the sales order are processed but after the validation of the selection entry screen.

Available variables and masks

The following variable needs to be modified to influence the back-to-back order processing:

  • WCDTSTA: Exclusion flag for the sales order being processed ([F:SOH]SOHNUM).

    • 0 = No exclusion.

    • 1 = The sales order being process will not be converted into a purchase order.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

No

Business partner

BPCUSTOMER

No

Customers

BPSUPPLIER

No

Suppliers

BPSUPPMVT

No

Supplier transactions

SORDER

Yes

Sales order headers

SORDERP

No

Sales order price lines

SORDERQ

No

Sales order quantity lines

PORDER

No

Purchase order headers

PORDERP

No

Purchase order price lines

PORDERQ

No

Purchase order quantity lines

PPRICLINK

No

Purchase price list search (Link)

FACILITY

No

Sites

ITMMASTER

No

Products

ITMBPS

No

Products - suppliers

ITMFACILITY

No

Product-sites

ITMMVT

No

Product-site movement totals

ORDERS

No

WIPs

TABCUR

No

Currencies

TABCOEFF

No

Coefficients

PERIOD

No

Periods

BUDPAR

No

Budget setup if accounting module is present

Note - informationAll excluded sales orders will be noted in the log file.

CTMFILTSOQ: Exclusion of sales lines in order to avoid generating back-to-back order

This entry point, located in the TRTACHCDE1 processing (creation of a purchase back-to-back order from a sales order), generates a CTMFILTSOQ action.

This action allows you to exclude some sales order lines in order to avoid generating the purchase order line.

For example: Exclusion of the sales order lines for which the price has not been entered.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

The entry point is called for each sales order line.

Available variables and masks

The following variable needs to be modified to influence the back-to-back order processing:

  • WCDTSTA: Flag to exclude the sales order line being processed ([F:SOQ]SOHNUM+[F:SOQ]SOPLIN+[F:SOQ]SOQSEQ).

    • 0 = No exclusion.

    • 1 = The sales order line being processed will not be converted into a purchase order line.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

No

Business partner

BPCUSTOMER

No

Customers

BPSUPPLIER

No

Suppliers

BPSUPPMVT

No

Supplier transactions

SORDER

Yes

Sales order headers

SORDERP

No

Sales order price lines

SORDERQ

Yes

Sales order quantity lines

PORDER

No

Purchase order headers

PORDERP

No

Purchase order price lines

PORDERQ

No

Purchase order quantity lines

PPRICLINK

No

Purchase price list search (Link)

FACILITY

No

Sites

ITMMASTER

No

Products

ITMBPS

No

Products - suppliers

ITMFACILITY

No

Product-sites

ITMMVT

No

Product-site movement totals

ORDERS

No

WIPs

TABCUR

No

Currencies

TABCOEFF

No

Coefficients

PERIOD

No

Periods

BUDPAR

No

Budget setup if accounting module is present

ECLBESOINS: Special splitting of the requirements

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates an ECLBESOINS action.

This action allows you to split or regroup requirements in a specific way.

It is also used to perform a specific or custom sort on the requirements in order to generate the order lines in a specific order.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The entry point is called when the requirements from the classic orders or the buyer plan are taken into account.

Available variables and masks

The following variables are loaded at the time of the call to the ECLBESOINS action:

  • TRAIT: Code for the current processing (1 = classic orders, 2 = buyer plan, 3 = reorder plan).

  • FOURN: Supplier number.

This field is populated only if the call is made from classic orders (TRAIT=1).

  • REFART: Product reference.

This field is significant only if the call is made from classic orders (TRAIT=1).

  • The [M:PPI1] mask can be used only if the call is made from classic orders (TRAIT=1).

  • The [M:PPI2] mask can be used only if the call is made from the buyer plan (TRAIT=2).

  • The [M:PMG] mask can be used only if the call is made from the reorder plans (TRAIT=3).

The variables and classes given above must not be modified.

The following variable can be modified to change the splitting or regrouping after the requirements are taken into account.

  • WSRTFLG: Sort flag (0 = standard sort, 1 = custom or specific sort).

Depending on the processing code, the specific or custom sort will be executed for the following [M] classes:

  • Sort on [M:PPI1] if TRAIT = 1

  • Sort on [M:PPI2] if TRAIT = 2

  • Sort on [M:PMG] if TRAIT = 3

Note - settingsDo not forget to set the value of WSRTFLG to 1 after the sort.
  • ECLAT_PSH: Split by purchase request number (1 = No, 2 = Yes).

  • ECLAT_DAT: Split by requirement date (1 = No, 2 = Yes).

  • ECLAT_PJT: Split by project number (1 = No, 2 = Yes).

  • ECLAT_CCE: Split by analytical dimensions (1 = No, 2 = Yes).

  • ECLAT_DES: Split by product description or line text

    • With the description translation ITMDES: 1 = No, 2 = Yes.

    • With standard description ITMDES1: 3 = Yes.

    • With line text: 4 = Yes

Note - informationIn version 13x, when a text is associated with a line it is considered different, even if it comes from the product or the product-supplier without any modification.
  • ECLAT_PRI: Split by line price (1 = No, 2 = Yes). This is valid when coming from the reorder plan or the Order button in the purchase request management. It cannot be used to group two purchase request lines with different prices.

In this context, grouped lines with the same price as well as various fields (net price, gross price, reason, currency, exchange rate, exchange rate type, taxes, discounts and charges) are kept and contain the values of the first line of the grouping.

Note - warningThis field can be managed only if the value of the TRAIT variable is 3.

The context IF TRAIT =3 should therefore be tested.

[M:PMG]RGRFLG: This variable can be used only if the entry point is called from the reorder plans (TRAIT = 3).

It is advised to test its presence before calling it, using If dim([M:PMG]RGRFLG)>0.

This variable can take the following values:

  • 1 = No grouping, requirements are converted into order lines, the ECLAT_XXX variables are deactivated.

  • 2 = Grouping authorized according to the value of the ECLAT_XXX variables.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Yes if TRAIT=1

Business partner

BPSUPPLIER

Yes if TRAIT=1

Suppliers

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Yes if TRAIT=1

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

Note - informationThe default values for the split flags are as follows:
  • ECLAT_PSH = 1: No split on purchase request.

  • ECLAT_DAT = 1: No split on requirement date (grouping and consideration based on the earliest date).

  • ECLAT_PJT = 2: Split by project number.
  • ECLAT_CCE = 2: Split by analytical dimension (there is a grouping if all the analytical dimensions are identical).
  • ECLAT_DES = 2: Split by translated product description (since generic products all have the same reference, with only the description changing).

EXTRCPDAT: Control and shifting of the planned reception date

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates an EXTRCPDAT action.

This action allows you to give a minimum date to be respected during the readjustment of the receipt date according to the working days of the receipt site.

Context and operating method

Transaction

There is a transaction in progress in the case of an automatic order generation (back-to-back or buyer plan).

Log file

There is an open log file in the case of an automatic order generation (back-to-back or buyer plan).

Different call cases

The entry point is called after the requirements are taken into account, or during the manual entry of an order line just before the control and the potential modification of the planned receipt date.

Available variables and masks

The following variables are loaded when calling the EXTRCPDAT action:

  • DATRCP: Planned receipt date to be checked and adjusted according to the working days of the site concerned.

  • DATCDE: Date of the order.

  • DELAI: Lead-time given by the product or product-site or price list (in number of days).

The variables given above must not be modified.

The following variable can be modified to limit the modification of the receipt date:

DATMIN: Minimum receipt date.

In version 130, the default value is the date of the order (DATMIN=DATCDE).

In version 140, the default value is the date of the order, increased with the lead-time (DATMIN=DATCDE+DELAI).

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

FACILITY

Yes

Sites

ITMMASTER

Yes

Products

ITMFACILITY

Yes

Product-sites

Note - informationThis entry point will no longer be required starting from version 140.

GENCDEDCL: Declaration of additional variables usable by the entry points

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a GENCDEDCL action.

This action allows you to declare additional local variables. These variables will be available for use by other entry points such as GENCDESEL and GENPURORD.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file if the generation of orders come from the buyer plan (OPERATOR<>"" & !clalev([M:PMG]).

Different call cases

The entry point is called at the start of the generation of orders.

Available variables and masks

The following variables are loaded when calling the GENCDEDCL action:

OPERATEUR: Operator code for which orders by product are to be generated.

  • CHOIX:

    • 1 = Confirmation of the generation with default value set to No.

    • 2 = Confirmation of the generation with default value set to Yes.

    • 3 = Automatic start of the generation.

    • 4 = Automatic start of the generation, the call has been made from the supplier returns in the case of a reintegration on a new order and you are within an update transaction.

  • TARGRP:

    • 1 = on request becomes No.

    • 2 = on request becomes Yes.

The variables given above must not be modified.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Sales order headers

SORDERP

Sales order price lines

SORDERQ

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

GENCDESEL: Used to accept or reject the generation of an order line

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a GENCDESEL action.

This action allows you to accept or reject the generation of an order line.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The call is made before the order line is loaded and written.

Available variables and masks

The following variables are loaded at the time of the call to the GENCDESEL action.

The [M:POI1] mask can be used, the nolign variable indicates the table line currently being processed.

The variable and the class given above must not be modified.

The following variable must be modified in order to accept or refuse the generation of the order line:

  • OK: Flag for the order line being processed.

    • 0 = The line is rejected, moving to the next line to be processed.
    • 1 = The line is accepted (default value).

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Sales order headers

SORDERP

Sales order price lines

SORDERQ

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - warningTables SORDER, SORDERP and SORDERQ are significant only if the [M:POI1]SOHNUM (nolign-1) field is specified. Upon supplier return with reintegration on a new order, these three classes are not open.

GENPURORD: Loading the specific or custom fields before entry

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a GENPURORD action.

This action allows you to load specific or custom fields in the records of the different order tables before their entry.

Note - informationThis entry point is only called during the automatic generation of purchase orders (back-to-back, transformation of a purchase request into an order, buyer plan, global panning, workbench and grouping).

This entry point cannot be used when the purchase orders are created manually using the POH object management.

In such a context, the actions specific to the POH object have to be used.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

During the automatic generation of orders, the call is made before the write for each of the order tables.

These tables are the order header (PORDER), the quantity detail line (PORDERQ) and the price detail line (PORDERP).

Available variables and masks

The following variables are loaded when calling the GENPURORD action:

  • [V]GOK: Set to 0, this global variable is used to cancel the update transaction for the current order (Rollback), and to move to the next order to be processed.

  • FICHIER: Name of the table that will be written (PORDER, PORDERP or PORDERQ).

  • ABRFIC: Abbreviation for the table that will be written (POH, POP or POQ).

  • CTMFLAG: Flag for back-to-back order (0 or 1 = No, 2 = Yes).

  • NUMSOH: Number of the sales order currently being processed if it is a back-to-back order and if the table currently being processed is not the order header table (PORDER).

  • LINSOH: Number of the sales order line currently being processed if it is a back-to-back order and if the table currently being processed is not the order header table (PORDER).

  • SEQSOH: Sequence of the sales order line currently being processed if it is a back-to-back order and if the table currently being processed is not the order header table (PORDER).

The [M:POI1] mask can be used, the nolign variable indicates the table line currently being loaded, except if the table currently being processed is the order header table (PORDER).

If it is a back-to back order and the detail lines are processed, the following file classes are loaded: [F:SOH], [F:SOQ], [F:SOP].

If the detail lines are processed, the [F:ITM] file class is loaded.

The variables and classes given above must not be modified.

The following classes can be modified in order to load the specific or custom fields:

  • [F:POH] if FICHIER = PORDER and ABRFIC = POH.

  • [F:POP] if FICHIER = PORDERP and ABRFIC = POP.

  • [F:POQ] if FICHIER = PORDERQ and ABRFIC = POQ.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Yes

Sales order headers

SORDERP

Yes

Sales order price lines

SORDERQ

Yes

Sales order quantity lines

PORDER

Yes

Purchase order headers

PORDERP

Yes

Purchase order price lines

PORDERQ

Yes

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Yes

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationThe loading of the specific or custom fields in the file classes must be rigorous because it can lead to malfunctions.

CLCMNTPOH: Recalculation of the order line ex-tax amount

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a CLCMNTPOH action.

This action allows you to recalculate the ex-tax amount for the order line.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The call is made after the creation or modification of each order line in the screen entry mask, whether the order is entered manually or generated from the workbenches.

Available variables and masks

The following variables are loaded when calling the CLCMNTPOH action:

  • WABRMSK: Abbreviation of the mask containing the order lines.

  • POH2: Classic order management. In this context, the POH0, POH1 and POH3 screen masks are also available.

  • POI1: Order management by product or generation from the workbenches.

  • NOL: Line index being processed and that can be used with the screen mask specified by WABRMSK.

  • WCUR: Currency used to express the amount of the order line.

The variables and classes given above must not be modified.

The following variable can be modified to specify the new line amount to be taken into account:

WLINAMT: Ex-tax amount of the order line.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Yes

Business partner

BPSUPPLIER

Yes

Suppliers

BPSUPPMVT

No

Supplier transactions

PORDER

No

Purchase order headers

PORDERP

No

Purchase order price lines

PORDERQ

No

Purchase order quantity lines

PPRICLINK

No

Purchase price list search (Link)

FACILITY

No

Sites

ITMMASTER

Yes

Products

ITMBPS

No

Products - suppliers

ITMFACILITY

No

Product-sites

ITMMVT

No

Product-site movement totals

ORDERS

No

WIPs

TABCUR

No

Currencies

TABCOEFF

No

Coefficients

PERIOD

No

Periods

BUDPAR

No

Budget setup if accounting module is present

Note - informationThe entry of a new line ex-tax amount will automatically modify the amount including tax for the line, as well as the ex-tax and tax included totals for all the order lines. The modified line amount will be automatically rounded according to the currency of the order.

POHCLE: Completion or cancellation of the completion of an order line

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a POHCLE action.

This action allows you to perform additional updates during the completion or completion cancellation of a classic order line.

Context and operating method

Transaction

There is one transaction in progress.

Log file

Depending on the context of the call, a log file can be open.

Different call cases

The call is made before the order line re-write (PORDERQ [POQ] table) in all cases of order line completion or completion cancellation.

Available variables and classes

The following variables are loaded when calling the POHCLE action:

  • WTRAIT: Processing code used to identify the exact completion or completion cancellation context for an order line.

    • 1 = Classic order management.

    • 2 = Order completion function.

    • 3 = Supplier receipts.

    • 4 = Purchase invoice control (for non-received products).

    • 5 = Workbenches.

  • WCLEFLG: Completion flag.

    • 1 = Order line completion

    • 2 = Cancellation of order line completion

  • [F:POQ]: Order line (record of the PORDERQ table).

The variables and classes given above must not be modified.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

PORDER

No

Purchase order header

PORDERQ

Yes

Purchase order quantity lines

Note - informationThe log file is not open when the call comes from the invoice control (WTRAIT=4).

SRTPURORD: Line sort before order generation

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a SRTPURORD action.

This action allows you to perform specific or custom sorts on the lines of the buyer plan screen mask POI1, before the purchase orders.

This action is also used to avoid having a shortage for the ship-to-customer during a back-to-back order, or to carry out a shortage for each sales order, regardless of the back-to-back order, or to carry out a shortage each time the receiving site is changed.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The call is made before the standard sort of the PO1 screen lines from a buyer plan, a reorder plan, or an order reintegration following a supplier return.

Available variables and classes

The following variables are loaded at the time of the call to the SRTPURORD action:

  • CHOIX: Code used to identify the context (4= supplier return origin, other= workbench origin).

  • [M:POI1]: Screen mask containing the order lines to be sorted.

  • The CHOICE variable must not be modified.

The following variable must be modified if a specific or custom sort must replace the standard sort:

  • WSRTFLG: Sort flag.

    • 0 = No specific or custom sort has been carried out, it is necessary to execute the standard sort.

    • 1 = A specific or custom sort has been carried out, it is not necessary to execute the standard sort.

  • WFMIFLG: Shortage flag for the ship-to-customer in the case of direct back-to-back order.

    • 0 = Shortage (default value).

    • 1 = No shortage carried out, grouping by supplier for the same order.

  • WSOHFLG: Shortage flag for a sales order in the case of a direct or received back-to-back order.

    • 0 = Shortage, performing a supplier order for each sales order.

    • 1 = No shortage carried out (default value).

  • WRCPFLG: Shortage flag for the receiving site.

    • 0 = Shortage, performing a supplier order for each receiving site.

    • 1 = No shortage carried out (default value).

Note - warningThe specific sorta WSRTFLG=1, will need to be carried out.
  • WNAMCRITSPE: This variable with 250 characters is used to specify a list of fields to be used as additional shortage criteria.

It is recommended to separate the fields with the "~" character.

The concatenation of the field values with the delimiters cannot exceed 250 characters.

Note - warningThe specific sorta WSRTFLG=1, can be needed.

For example: Three specific fields to be used as additional shortages, an alpha, a date and a digit.

Copy
WNAMCRITSPE="[M:POI1]champ_alpha(nolign-1)+'~'+num$([M:POI1]champ_date(nolign-1))+'~'+num$([M:POI1]champ_num(nolign-1))"

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

No

Business partner

BPSUPPLIER

No

Suppliers

BPSUPPMVT

No

Supplier transactions

PORDER

No

Purchase order headers

PORDERP

No

Purchase order price lines

PORDERQ

No

Purchase order quantity lines

PPRICLINK

No

Purchase price list search (Link)

FACILITY

No

Sites

ITMMASTER

No

Products

ITMBPS

No

Products - suppliers

ITMFACILITY

No

Product-sites

ITMMVT

No

Product-site movement totals

ORDERS

No

WIPs

TABCUR

No

Currencies

TABCOEFF

No

Coefficients

PERIOD

No

Periods

BUDPAR

No

Budget setup if accounting module is present

Note - informationIf the context is a supplier return, the specific or custom sort of the lines is not necessary (CHOICE=4).

MAJENG: Used to intervene in the commitment amounts to be updated

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a MAJENG action.

This action allows you to intervene in the commitment or pre-commitment amounts to be updated, by taking into account, for example, the non-recoverable VAT amounts.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

The call is made on creation, modification or deletion of a purchase order line, regardless of the function used to manage the order.

  • The call is also made for the creation, modification, deletion or consumption of a purchase request line.

  • The call is also made upon commitment and pre-commitment resynchronization.

This call is made just before the call to the processing for commitment update.

Available variables and classes

The following variables are loaded when calling the MAJENG action.

  • WTYPMAJ: Code used to identify the context.

1= Processing for invoices to be received (de-commitment on accounting date).

The [F:PWH] and [F:PWD] file classes are loaded and available.

  • [F:PWD]AMTCUR: Commitment amount in the currency of the document [F:PWD]CUR.

  • [F:PWD]QTYBUDLIN: Quantity of the commitment in non-financial unit.

The update sign is -1.

The WOK_MAJENG variable is used to short-circuit the update of the de-commitment (0 = No, no update, 1 = Yes, update).

2 = Processing for invoices to be received (re-commitment on reversal date).

Same context as the previous one, except that the update sign is +1.

The WOK_MAJENG variable is used to short-circuit the update of the re-commitment (0 = No, no update, 1 = Yes, update

3 = Processing for credit memos to be received (re-commitment on accounting date).

The [F:PWE] and [F:PWR] file classes are loaded and available.

  • [F:PWR]AMTCUR: Commitment amount in the currency of the document [F:PWR]CUR.

  • [F:PWR]QTYBUDLIN: Quantity of the commitment in non-financial unit.

The update sign is +1.

The WOK_MAJENG variable is used to short-circuit the update of the re-commitment (0 = No, no update, 1 = Yes, update).

4 = Processing for credit memos (de-commitment on reversal date).

Same context as the previous one, except that the update sign is -1.

The WOK_MAJENG variable is used to short-circuit the update of the de-commitment (0 = No, no update, 1 = Yes, update).

5 = Processing for firm delivery requests.

The [F:POH], [F:POP] and [F:POQ] file classes are loaded and available.

  • WAMTCUR: Commitment amount in the currency of the document.

  • QTYUOM: Quantity of the commitment in non-financial unit.

The sign for the update is specified by WSIGN (+1 or –1).

If the [M:POD1] screen mask is open, the function used is the management of delivery requests.

If the [M:PMG] screen mask is open, the functions used are the workbenches.

6 = Processing for order lines.

The [F:POH], [F:POP] and [F:POQ] file classes are loaded and available.

  • WAMTCUR: Commitment amount in the currency of the document.

  • QTYUOM: Quantity of the commitment in non-financial unit.

The sign for the update is specified by SIGN (+1 or –1).

7 = Invoice validation.

The [F:POH], [F:POP] and [F:POQ] file classes are loaded and available.

  • WAMTCUR: Commitment amount in the currency of the document.

  • QTYUOM: Quantity of the commitment in non-financial unit.

The sign for the update is specified by WSIGN (+1 or –1).

8 = Processing for purchase request lines.

The [F:PSH] and [F:PSD] file classes are loaded and available.

  • WAMTCUR: Commitment amount in the currency of the document.

  • QTYUOM: Quantity of the commitment in non-financial unit.

The sign for the update is specified by WSIGN (+1 or –1).

9 = Consumption of purchase requests (taken into account for order creation).

The [F:PSH] and [F:PSD] file classes are loaded and available.

  • WAMTCUR: Commitment amount in the currency of the document.

  • QTYUOM: Quantity of the commitment in non-financial unit.

The sign for the update is specified by SIGN (+1 or –1).

10 = Pre-commitment resynchronization.

The [F:PSD] file class is loaded and available.

  • WDELTACUR: Pre-commitment variance amount in the currency of the document [F:PSD]CUR.

  • WDELTAQTY: Variance quantity for the pre-commitment in non-financial unit.

The sign for the update is specified by SIGN (+1 or –1).

11 = Commitment resynchronization.

The [F:POP] and [F:POQ] file classes are loaded and available.

  • WDELTACUR: Commitment variance amount in the currency of the document [F:POH]CUR.

  • WDELTAQTY: Variance quantity for the commitment in non-financial unit.

The sign for the update is specified by SIGN (+1 or –1).

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant context Table title

BPARTNER

No

Business partner

BPSUPPLIER

No

Suppliers

BPSUPPMVT

No

Supplier transactions

PORDER

Yes

Purchase order headers

PORDERP

Yes

Purchase order price lines

PORDERQ

Yes

Purchase order quantity lines

PREQUIS

Yes

Purchase request headers

PREQUISD

Yes

Purchase request lines

ITMMASTER

No

Products

ITMBPS

No

Products - Suppliers

Note - informationThe update of the pre-commitments is impacted by this entry point (WTYPMAJ = 8 or 9 or 10).

UOMPSHPOH: Used to retrieve the PO unit on the order line

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a UOMPSHPOH action.

This action allows you to retrieve the unit of the purchase request when it is converted into an order.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file depending on the context.

Different call cases

The call is made during the conversion of a purchase request into an order. There are three possible origins:

  • Creation of a purchase order via the classic order management.

  • Generation of a purchase order via the buyer's plan.

  • Generation of a purchase order via the other plans (enterprise planning, planning workbench, grouping).

This call is made just after the POP requirement is taken into account during the loading of the order line.

Available variables and classes

The following variables are loaded when calling the UOMPSHPOH action:

  • TRAIT: Code for the current processing (1 = classic orders, 2 = buyer plan, 3 = reorder plan).

  • NOL: Index of the order line being loaded ([M:POH2] mask if TRAIT=1 or [M:POI1] mask if TRAIT>1).

The [M:POH0], [M:POH1], [M:POH2] masks can be used only if the call is made from the standard orders (TRAIT=1).

The [M:POI1] mask is used only if the call is made for the workbenches (TRAIT=2 or TRAIT=3).

The variables and classes given above must not be modified.

The following variable can be modified in order to activate the retrieval of the unit of the purchase request.

  • WUOMFLG: Unit retrieval flag.

    • 0 = No retrieval (standard operation).

    • 1 = The order unit (or packing unit) is the unit of the purchase request.

    • 2 = The purchase unit of the order is the unit of the purchase request.

    • 3 = The order and purchase units of the order are the unit of the purchase request.

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant context Table title

BPARTNER

No

Business partner

BPSUPPLIER

No

Suppliers

BPSUPPMVT

No

Supplier transactions

PORDER

No

Purchase order headers

PORDERP

No

Purchase order price lines

PORDERQ

No

Purchase order quantity lines

ITMMASTER

Yes

Products

ITMBPS

No

Products - Suppliers

PWRKORDERS

Yes

Requirements taken into account

PREQUIS

No

Purchase request headers

PREQUISD

Yes

Purchase request lines

Note - informationWhen the retrieval of the purchase request unit is activated, the grouping of the purchase request lines is no longer carried out (one purchase request line = one order line).

BEFREWFMI: Loading the specific or custom fields before entry

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a BEFREWFMI action.

This action allows you to load specific or custom fields in the record of the sales order line table (PORDERQ) before said record is rewritten.

Note - informationThis entry point is called only during the automatic generations of back-to-back purchase orders coming from sales orders.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Different call cases

During the automatic generation of back-to-back purchase orders, the call is made before the re-write of the table for sales order lines (SORDERQ).

Available variables and masks

The following variables are loaded when calling the BEFREWFMI action:

  • [V]GOK: Set this global variable to 0 to abort the update transaction for the current order (Rollback), and to move to the next order to be processed.

  • [F:POQ]SOHNUM: Number of the sales order currently being processed.

  • [F:POQ]SOPLIN: Line of the sales order currently being processed.

  • [F:POQ]SOQSEQ: Line sequence of the sales order currently being processed.

The following classes are loaded: [F:POQ],[F:SOH], [F:SOP] et [F:ITM].

The variables and classes given above must not be modified.

The following class can be modified to load the specific or custom fields: [F:SOQ].

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Yes

Sales order headers

SORDERP

Yes

Sales order price lines

SORDERQ

Yes

Sales order quantity lines

PORDER

Yes

Purchase order headers

PORDERP

Yes

Purchase order price lines

PORDERQ

Yes

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Yes

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationThe loading of the specific or custom fields in the file classes must be rigorous because it can lead to malfunctions.

PRINTPOH: Printing generated purchase orders

This entry point, located in the TRTACHCDE1 processing for purchase order creation, generates a PRINTPOH action.

This action allows you to print purchase orders upon generation.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

Before generating purchase orders.

Available variables and masks

  • The [M:POI1] screen class is loaded.

The following variables can be modified if needed:

  • [M:POI1]PRTFLG: Print flag (1 = No, 2 = Yes).

  • [M:POI1]DOCNAM: Code of the report (e.g. BONCDE).

  • [M:POI1]PRTCOD: Destination (Printer name).

Open tables

In the table below, the significant content flag indicates that the content matches the context.

Table Significant content Table title

BPARTNER

Business partner

BPCUSTOMER

Customers

BPSUPPLIER

Suppliers

BPSUPPMVT

Supplier transactions

SORDER

Sales order headers

SORDERP

Sales order price lines

SORDERQ

Sales order quantity lines

PORDER

Purchase order headers

PORDERP

Purchase order price lines

PORDERQ

Purchase order quantity lines

PPRICLINK

Purchase price list search (Link)

FACILITY

Sites

ITMMASTER

Products

ITMBPS

Products - suppliers

ITMFACILITY

Product-sites

ITMMVT

Product-site movement totals

ORDERS

WIPs

TABCUR

Currencies

TABCOEFF

Coefficients

PERIOD

Periods

BUDPAR

Budget setup if accounting module is present

Note - informationSince the print choice is already made, this entry point is not essential if the purchase orders are generated from the buyer's plan.

UPDPSD: Avoid the update of the purchase request

Context and operating method

Transaction

There is no transaction in progress.

Log file

No trace file is open.

Code context

This entry point is located in the TRTACHCDE1 script (Purchase order tools library).

It allows you to avoid the update of the purchase request, when decreasing the quantity of a purchase order line or a purchase delivery request.

Available variables and masks

GFONCTION can be GESPOH (Purchase order management) or GESPOD (Delivery request management).

  • If GFONCTION = GESPOH: Masks POH* are opened and loaded.

  • If GFONCTION = GESPOD: Masks POD* are opened and loaded.

nolign-1 is the indice of the current line.

WUPDPSDFLG = [V]CST_AYES. Change WUPDPSDFLG to [V]CST_ANO to avoid the update the purchase request.

Open tables

Table Significant content Table title

PORDER

No

Purchase order header

PORDERP

No

Purchase order price lines

PORDERQ

No

Purchase order quantity lines

CMMUPDMGT: Avoid the update of commitment

Context and operating method

Transaction

There is no transaction in progress.

Log file

No trace file is open.

Code context

This entry point is located in the TRTACHCDE1 script (Purchase order tools library).

It allows you to avoid the update of the commitment when creating, updating, deleting or closing a purchase order line.

Available variables and masks

WABREV indicates what is currently being done.

  • WABREV = POQ: Create or delete an Order line.

  • WABREV = POQ1: Modify an Order line.

  • WABREV = POQ2: Close or unclose an Order line.

The WGPE variable is checked in the standard script after the entry point execution to know what to do.

  • If WGPE=0 (default value): the commitment update will be performed.

  • If WGPE <> 0: No update of commitment.

Open tables

Table Significant content Table title

PORDER

Yes

Purchase order header

PORDERP

Yes

Purchase order price lines

PORDERQ

Yes

Purchase order quantity lines