TRSTYPACC: Indicating if a movement type is valued and can thus be posted

Use this entry point to intervene on a variable to know whether a movement type is valued and can thus be posted.

The variable is initialized with default values, in other words values managed in standard mode. Modifying a value requires to manage in specific mode the valuation of the movement type concerned.

Context and operating mode

Transaction

There can be a transaction in progress (test the context).

Log file

There can be an open log file (test the context).

Available variables and masks

Variable or mask

Definition

LTABTRS

Grid whose index corresponds to the movement type number. For each index the value 1 means that the movement type is not valued and not posted. The value 0 is used so that the movement type can be valued and posted.

  

CHGPRIORD: Accessing the order price coming from a source movement

Use this entry point to modify the order price of the stock movements to generate when this order price comes from the order price of a source movement.

Context and operating method

Transaction

There is one transaction in progress.

Log file

There is an open log file if GTRACE <> ‘’.

Different call cases - Significant variables

This entry point is located in the LOAD_FROM_STJ label of the STKVALMAJ processing.

It is called once the order price of the source movement is retrieved.

The order price is retrieved in this way (when a original document exists), in the following update processings:

-         Inter-site (and intra-company) supplier receipt

-         Customer return

-         Stock reintegration

-         Supplier return

-         Put-away plan

-         Miscellaneous issue corresponding to the disassembly of an assembly

The significant variables are:

[M :STW]STOFCY                = Site

[M :STW]TRFFCY                 = Original site for the transfer (if inter-site supplier receipt)

 [M :STW]TRSTYP                = Movement type (local menu no. 704)

[M :STW]VCRTYP                = Document type (local menu no. 701)

[M :STW]VCRNUM              = Document number

[M :STW]VCRLIN                = Document line

[M :STW]VCRTYPORI         = Original document type (local menu no. 701)

[M :STW]VCRNUMORI       = Original document number

[M :STW]VCRLINORI          = Original document line

[M :STW]ITMREF                = Product

The fields that must be entered are located in the [M:SVW] mask. Each line of [M:SVW]NBLIG is linked to the same line of [M:STW]NBLIG.

Each value added to the total price [M:SVW]PRIORD(I) and/or [M:SVW]PRIVAL(I) must also be added in its detail (material cost, machine, invoicing elements, etc.)

For example:

To add transportation costs (25 euros) to the order price for an inter-site receipt by considering that these costs are invoicing elements:

If [M :STW]TRSTYP=3
    [M:SVW]PRIORD(I)+=25
    [M:SVW]OINVDTACST(I)+=25
Endif

If we take into consideration that the additional cost must be added in the material part of the product cost group:

If [M :STW]TRSTYP=3
    [M:SVW]PRIORD(I)+=25
    [M:SVW]OMATTOT(I)+=25
    [M:SVW]OMATCST([F:ITM]BRDCOD-1 + I*GACTMAT)+=25
Endif

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded…).

Table

Significant content

Table Title

ITMMASTER

Yes

Products

ITMFACILIT

Yes

Products sites

STOJOU

No

Stock movements

STOCK

No

Stock

STOLOT

No

Lot

STOLOC

No

Location

TABLOCTYP

No

Location type