PECINVDTA : Order invoicing elements taken into account upon invoice

This entry point belongs to processing SUBPIHC update of invoicing elements in the invoice footer, and generates action "PECINVDTA".

The aim of this action is to give the possibility to take into account or not each invoicing element of the order or the receipt in order to update the invoice elements.

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 during the recovery loop concerning invoicing elements of the order or the receipt in order to update the invoice elements.

This is valid, no matter what method used to create the invoice line, be it by picking on an order or a receipt, or by manual entry.

Available variables

The [F:PVF] class is loaded during the call to the action "PECINVDTA".

[F:PVF]VCRTYP

Type of document currently being processed.

3 = Order

5 = Open order

6 = Receipt

[F:PVF]VCRNUM

Document number currently being processed

Code of the invoicing element being processed

The following screen masks are usable: [M:PIH0],[M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]

The previous classes must not be modified with the exception of the following.

Following variable must be modified in order to implement or not the taking into account of the element.

WPECFLG

Indicator for the taking into account

0 = No element is taken into account for this document

1 = Current element is not taken into account

2 = Current element is taken into account

3 = All the elements in the document are taken into account

Open tables

In the table below, the significant content flag indicates that the content is in phase with the context.

Table

Significant content

Table Title

PVCRFOOT

Yes

Footer elements in purchase documents

PINVOICE

No

Invoice header

PINVOICEV

No

Additional purchase invoice header

PINVOICED

No

Purchase invoice lines

PORDER

No

Purchase order header

PORDERQ

No

Purchase order quantity line

PORDERP

No

Purchase order price line

PRETURN

No

Return header

PRETURND

No

Supplier return line

PRECEIPT

No

Receipt header

PRECEIPTD

No

Receipt line

Miscellaneous remarks

MAJFAC: Loading or modification of fields before the write

This entry point is located in the SUBPIHC process saving of a purchase invoice, generates a "MAJFAC" action.

The goal of this actions is to give the possibility to load the specific/custom fields or to modify the standard fields in the tables updated by invoice control.

Context and operating mode

Transaction

There is one transaction in progress.

Log file

There is no open log file.

Different call cases

The call is made before the re-write for each table update during the saving of a purchase invoice.

Available variables and masks

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

FICHIER

Name of the table that will be rewritten (PORDERQ, PORDERC, PORDER, PRECEIPTD, PRECEIPT, PRETURND, PRETURN).

ABRFIC

Abbreviation for the table that will be rewritten (POQ, POC, POH, PTD, PTH, PND, PNH).

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

The following file classes are loaded: [F:PIH], [F:PIV] and [F:PID]

The variables and the classes given above must not be modified.

The following classes can be modified in order to populate specific fields and/or modify standard fields.

[F:POQ] if FICHIER = "PORDERQ" and ABRFIC = "POQ"

[F:POC] if FICHIER = "PORDERC" and ABRFIC = "POC"

[F:POH] if FICHIER = "PORDER" and ABRFIC = "POH"

[F:PTD] if FICHIER = "PRECEIPTD" and ABRFIC = "PTD"

[F:PTH] if FICHIER = "PRECEIPT" and ABRFIC = "PTH"

[F:PND] if FICHIER = "PRETURND" and ABRFIC = "PND"

[F:PNH] if FICHIER = "PRETURN" and ABRFIC = "PNH"

It is advisable to modify the standard fields with extreme prudence to avoid later malfunctioning.

Open tables

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

Table

Significant content

Table Title

PINVOICE

Yes

Invoice header

PINVOICEV

Yes

Additional purchase invoice header

PINVOICED

Yes

Purchase invoice lines

ITMMASTER

Yes

Products

Miscellaneous remarks

This entry point is called for all the invoice types.

[M:PIH0]PIHTYP (1=invoice, 2=additional invoice, 3=credit note, 4=credit note on return)