DETSTJ: Used to define the value of the average cost.

This entry point is called for each event triggering an adjustment, i.e. for each record in the STKMVTADJ table.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Variables

GPE: 0: the average cost is recalculated up to the document (included) in [STJ2], starting with the average cost of the day and successively going through the subsequent transactions.
         1: the average cost is recalculated from the transaction in [STJ2] (the value of the document line is retrieved)
         2: the average cost (LTABQTYACT and LTABAM) is populated in the EP and the current transaction [STJ2] does not need to be readjusted.

Caution: The DETSTJTRS entry point may be needed to use this entry point.

Tables

Name 

Significant
content

Description

TABCUR [TCU]

Yes

Currency table

STKMVTADJ [SMA]

Yes

Issue adjustment origins

STOJOU [STJ2]

Yes

Stock transactions triggering the adjustment

DETSTJTRS: Used to define the value of the average cost when changing the site

This entry point is called when the site being processed is changed. This occurs when an inter-site transfer receipt transaction is found even though the delivery transaction has been adjusted.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is an open log file.

Variables

GPE: 0: the average cost is recalculated up to the document ( not included) in [STJ2], starting with the average cost of the day and successively going through the subsequent transactions.
         1: /
         2: the average cost (LTABQTYACT and LTABAMT) is populated in the EP.

Tables

Name 

Significant
content

Description

TABCUR [TCU]

Yes

Currency table

STKMVTADJ [SMA]

Yes

Issue adjustment origins

STOJOU [STJ2]

Yes

Stock transactions triggering the adjustment