AUTINVDFIL: Selection criteria addition for the deliveries to invoice

Use this entry point to take over during the definition of the selection criteria for the deliveries to invoice.

It is used to add extra filters on these deliveries.

It is called in the FUNAUTINVD delivery automatic invoicing processing.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file when in the deliveries to invoice selection phase.

Call context

This entry point is called during the selection criteria definition.

Available variables and masks

The [M :DIA] delivery selection mask (SAUTINVD) is still available.

The standard criteria are loaded in the CRITERE variable. They concern the delivery header file (SDELIVERY).

The FILSUP variable has been created to add these additional criteria. This variable is sized at 250 characters. To ensure operations 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 example: Add an extra filter on the ship-to customer that must start with "CLI".

FILSUP -= ‘ & BPCORD >= « CLI »’

FILSUP is evaluated at the same time as CRITERE during the filter on the SDELIVERY file. The criteria must relate to fields in the SDELIVERY file.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SINVOICE

No

Invoice headers

SINVOICEV

No

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

No

Delivery header

SDELIVERYD

No

Delivery line

SORDER

No

Order headers

SORDERQ

No

Order line quantities

BPARTNER

No

BP

BPCUSTOMER

No

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

Yes

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

TABCOUAFF

No

Sequence number counter assignment table

TABSIVTYP

No

Customer invoice type table

SWRKINV

No

Work file

ACODNUM

No

Document sequence number counter

AUTINVDMAJ: Update of the specific files after the creation of an invoice

Use this entry point to take over before the end of an invoice entry transaction in order to update specific files.

It is called in the FUNAUTINVD automatic invoicing processing.

Context and operating mode

Transaction

There is one transaction in progress.

To cancel the transaction if a problem occurs, the GOK variable must be set to 0.

Log file

There is an open log file.

Different call cases

This entry point is called:

in the delivery automatic invoicing function before the end of each entry transaction of an invoice.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SINVOICE

Yes

Invoice headers

SINVOICEV

Yes

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

No

Delivery header

SDELIVERYD

No

Delivery line

SORDER

No

Order headers

SORDERQ

No

Order line quantities

BPARTNER

Yes (bill-to BP)

BP

BPCUSTOMER

Yes (bill-to customer)

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

Yes

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

AUTINVDSEL: Addition of authorization controls for a delivery to invoice

Use this entry point to take over at the end of the authorization controls for the invoicing of a delivery. It is thus used to add extra tests used to reject the delivery.

It is called in the FUNAUTINVD automatic invoicing processing.

Context and operating mode

Transaction

There is no transaction in progress.

To reject the delivery, set the OK variable to 1.

Log file

There is an open log file.

Different call cases

This entry point is called:

in the automatic invoicing function at the end of the authorization controls for the invoicing of each delivery.

Available variables and masks

The SAUTINVD delivery selection mask is still available.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SINVOICE

No

Invoice headers

SINVOICEV

No

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

Yes

Delivery header

SDELIVERYD

No

Delivery line

SORDER

Yes if [F:SDH]IME=2

Order headers

SORDERQ

No

Order line quantities

BPARTNER

No

BP

BPCUSTOMER

Yes (sold-to customer) If [F:SDH]IME=5

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

No

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

AUTINVDREG: Modification of the sort/shortage criteria of the delivery to invoi

Use this entry point to take over before the write in the work file of each delivery to invoice recording. Thus it is used to add data that serves as shortage criteria in the data of the work file (SWIDATA field) or to modify the key (SWIKEY and SWIKEY1 fields).

It is called in the FUNAUTINVD automatic invoicing processing.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

This entry point is called:

in the automatic invoicing function for each entry of a recording in the work file.

Available variables and masks

The SAUTINVD delivery selection mask is still available.

To add shortage criteria, it is necessary to load the required information in the SWIDATA field.

e.g.: [F :SWI]SWIDATA += [F :SDH]xxx

Caution: In the SWIDATA field, there are only 40 characters available.

Any modification involving the SWIKEY and SWIKEY1 key fields can lead to problems involving the generated invoices.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SWRKINV

Yes

Automatic invoicing work file

SINVOICE

No

Invoice headers

SINVOICEV

No

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

Yes

Delivery header

SDELIVERYD

No

Delivery line

SORDER

Yes if [F:SDH]IME=2

Order headers

SORDERQ

No

Order line quantities

BPARTNER

No

BP

BPCUSTOMER

Yes (bill-to customer)

If [F :SDH]IME=5

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

No

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

 

 

 

 

AUTINVDLIG: Addition of checks to avoid the integration of a delivery line into

Use this entry point to take over after the read of each [F:SDD] delivery line before writing the invoice line and carrying out updates of the order and the delivery. It is used for example to avoid the integration of a delivery line into the invoice.

It is called in the FUNAUTINVD automatic invoicing processing.

Context and operating mode

Transaction

There is one transaction in progress.

To cancel the transaction if a problem occurs, the GOK variable must be set to 0.

Log file

There is an open log file.

Different call cases

This entry point is called:

in the delivery automatic invoicing function in the delivery line loading loop.

Available variables and masks

