Entry points >  Module Financials >  Standard script CPTLET  

Display all Hide all

MAJLET: Before the line re-writing

The MAJLET entry point is used to insert additional logic during the update of the matching code in a file containing the accounting documents.

Context and operating mode

Transaction

There is one transaction in progress

Log file

If the TRACE variable is set to 1, it means that a log file is open. If TRACE is set to 0, there is no open log file.

Call case

The entry point is placed just before the re-write in the GACCENTRYD file (accounting document lines). It is possible, for example, to update a file in the file containing the postings.

Available variables and masks

Open tables

Table

Significant content

Table Title

COMPANY [CPY]

No

Companies

GACCENTRY [HAE]

Yes

Accounting documents

GACCENTRYD [DAE]

Yes

Accounting document lines

GACCDUDATE [DUD]

No

Open items

MATCHCODE [MTC]

No

Matches to be used

TABCUR [TCU]

No

Currencies

GACCOUNT [GAC]

                   No

Accounts

DIFC: Before generating a variance journal

Entry point DIFC is used to take control just before generating an exchange rate variance journal or a rounding variance journal.

Context and operating mode

Transaction

There is one transaction in progress

Log file

If the TRACE variable is set to 1, it means that a log file is open. If TRACE is set to 0, there is no open log file.

Call case

The entry point is located just before the call to the program used for the generation of an exchange rate variance journal or a rounding variance journal. Upon return of this entry point, the GPE variable is tested and used to generate (or not) the exchange rate or rounding variance journal.

Available variables and masks

The REFERENTIEL variable contains the ledger type on which the variance is seen.

Variables MONTDEV and MONTDIF respectively include the variance amounts in transaction currency and ledger currency.

The XTBECR (posting line number), XTBECH (open item number), XTBIPT (amount of the open item in the main and general ledger's currency) and XTBIPT2 (amount of the open item in the open item's currency) grids contain the data from the open items that belong to the matching group for which a variance has been seen. The number of open items in the group is in the XNBECH variable.

The GPE variable set to 1 is used to stop the generation of the variance journal.

Open tables

Table

Significant content

Table Title

COMPANY [CPY]

No

Companies

GACCENTRY [HAE]

Yes

Accounting documents

GACCENTRYD [DAE]

Yes

Accounting document lines

GACCDUDATE [DUD]

No

Open items

MATCHCODE [MTC]

No

Matches to be used

TABCUR [TCU]

No

Currencies

GACCOUNT [GAC]

                   No

Accounts

BEFHISDUD: Before the open items history update

The BEFHISDUD entry point is used to take back control before calling the sub-program used for updating the open items historization table so as to modify the event date of the record created in the HISTODUD table for the open item being matched.

Context and operating method

Transaction

There is one transaction in progress

Log file

If the TRACE variable is set to 1, it means that a log file is open. If TRACE is set to 0, there is no open log file.

Call case

The entry point is placed just before calling the HISTOECH sub-program used for updating the open items historization table. The local variable [L]EVTDAT is set as a parameter in the HISTOECH sub-program and is used to initialize the event date of the record in the HISTODUD table. 

Available variables and masks

By default, the local variable [L]EVTDAT is initialized at the most recent accounting found in the entries included in the group, but it can become specific if the event date of the HISTODUD table needs to be initialized in a different way.

Open tables

Table

Significant content

Table Title

COMPANY [CPY]

No

Companies

GACCENTRY [HAE]

Yes

Accounting documents

GACCENTRYD [DAE]

Yes

Accounting document lines

GACCDUDATE [DUD]

No

Open items

AFTCREVCR: After generating the profit and loss or exchange rate variance journa

The AFTCREVCR entry point is used to take the hand after generating a profit and loss journal, or exchange rate/rounding variance journal, in order to update a field included in the entries or load a specific table.

Context and operating method

Transaction

There is one transaction in progress

Log file

If the TRACE variable is set to 1, it means that a log file is open. If TRACE is set to 0, there is no open log file.

Call case

The entry point is set after calling the GEN_PIECE sub-program which generates a profit and loss journal. It is also set after the second call to the GEN_PIECE sub-program used either to generate an exchange rate variance journal (EUR currency in one case and not the other) or a rounding variance journal (if EUR currency everywhere).

Available variables and masks

The sized variable PCETYP includes the type of generated journal. IPCE is the current index of the variable

The PCENUM sized variable contains the number for the generated journal. IPCE is the current index of the variable

The REFERENTIEL variable contains the ledger type on which the variance is seen.

Variables MONTDEV and MONTDIF respectively include the variance amounts in transaction currency and ledger currency.

The XTBECR (entry line number), XTBECH (open item number), XTBIPT (amount of the open item in main general ledger currency) and XTBIPT2 (open item amount in open item currency) grids contain the data from the open items that belong to the matching group on which variances have been identified. The number of open items in the group is in the XNBECH variable.

Open tables

Table

Significant content

Table Title

COMPANY [CPY]

No

Companies

GACCENTRY [HAE]

Yes

Accounting documents

GACCENTRYD [DAE]

Yes

Accounting document lines

GACCDUDATE [DUD]

No

Open items