Process FUNDEB: EEC Exchange Declaration
DEBINI: Update of the default values
This entry point is used to modify the default values for the EU rule and nature information.
Context and operating method
Transaction
There is no transaction in progress.
Log file
There is no open log file.
Call context
This entry point is called:
- In order to initialize the rule and nature fields of the EU data entry window for receipts, deliveries, purchase and sales returns, invoices and purchase and sales credit memos
- To directly load the nature and rule fields from the tables:
o Return header sales SRETURN
o Purchase return header PRETURN
o Delivery header SDELIVERY
o Receipt header PRECEIPT
o Invoice header/credit memosales SINVOICE
o Purchase invoice/credit memo header PINVOICE
Available variables and masks
The default values of the nature and rule fields are contained in setup table DEBREGNAT. The latter contains values for rules and natures depending on the entry type, the legislation, the country and the group of sites defined. Local variable I_EEC is initialized with the entry type linked to the document.
The entries taken into account are:
1 Normal delivery
2 intercompany delivery
3 Loan delivery
4 Sub-contract delivery
5 Intersite delivery
6 Export delivery with forwarding agent
7 Direct order delivery
8 Normal receipt
9 Sub-contract receipt
10 Intersite receipt
11 Inter-company receipt
12 Customer return
13 Loan return
14 Supplier return
15 Sales invoices
16 Sales credit memo
17 Loan invoices
18 Free item delivery
19 Sub-contract material return
As a function of the operation type, the standard process delivers the IM_FLUX, IM_NAT, IM_SCH, IV_FLUX, IV_NAT, IV_SCH variables.
- Operation type
o Customer delivery: ABIDC3 = "SDH"
o Customer return: ABIDC3= "SRH"
o Customer invoice: ABIDC3="SIV" and [F:SIV]INVTYP=1
o Customer credit memo: ABIDC3="SIV" and [F:SIV]INVTYP=2
o Supplier receipt: ABIDC3= "PTH"
o Supplier return: ABIDC3= "PNH"
o Supplier invoice/credit memo: ABIDC3= "PIH"
The entry point is used to modify the IM_FLUX, IM_NAT, IM_SCH, IV_FLUX, IV_NAT, IV_SCH values.
Open tables
Using the [F] class in the principal context table; its contents are significant and must not be modified.
- Customer delivery : SDELIVERY [SDH]
- Customer return: SRETURN [SRH]
- Customer invoice and credit memo: SINVOICEV [SIV]
- Supplier receipt: PRECEIPT [PTH]
- Supplier return: PRETURN [PNH]
- Supplier invoice and credit memo: PINVOICE [PIH]
Moreover, following table are open under abbreviation codes. Their content is not significant.
- Entry rule and nature DEBREGNAT [DRN]
- New buffers (in order to save those of the main processing)
o Site groups FACGROUP in [FGRR]
o Site/company groups AGRPFCY in [AGFF]
o Sites FACILITY in [FCYY]
DEBFIL: Add selection criteria to the invoices to be processed
This entry point is used to insert additional logic during the selection criteria definition of the purchase or sales invoices during the generation of the Intrastat file.
It is used to add additional filters on these contracts.
It is called in the FUNDEB process for the generation of the Intrastat file (DEB).
Context and operating method
Transaction
There is no transaction in progress.
Log file
There is an open log file.
Call context
This entry point is called during the selection criteria definition.
Available variables and masks
The invoice selection mask [M :DIA] (DDEB) is still available.
The standard criteria are loaded in the CRITERE variable. They concern:
. For receipts, the header files PRECEIPT.
. For purchase returns, the header files PRETURN.
. For purchase invoices, the invoice header files PINVOICE.
. For deliveries, the header files SDELIVERY.
. For sales returns, the header files SRETURN.
. For sales invoices/memos, the invoice header files SINVOICE.
The FILSUP variable has been created to add additional criteria. It has a length of 250 characters. To aid the functioning during the evaluation, FILSUP is initialized to the string "1=1" if it has not been loaded by the entry point.
It is sufficient to complete it in the entry point.
For instance : Add an additional filter: customer code must be greater or equal to "CLI".
FILSUP -= ‘ & BPCORD >= "CLI"’
FILSUP is evaluated at the same time as CRITERE, during the for loop.
The for loops to go through the different documents are performed on the concerned header table abbreviations. The criteria must relate to fields of header files (example: for receipts, the for loop concerns file PRECEIPT).
Open tables
In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...
Table |
Significant content |
Table Title |
DEB |
No |
Intrastat reporting |
DEBPAR |
No |
Intrastat reporting setups |
COMPANY |
Yes |
Company |
FACILITY |
No |
Site |
TABCOUNTRY |
No |
Country table |
TABCOEF |
No |
Coefficient table |
BPARTNER |
No |
BP |
BPSUPPLIER |
No |
Suppliers |
BPDLVCUST |
No |
Ship-to customer |
BPADDRESS |
No |
Addresses |
ITMMASTER |
No |
Products |
TABCUR |
No |
Currency table |
SINVOICE |
No |
Sales invoices |
SINVOICEV |
No |
Sales invoices |
SINVOICED |
No |
Sales invoice lines |
SDELIVERY |
No |
Deliveries |
SDELIVERYD |
No |
Shipment lines |
SRETURN |
No |
Sales returns |
SRETURND |
No |
Sales return lines |
PINVOICE |
No |
Purchase invoices |
PINVOICEV |
No |
Purchase invoices |
PINVOICED |
No |
Purchase invoice line |
PRECEIPT |
No |
Receipts |
PRECEIPTD |
No |
Receipt lines |
PRETURN |
No |
Purchase returns |
PRETURND |
No |
Purchase return lines |
PORDER |
No |
Purchase order |
PORDERP |
No |
Purchase order lines |
DEBCTL : Control on the purchase and sales invoices
This entry point is used to insert additional logic at the time of the invoice control before the generation of the Intrastat file records.
It concerns the purchase and sales invoices.
It is called in the FUNDEB process for the generation of the Intrastat file (DEB).
Context and operating method
Transaction
There is no transaction in progress.
Log file
There is an open log file.
Call context
This entry point is called at invoice control begin, before going through the document lines in order to fill in the work mask which content is passed on to DEB table via transclass.
Available variables and masks
Values of variable WUPDFIL and concerned documents:
- if "PTH" – this is a receipt
- if "PNH" – this is a purchase return
- if "PIH" – this is an invoice (the type of the document must be tested in order to know whether this is an invoice or a credit memo)
- if "SDH" – this is a delivery
- if "SRH" – this is a sales return
- if "PIH" – this is an invoice or sales credit memo (the type of the document must be tested in order to know whether this is an invoice or a credit memo)
The value of the WUPDTYP variable determines the type of update flow:
- WUPDTYP=11
o Purchase introduction (purchase invoices or receipts)
o Use the abbreviation contained in variable WUPDFIL (in this case: either PTH or PIH)
- WUPDTYP=12
o Sales introduction (Sales returns or sales credit memos on returns and credit memos with physical movement)
o Use the abbreviation contained in variable WUPDFIL (in this case: either SRH, or SIH)
- WUPDTYP=21
o Purchase shipment (Purchase returns)
o Use the abbreviation contained in variable WUPDFIL (in this case: PNH)
- WUPDTYP=22
o Sales shipments (Deliveries or Invoices and credit memos on invoice without movement)
o Use the abbreviation contained in variable WUPDFIL (in this case: either SDH, or SIH)
Open tables
In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...
Table | Significant content | Table Title |
DEB | Yes | Intrastat reporting |
DEBPAR | Yes | Intrastat reporting setups |
COMPANY | Yes | Company |
FACILITY | No | Site |
TABCOUNTRY | No | Country table |
TABCOEF | No | Coefficient table |
BPARTNER | No | BP |
BPSUPPLIER | No | Suppliers |
BPDLVCUST | No | Ship-to customer |
BPADDRESS | No | Addresses |
ITMMASTER | No | Products |
TABCUR | Yes | Currency table |
SINVOICE | Yes if WUPDFIL = "SIH" | Sales invoices |
SINVOICEV | Yes if WUPDFIL = "SIH" | Sales invoices |
SINVOICED | No | Sales invoice lines |
SDELIVERY | Yes if WUPDFIL = "SDH" | Deliveries |
SDELIVERYD | No | Shipment lines |
SRETURN | Yes if WUPDFIL = "SRH" | Sales returns |
SRETURND | No | Sales return lines |
PINVOICE | Yes if WUPDFIL = "PIH" | Purchase invoices |
PINVOICEV | Yes if WUPDFIL = "PIH" | Purchase invoices |
PINVOICED | No | Purchase invoice line |
PRECEIPT | Yes if WUPDFIL = "PTH" | Receipts |
PRECEIPTD | No | Receipt lines |
PRETURN | Yes if WUPDFIL = "PNH" | Purchase returns |
PRETURND | No | Purchase return lines |
PORDER | No | Purchase order |
PORDERP | No | Purchase order lines |
DEBMAJ : Additional updates to the Intrastat file (DEB)
This entry point is used to insert additional logic during the generation of the Intrastat file.
It is used to modify the contents of the record created. It is necessary to set the variable GPE=1 to not create the record.
It is called in the FUNDEB process for the generation of the Intrastat file (DEB).
Context and operating method
Transaction
There is one transaction in progress.
Log file
There is an open log file.
Call context
This entry point is called before the writing of the record in the Intrastat table.
Available variables and masks
The value of the WUPDTYP variable determines the type of update flow:
- WUPDTYP=11 Purchase introduction
- WUPDTYP=12 Sales introduction
- WUPDTYP=21 Purchase shipments
- WUPDTYP=22 Sales shipments
Values of variable WUPDFIL and concerned documents:
- if "PTH" – this is a receipt
- if "PNH" – this is a purchase return
- if "PIH" – this is an invoice (the type of the document must be tested in order to know whether this is an invoice or a credit memo)
- if "SDH" – this is a delivery
- if "SRH" – this is a sales return
- if "PIH" – this is an invoice or sales credit memo (the type of the document must be tested in order to know whether this is an invoice or a credit memo)
Open tables
In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded...). Traditionally, this is the case for the file that contains the header and not the file that contains the lines...
Table |
Significant content |
Table Title |
DEB |
Yes |
Intrastat reporting |
DEBPAR |
Yes |
Intrastat reporting setups |
COMPANY |
Yes |
Company |
FACILITY |
No |
Site |
TABCOUNTRY |
No |
Country table |
TABCOEF |
No |
Coefficient table |
BPARTNER |
No |
BP |
BPSUPPLIER |
No |
Suppliers |
BPDLVCUST |
No |
Ship-to customer |
BPADDRESS |
No |
Addresses |
ITMMASTER |
No |
Products |
TABCUR |
Yes |
Currency table |
SINVOICE |
Yes if WUPDFIL = "SIH" |
Sales invoices |
SINVOICEV |
Yes if WUPDFIL = "SIH" |
Sales invoices |
SINVOICED |
No |
Sales invoice lines |
SDELIVERY |
Yes if WUPDFIL = "SDH" |
Deliveries |
SDELIVERYD |
No |
Shipment lines |
SRETURN |
Yes if WUPDFIL = "SRH" |
Sales returns |
SRETURND |
No |
Sales return lines |
PINVOICE |
Yes if WUPDFIL = "PIH" |
Purchase invoices |
PINVOICEV |
Yes if WUPDFIL = "PIH" |
Purchase invoices |
PINVOICED |
No |
Purchase invoice line |
PRECEIPT |
Yes if WUPDFIL = "PTH" |
Receipts |
PRECEIPTD |
No |
Receipt lines |
PRETURN |
Yes if WUPDFIL = "PNH" |
Purchase returns |
PRETURND |
No |
Purchase return lines |
PORDER |
No |
Purchase order |
PORDERP |
No |
Purchase order lines |
DEBCTLLIG: Is used to approve or reject a line
This entry point is used to insert additional logic during the generation of the Intrastat file.
It is used to approve or reject a line upon extraction of documents in Intrastat (DEB). It is necessary to set variable GPE=1 in order to reject a line.
It is called in the FUNDEB process for the generation of the Intrastat file (DEB).
Context and operating method
Transaction
There is one transaction in progress. This is not the case for purchase return lines whose transaction is open after calling the entry point.
Log file
There is an open log file.
Call context
This entry point is called before loading the fields of work mask DEB with line elements.
Available variables and masks
The value of the WUPDTYP variable determines the type of update flow:
- WUPDTYP=11 Purchase introduction
- WUPDTYP=12 Sales introduction
- WUPDTYP=21 Purchase shipments
- WUPDTYP=22 Sales shipments
Values of variable WUPDFIL and concerned documents:
- if "PTH" – this is a receipt
- if "PNH" – this is a purchase return
- if "PIH" – this is an invoice (the type of the document must be tested in order to know whether this is an invoice or a credit memo)
- if "SDH" – this is a delivery
- if "SRH" – this is a sales return
- if "PIH" – this is an invoice or sales credit memo (the type of the document must be tested in order to know whether this is an invoice or a credit memo)
Open tables
In the table below, the significant content flag indicates that the content is in phase with the context (the current customer is loaded...). For this entry point, this is the case for the file that contains the header and the file that contains the lines...
Table |
Significant content |
Table Title |
DEB |
Yes |
Intrastat reporting |
DEBPAR |
Yes |
Intrastat reporting setups |
COMPANY |
Yes |
Company |
FACILITY |
No |
Site |
TABCOUNTRY |
No |
Country table |
TABCOEF |
No |
Coefficient table |
BPARTNER |
No |
BP |
BPSUPPLIER |
No |
Suppliers |
BPDLVCUST |
No |
Ship-to customer |
BPADDRESS |
No |
Addresses |
ITMMASTER |
No |
Products |
TABCUR |
Yes |
Currency table |
SINVOICE |
Yes if WUPDFIL = "SIH" |
Sales invoices |
SINVOICEV |
Yes if WUPDFIL = "SIH" |
Sales invoices |
SINVOICED |
Yes if WUPDFIL = "SIH" |
Sales invoice lines |
SDELIVERY |
Yes if WUPDFIL = "SDH" |
Deliveries |
SDELIVERYD |
Yes if WUPDFIL = "SDH" |
Shipment lines |
SRETURN |
Yes if WUPDFIL = "SRH" |
Sales returns |
SRETURND |
Yes if WUPDFIL = "SRH" |
Sales return lines |
PINVOICE |
Yes if WUPDFIL = "PIH" |
Purchase invoices |
PINVOICEV |
Yes if WUPDFIL = "PIH" |
Purchase invoices |
PINVOICED |
Yes if WUPDFIL = "PIH" |
Purchase invoice line |
PRECEIPT |
Yes if WUPDFIL = "PTH" |
Receipts |
PRECEIPTD |
Yes if WUPDFIL = "PTH" |
Receipt lines |
PRETURN |
Yes if WUPDFIL = "PNH" |
Purchase returns |
PRETURND |
Yes if WUPDFIL = "PNH" |
Purchase return lines |
PORDER |
No |
Purchase order |
PORDERP |
No |
Purchase order lines |