The invoice management masks are available: [M:SIH0] (SIH0), [M:SIH1] (SIH1), [M:SIH2] (SIH2), [M:SIH4] (SIH4).

Set the IJUMP variable to 1 in order to pass to the following delivery line. If an order or delivery update must still be carried out, it must be included to the entry point by using as a template the content of the $TRT_DETAIL section of the FUNAUTINVD processing.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SINVOICE

Yes

Invoice headers

SINVOICEV

Yes

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

No

Delivery header

SDELIVERYD

No

Delivery line

SORDER

No

Order headers

SORDERQ

No

Order line quantities

BPARTNER

Yes (bill-to BP)

A/P - A/R Accounting

BPCUSTOMER

Yes (bill-to customer)

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

Yes

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

AUTINVDEND: Modification of the invoice or addition of lines before invoice calc

Use this entry point to take over after the loading of all the lines in [M] class as well as their write in [F:SID] and before the launch of the invoice calculation. It is used to add extra lines or to carry out modifications before the calculation.

It is called in the FUNAUTINVD automatic invoicing processing.

Context and operating mode

Transaction

There is one transaction in progress.

To cancel the transaction if a problem occurs, the GOK variable must be set to 0.

Log file

There is an open log file.

Different call cases

This entry point is called:

in the delivery automatic invoicing function before the end of each entry transaction of an invoice.

Available variables and masks

The invoice management masks are available: [M:SIH0] (SIH0), [M:SIH1] (SIH1), [M:SIH2] (SIH2), [M:SIH4] (SIH4).

To add a line, use as a template the $TRT_DETAIL section from the FUNAUTINVD processing.

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SINVOICE

Yes

Invoice headers

SINVOICEV

Yes

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

No

Delivery header

SDELIVERYD

No

Delivery line

SORDER

No

Order headers

SORDERQ

No

Order line quantities

BPARTNER

Yes (bill-to BP)

BP

BPCUSTOMER

Yes (bill-to customer)

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

Yes

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

MAJINVREFDAT: Modification of the origin date for invoicing

Use this entry point to take over when selecting deliveries to invoice.

It is used to intervene after the first selection of delivery headers during the additional selections on these headers to modify the origin date used for the selection of deliveries.

It is called in the FUNAUTINVD delivery automatic invoicing processing.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file when in the deliveries to invoice selection phase.

Call context

This entry point is called during the invoicing authorization controls for each delivery.

Available variables and masks

The [M :DIA] delivery selection mask (SAUTINVD) is still available.

The entry point is located in the delivery header selection loop (SDELIVERY) during the additional controls used to reject a delivery, just before the control of the origin date used for the delivery selection.

The [F:SDH] recording is on line.

If the value of the INVREFDAT general parameter of site level is equal to Delivery date, GINVREFDAT=2, the origin date used is the delivery date (loaded in WDLVDAT).

If the value is equal to Shipment date, GINVREFDAT=1, the origin date used is the shipment date (loaded in WSHIDAT).

The entry point is used to intervene in the choixe of this origin date by setting the WPE_GINVREFDAT variable to 1 or 2. If the variable is set, it will be taken into account at the expense of GINVREFDAT.

- The WPE_CONTEXT variable contains the context to control "SDH" or "SDH1":

If WPE_CONTEXT="F:SDH", [F:SDH] contains the delivery to invoice. The processing controls this delivery.

In the case where the delivery is an order delivery and the order has the invoicing mode "One/Closed order" ([F:SDH]IME=2), all the deliveries of the order must be on the same invoice, and thus, be in the selection filter. The origin date of all the deliveries of the order must be verified.

If WPE_CONTEXT="F:SDH1", [F:SDH] contains the delivery to invoice. The control of its origin date has been performed (when WPE_CONTEXT was equal to "SHD"). The processing performs the control of the various deliveries linked to the origin order. [F:SDH1] contains the delivery to control.

- In both contexts, WSHIDAT contains the shipment date of the delivery to control.

- In both contexts, WDLVDAT contains the delivery date to control.

 

Open tables

In the table below, the significant content flag indicates that the content matches the context (the current customer is loaded…). It is usually the case for the file containing the header, but not for the file containing the lines…

Table

Significant content

Table Title

SINVOICE

No

Invoice headers

SINVOICEV

No

Invoice header valuations

SINVOICED

No

Invoice lines

SDELIVERY

No

Delivery header

SDELIVERYD

No

Delivery line

SORDER

No

Order headers

SORDERQ

No

Order line quantities

BPARTNER

No

BP

BPCUSTOMER

No

Customers

BPDLVCUST

No

Ship-to customers

BPCUSTMVT

No

Customer transactions

ITMMASTER

No

Products

TABSIVTYP

Yes

Invoice types

GTYPACCENT

No

Entry types

GACCCODE

No

Accounting codes

GACCOUNT

No

General ledger accounts

GAUTACE

No

Automatic journals

GAUTACEF

No

Automatic journal formulas

GJOURNAL

No

Accounting journals

TABCOUAFF 

No

Sequence number counter assignment table

TABSIVTYP

No

Customer invoice type table

SWRKINV

No

Work file

ACODNUM

No

Document sequence number counter