EINVOUTGEN script

LOAD_CLASS_ESIH: Complete [F:ESIH] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIH].

This table is written at the end for an invoice, after all the other tables. It allows loading cumulative fields during a loop on lines for example.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No (if sales module) Sales invoice detail
SDELIVERY No (if sales module) Delivery header
SDELIVERYD No (if sales module) Delivery detail
SVCRVAT No (if sales module) Sales document - tax
SVCRFOOT No (if sales module) Sales document - footer element
SFOOTINV No (if sales module) Invoicing elements
BPCINVLIG No (if finance module) Customer invoice lines

LOAD_CLASS_SID_ESID: Complete [F:ESID] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESID] in the loop on sales invoice lines.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED Yes (if sales module) Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_SIL_ESID: Complete [F:ESID] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESID] in the loop on customer invoice lines.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG Yes (if finance module) Customer invoice lines

LOAD_CLASS_ESIHV: Complete [F:ESIHV] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIHV] on sales invoice in the loop on SVCRVAT.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT Yes (if sales module) Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_SIH_ESIHV: Complete [F:ESIHV] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIHV] on the customer invoice in the loop on [F:SIH]TAX.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV No Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_SIH_SVFSFI: Complete [F:ESIHF] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIHF] for discounts and charges on sales invoice on the loop on [F:SVF].

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT Yes (if sales module) Sales document - footer element
SFOOTINV Yes (if sales module) Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_SID_SVFSFI: Complete [F:ESIHF] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIHF] for charges on sales invoice lines on the loop on [F:SID].

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED Yes (if sales module) Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_SIL_SVFSFI: Complete [F:ESIHF] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIHF] for charges on customer invoice lines on the loop on [F:SIL] and loop on [F:SIL]AMTTAXx.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG Yes (if finance module) Customer invoice lines

LOAD_CLASS_ESI3P_SELLER: Complete [F:ESI3P] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESI3P] for seller.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_ESI3P_BUYER: Complete [F:ESI3P] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESI3P] for buyer.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY Yes Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_ESI3P_INVOICEE: Complete [F:ESI3P] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESI3P] for invoicee.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY Yes Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_ESI3P_PAYER: Complete [F:ESI3P] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESI3P] for payer.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE Yes Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY Yes Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_ESI3P_DELIVERY_H: Complete [F:ESI3P] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESI3P] for delivery at header level. It is only available for sales invoice.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY Yes Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

LOAD_CLASS_ESI3P_DELIVERY_D into script EINVOUTGEN: Complete [F:ESI3P] or replace default values

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESI3P] for delivery at line level. It is only available for sales invoice.

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY Yes Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED Yes (if sales module) Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

CREATE_SIH_ESIN: To add other notes in [F:ESIN]

Context and operating method

Transaction

There is a transaction in progress.

Log file

The trace file is open if asked on the screen or if an error have been detected.

The ECR_TRACE() subroutine in EINVPENGEN takes in account if the trace file is open or not.

Code context

This entry point is located in the EINVOUTGEN script (Customer e-invoice generation) before writing [F:ESIN].

Available variables and masks

If the function is run in batch mode, then [M:DIA] will be available with launch parameters.

If the function is called from the tree view, then [M:EINOUTV0] will be available.

Open tables

Table Significant context Table title
EINVOUT Yes Customer electronic invoices
SINVOICE Yes Sales invoices
GACCDUDATE No Open items
BPARTNER Yes Business partner
BPADDRESS No Addresses
CONTACT No Contacts
CONTACTCRM No Contact relationships
ESINVH Yes Invoices
ESINVHVAT No Invoice taxes
ESINVHSFI No Invoice footer elements
ESINVD No Invoice lines
ESINVNOT No Invoice notes
ESINVTRDPTY No Invoice third parties
SINVOICEV Yes (if sales module) Costing sales invoice
SINVOICED No Sales invoice detail
SDELIVERY No Delivery header
SDELIVERYD No Delivery detail
SVCRVAT No Sales document - tax
SVCRFOOT No Sales document - footer element
SFOOTINV No Invoicing elements
BPCINVLIG No Customer invoice lines

UBL_GENERATE_END: Called a the end of the UBL generation method

Context and operating method

Transaction

There is a transaction in process.

Log file

There is an open log file.

Code context

This entry point is call at the end of the EINVOUTGEN.UBL_GENERATE function.

Only if the process was successful.

Available variables and masks

DIRXML: Directory where XML file is created

SFICSIVNUM: XML file name

DIRXML + func GET_XML_FILE_NAME(SFICSIVNUM): Entire path to the XML file

Open tables

Table Significant content Table title
EINVOUT [EOUT] Significant but column BPR Customer electronic invoices
SINVOICE [SIH] Significant but column CPY, ACCDAT Sales invoices
BPARTNER [BPR] Significant but column MAPCOD Business Partner
EINVMAP [EINVM] Yes Mapping
ASHW [ASW] Yes Representations

SEND_ZIP_TO_NETWORK_START: Called just beforesending zip file to SageNetwork

Context and operating method

Transaction

There is a transaction in process.

Log file

There is an open log file.

Code context

This entry point is called in the EINVOUTGEN_REPORT.SEND_ZIP_TO_NETWORK function, just before sending a zip file to SageNetwork.

Available variables and masks

SZIPFILE : Entire path to the zip file

ADD_ATTACHEMENT_FILE: Call after adding default attachement files to complete with specifics

Context and operating method

Transaction

There is a transaction in process.

Log file

There is an open log file.

Code context

This entry point is called in the EINVOUTGEN.GET_ATTACHMENT_ARGUMENT function.

The entry point is called after standard attachments have been added. It allows to add specific attachment files.

Available variables and masks

SCPY: Current invoice company (if missing, get the information from the invoice)

SSIVNUM: Current invoice number

For each file to add, call this function:

  • Call ADD_ATTACHEMENT_FILE(CLBARENDRE, SATTFILE) from EINVOUTGEN

Parameters:

  • CLBARENDRE: Clob which contains the list. Do not modify it, reuse it directly.

  • SATTFILE: Files with full path and extension name.

The function does not check if the file exists. It adds a new one to the list.