SUBBIH script: Open item updates
MAJECH: open item changes
This entry point is used to customize the fields of each open item created when creating or modifying an invoice.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is no open log file.
Different call cases
This entry point is called when creating an invoice or when modifying the payment condition, the amounts or the beginning due date of an invoice.
It is more precisely located in the open item creation loop and it is used to customize any field in the open item.
Available variables and masks
The [M:BIC0,1,2,3], [M:SIH1,1,2,3], [M:SIH1,2,4] or [M:PIH1,3,4] classes as well as the [F:SIH] or [F:PIH] classes are available depending on the function used: Customer BP invoices, Supplier BP invoices, Sales invoices or Purchase invoices.
The NBECH variable indicates the number of open items to be created (the maximum number is arbitrarily set to 50). The NOL variable is the tracking index of open items in the creation process (therefore NOL varies from 1 to NBECH).
The fields to be loaded are those of the [F:DUD] class.
Variable or mask |
Definition |
Masks [M:BIC0,1,2,3] |
Customer BP invoices |
Masks [M:BIS0,1,2,3] |
Supplier BP invoices |
Masks [M:SIH1,2.4] |
Sales invoices |
Masks [M:PIH1,3.4] |
Purchase invoices |
Integer NBECH |
Number of open items to be created |
Integer NOL |
Index of the open item in creation progress |
Open tables
Table |
Significant content |
Table Title |
GACCDUDATE [DUD] |
Yes |
Open items |
SINVOICE [SIH] |
Yes |
Customer BP invoices |
PINVOICE [PIH] |
Yes |
Supplier BP invoices |
GTYPACCENT [GTE] |
Yes |
Entry types |
FACILITY [FCY] |
Yes |
Sites |
COMPANY [CPY] |
Yes |
Companies |
TABCUR [TCU] |
Yes |
Currencies |
CREECH: Open item creation
This entry point is used to create open items when creating or modifying an invoice.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is no open log file.
Different call cases
This entry point is called when creating an invoice or when modifying the payment condition, the amounts or the beginning due date of an invoice.
It is located before the open item creation loop.
Available variables and masks
The [M:BIC0,1,2,3], [M:SIH1,1,2,3], [M:SIH1,2,4] or [M:PIH1,3,4] classes as well as the [F:SIH] or [F:PIH] classes are available depending on the function used: Customer BP invoices, Supplier BP invoices, Sales invoices or Purchase invoices.
The NBECH variable indicates the number of open items to be created (the maximum number is arbitrarily set to 50). It is therefore necessary to increment this variable before adding the open items to the storage variables.
The information related to the open items to be created is stored in the following variables:
- ECHDAT(1..NBECH): due date
- ECHPAM(1..NBECH): payment method
- ECHTYP(1..NBECH): payment type
- ECHMNT(1..NBECH): entry currency amount
- ECHLOC(1..NBECH): company currency amount
- ECHRPT(1..NBECH): reporting currency amount
as well as the BONAPAY variables (Payment approval level), RELANCE (Yes/No type), and TYPTIERS. This last variable is set to 1 if the business partner is a customer, or 2 if he/she is a supplier.
Note: the information present in the indexed variables have been deducted from the payment condition.
Variable or mask |
Definition |
Masks [M:BIC0,1,2,3] |
Customer BP invoices |
Masks [M:BIS0,1,2,3] |
Supplier BP invoices |
Masks [M:SIH1,2.4] |
Sales invoices |
Masks [M:PIH1,3.4] |
Purchase invoices |
Integer BONAPAY |
Good to pay level |
Integer RELANCE |
Reminder (local menu Y/N) |
Integer TYPTIERS |
Business partner type |
Open tables
Table |
Significant content |
Table title |
GACCDUDATE [DUD] |
No |
Open items |
SINVOICE [SIH] |
Yes |
Customer BP invoices |
PINVOICE [PIH] |
Yes |
Supplier BP invoices |
GTYPACCENT [GTE] |
Yes |
Entry types |
FACILITY [FCY] |
Yes |
Sites |
COMPANY [CPY] |
Yes |
Companies |
TABCUR [TCU] |
Yes |
Currencies |
IMPECH: open item modification
This entry point is used to customize the fields on each open item created during an invoice import.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Different call cases
This entry point is called when importing an invoice with these open items. It is more precisely located in the open item update loop and it is used to customize any field in the open item.
Note: when importing a file which includes the open items, the IMPECH entry point is used. When importing invoices without the "open item" records, the CREECH and MAJECH entry points are used.
Available variables and masks
The [M:DUD1] class (associated to the BPCDUD or BPSDUD screen) as well as the the [F:SIH] or [F:PIH] classes are available depending on the context: BP customer or BP supplier invoice import.
The [M:DUD1]NBECH variable indicates the number of open items to be created (the maximum number is arbitrarily set to 50). The nolign variable is the tracking index of open items in the creation process (therefore nolign varies from 1 to NBECH).
The fields to be loaded are those of the [F:DUD] class.
Variable or mask |
Definition |
Mask BPCDUD [M:DUD1] |
Customer BP invoices |
Mask BPSDUD [M:DUD1] |
Supplier BP invoices |
Integer [M:DUD1]NBECH |
Number of open items to be created |
Integer nolign |
Index for the open item in the process of creation |
Open tables
Table |
Significant content |
Table Title |
GACCDUDATE [DUD] |
Yes |
Open items |
SINVOICE [SIH] |
Yes |
Customer BP invoices |
PINVOICE [PIH] |
Yes |
Supplier BP invoices |
FACILITY [FCY] |
Yes |
Sites |
COMPANY [CPY] |
Yes |
Companies |
TABCUR [TCU] |
Yes |
Currencies |
FLTDUD: Open item filter
This entry point is used to display the open item schedule during the SAIECHBIC & SAIECHBIS actions. In standard, these actions are associated to the 'Open items' button available in all invoice functions.
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is no open log file.
Different call cases
This entry point is called when viewing the open item schedule associated to an invoice.
In standard, the displayed open item schedule is linked to the ACCNUM of the invoice.
This entry point is used to filter the open item file in a different manner.
Available variables and masks
The [M:BIC0,1,2,3], [M:SIH1,1,2,3], [M:SIH1,2,4] or [M:PIH1,3,4] classes as well as the [F:SIH] or [F:PIH] classes are available depending on the function used: Customer BP invoices, Supplier BP invoices, Sales invoices or Purchase invoices.
The FLTDUD variable, which is 250 characters long, contains the filter for the GACCDUDATE open item table.
In standard, this variable contains: [L]FLTDUD="ACCNUM="+num$(NUMECH)
.
Variable or mask |
Definition |
Masks [M:BIC0,1,2,3] |
Customer BP invoices |
Masks [M:BIS0,1,2,3] |
Supplier BP invoices |
Masks [M:SIH1,2.4] |
Sales invoices |
Masks [M:PIH1,3.4] |
Purchase invoices |
Mask BPCDUD [DUD1] |
Customer BP invoices or sales invoices |
Mask BPCDUD [DUD1] |
Customer BP invoices or sales invoices |
Open tables
Table |
Significant content |
Table Title |
GACCDUDATE [DUD] |
No |
Open items |
SINVOICE [SIH] |
Yes |
Customer BP invoices |
PINVOICE [PIH] |
Yes |
Supplier BP invoices |
GTYPACCENT [GTE] |
Yes |
Entry types |
FACILITY [FCY] |
Yes |
Sites |
COMPANY [CPY] |
Yes |
Companies |
TABCUR [TCU] |
Yes |
Currencies |
BEFWRIDUD: Before writing a line in the open item schedule
This entry point is used to take control just before rewriting the GACCDUDATE table to modify the value of some fields of the table or to initialize some custom fields that have been added (open item schedule accessed from the SAIECHBIC & SAIECHBIS actions in standard; these actions are associated to the “Open items” button in all invoices functions).
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is no open log file.
Different call cases
This entry point is used to take control just before the recording of an open item at the open item schedule recording from invoices.Available variables and masks
The [M:BIC0,1,2,3], [M:SIH1,1,2,3], [M:SIH1,2,4] or [M:PIH1,3,4] classes as well as the [F:SIH] or [F:PIH] classes are available depending on the function used: Customer BP invoices, supplier BP invoices, Sales invoices or Purchase invoices.
Variable or mask | Definition |
Masks [M:BIC0,1,2,3] | Customer BP invoices |
Masks [M:BIS0,1,2,3] | Supplier BP invoices |
Masks [M:SIH1,2.4] | Sales invoices |
Masks [M:PIH1,3.4] | Purchase invoices |
Mask BPCDUD [DUD1] | Customer BP invoices or sales invoices |
Mask BPCDUD [DUD1] | Customer BP invoices or sales invoices |
Open tables
Table | Significant content | Table title |
GACCDUDATE [DUD] | No | Open items |
SINVOICE [SIH] | Yes | Customer BP invoices |
PINVOICE [PIH] | Yes | Supplier BP invoices |
GTYPACCENT [GTE] | Yes | Entry types |
FACILITY [FCY] | Yes | Sites |
COMPANY [CPY] | Yes | Companies |
TABCUR [TCU] | Yes | Currencies |