SUBPIHD processing: SUBPIHD
PIHOVEINV: Allocation with over-invoicing on receipt
This entry point located in the SUBPIHD processing (saving of a purchase invoice), generates a "PIHOVEINV" action.
The purpose of this action is to give the possibility to allocate or not the over-invoiced quantity for existing receipts.
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 when saving a purchase invoice line.
Available variables and masks
The following variables are loaded when calling the "PIHOVEINV" action.
SIGN
Equals 1 in creation and -1 in deletion.
WQTE
Invoicing excess quantity.
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], [F:PID] and [F:PTD]
The variables and the classes given above must not be modified.
The following variables can be modified.
WPIHOVEINV
Allocation flag on other receipts (0=No, 1=Yes).
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 |
PINVOICE |
Yes |
Invoice header |
PINVOICEV |
Yes |
Additional purchase invoice header |
PINVOICED |
Yes |
Purchase invoice lines |
PRECEIPT |
Yes |
Receipt header |
PRECEIPTD |
Yes |
Receipt line |
Miscellaneous remarks
This entry point is only called in case of over-invoicing
CPRFAC: Unitary production cost
This entry point is located in the SUBPIHD process saving of a purchase invoice, generates a "CPRFAC" action.
The goal of this action is to give the possibility to intervene in the calculated unitary production code to add additional charges for example.
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 write or re-write of the invoice line after having used the "Create" or "Save" key.
Available variables and masks
The following variable is loaded at the time of the call to the "CPRFAC" action.
NOL
Index for the invoice line being processed (can be used with the [M:PIH3] class).
The following screen masks can be used: [M:PIH0], [M:PIH1], [M:PIH2], [M:PIH3], [M:PIH4]
The variable and the classes given above must not be modified.
[F:PID]CPR
Calculated unitary production price, which can be modified by the entry point in order take into account other elements.
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 |
Miscellaneous remarks
This entry point is not called for additional invoices and credit notes in amount.
MAJFAC: Loading or modification of fields before the write
This entry point is located in the SUBPIHD 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)
MAJRCPCDE: Update of receipts and orders after credit memo
This entry point, which is located in the SUBPIHD process for saving a purchase invoice, generates a "MAJRCPCDE" action.
When creating or modifying a credit memo line, the order and the receipts are set to Not invoiced.
The purpose of this action is to make it possible to avoid updating the receipts and orders when creating/modifying a credit memo line.
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 performed during the creation or modification of a purchase credit memo line.
Available variables and masks
The following variables are loaded when calling the "MAJRCPCDE" action.
WMAJRCPCDE
Specifies if the update of the order and the receipts must be performed. Enter the value for which the updates are not performed.
The following file classes are loaded: [F:PIH], [F:PIV] and [F:PID]
The [F:PIDB] class is loaded with the original invoice line.
The variables and the classes given above must not be modified.
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 |
Miscellaneous remarks
This entry point is only called in case of credit memo.
[M:PIH0]PIHTYP (1=invoice, 2=additional invoice, 3=credit note, 4=credit note on return)