CALECHE: Modify open items on invoice creation

This entry point is located in the SUBPIHA processing (saving of purchase invoices). It generates a CALECHE action.

The purpose of this action is to allow the modification of the open items, for example the dates, amounts, payment methods, etc.

Context and operating mode

Transaction

There is a transaction in process: it is possible to cancel the transaction by setting the GOK to 0.

Log file

There is no open log file.

Different call cases

The call is performed after the invoice header ([F :PIH] and [F :PIV]) has been written or re-written following the selection of the "Create" or "Save" button.

In all cases, both invoice headers, detail lines and open items have been created.

Available variables and masks

The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]

The classes mentioned above should not be modified.

Open tables

In the table below, the Significant content flag means that the content matches the context.

Table

Significant content

Table title

PINVOICE

Yes

Invoice header

PINVOICEV

Yes

Purchase invoice header addition

PINVOICED

No

Purchase invoice lines

BPARTNER

No

Business partners

BPSUPPLIER

No

Suppliers

Miscellaneous remarks

Caution: the GACCDUDATE table containing the open items is only open if GREP = "C".

It is recommended to execute the following instruction before using this table:

If !clalev([F:DUD]) Local File GACCDUDATE [DUD] : Endif

AUZSPEFLDMOD: Possibility to modify specific fields

This entry point is located in the SUBPIHA processing (saving of purchase invoices). It generates an AUZSPEFLDMOD action.

The purpose of this action is to allow the modification of specific fields.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Different call cases

The call is performed in the $AVANT_MOD action. It is used to allow the modification of a specific field.


Available variables and masks


Before calling the entry point, the integer-type WAUZMOD variable is set to 1.

To allow the modification of the current specific field (COUZON), you need to set the WAUZMOD variable to 2.


Example of code to write to edit the YMYFIELD field.

If COUZON = "YMYFIELD": WAUZMOD = 2: Endif

The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]


Open tables

In the table below, the Significant content flag means that the content matches the context.

Table

Significant content

Table title

PINVOICE

Yes

Invoice header

PINVOICEV

Yes

Purchase invoice header addition

PINVOICED

No

Purchase invoice lines

BPARTNER

No

Business partners

BPSUPPLIER

No

Suppliers

CHGACCFCY: change of site to control analytical dimension types

This entry point is located in the SUBPIHA processing (saving of purchase invoices). It is used to intervene after selecting the Create or Save buttons.

The purpose is to allows the modification of the site used to control the analytical dimension types of the invoice lines.

Context and operating mode

Transaction

There is no transaction in process.

Log file

There is no open log file.

Different call cases

The call is performed during the creation or modification of a purchase invoice.

Available variables and masks

The WFCY variable is loaded during the call. It includes the financial site of the invoice header site. This variable can be modified.

The following masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]

The classes specified above should not be modified.

Open tables

In the table below, the Significant content flag means that the content matches the context.

Table

Significant content

Table title

PINVOICE

No

Invoice header

PINVOICEV

No

Purchase invoice header addition

PINVOICED

No

Purchase invoice lines