FICMAG processing: Discount Export File Generation

FIN: Before update of payments

Use this entry point to take over every time a bank file is generated, or created on the storage space, for example to rename it or trigger its automatic sending.

Renaming the file is carried out via a system order. It is not sufficient to just change the name of a variable as is performed in the NOMFIC entry point. For the renaming operation to work, it is necessary to dispose of the modification rights on the storage space.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available variables and masks

  • The FICHIER variable contains the name of the generated bank file.

  • The NUMERO (char) variable contains the number of the corresponding remittance.

  • The CODE variable contains the parameter code of the bank file.

  • The BANQUE variable contains the bank code.

NOMFIC: Personalization of the file name

Use this entry point to personalize the name of the bank file to generate.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available variables and masks

  • The NOM (char 10) variable will contain the name of the bank file to be generated.

  • The EXT (char 5) variable will contain the file extension.

AV_LIGNE: Before generation of the bank file lines

Use this entry point to take control of each generation of Detail line in a bank file.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

A log file is open when the processing is called by the function for batch electronic remittances.

Call context

The entry point is called just before the generation of the lines from the Detail record type of the bank file.

Available variables and masks

  • The FICHIER variable contains the name of the generated bank file.

  • The NUMERO (char) variable contains the number of the corresponding remittance.

  • The CODE variable contains the parameter code of the bank file.

  • The BANQUE variable contains the bank code.

Table Significant content Table title

PAYMENTH [PYH]

Yes

Payments

BID [BID]

Yes

Bank ID statement

FILTRE: Specific criterion on payments

Use this entry point to add an extra filter to the payments to take into account when generating the bank file.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is no open log file.

Available variables and masks

  • The CRITSPE (Char 250) variable will contain the specific criteria.

  • The FICMAG entry screen for the release criteria is available under the [DIA] abbreviation.

Table Significant content Table Title

PAYMENTH [PYH]

No

Payments

TABPAYTYP [TPY]

No

Payment transaction

OPENFILE: Access for setting other tables on line

Use this entry point to take over and open other tables and load bank files with additional information.

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 ENREG subprogram of the FICMAG script.

With this entry point, for every record of a bank file line performed, a record of a previously opened table is set.

Available variables and masks

Variable Definition

NUMERO

Payment number

CODE

Bank file name

BANQUE

Bank

TYP

Record type (Local menu no. 656)

Open tables

Table Significant content Table title

PAYMENTH [PYH]

Yes

Payment header

PAYMENTD [PYD]

No

Payment lines

PAYFRM [FRM]

Yes

Payment slips

TABPAYTYP [TPY]

Yes

Payment transaction

TABFILBAN [TFB]

Yes

Bank files

BANK [BAN]

Yes

Banks

COMPANY [CPY]

Yes

Companies

FACILITY [FCY]

Yes except when TYP=1

Sites

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

Yes if Revenue payment

Customers

BPSUPPLIER [BPS]

Yes if Expense payment

Suppliers

BPADDRESS [BPA]

Yes

Addresses

TABCUR [TCU]

Yes

Currencies

GACCOUNT [GAC]

Yes except when TYP=1

Accounts

TABCHANGE [TCH]

No

Currency rate

ATABDIV [ADI]

Yes except when TYP=1

Miscellaneous tables

TABCOUNTRY [TCY]

Yes except when TYP=1

Country table

SINVOICE [SIH]

Yes except TYP=1 and purchase payment

Sales invoices

PINVOICE [PIH]

Yes except TYP=1 and sales payment

Purchase invoices

EDIPAR [EDP]

No

Message setup

BID [BID]

Yes except when TYP=1

RIB

UPDFORD: Access each evaluation of a formula

Use this entry point to take over, every time a setup formula for a Detail type file line is evaluated.

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 ENREG subprogram of the FICMAG script.

It is used every time a bank file line will to take over after the standard evaluation of the line, before writing the result in the file.

Available variables and masks

Variable Definition

NUMERO

Payment number

CODE

Bank file name

BANQUE

Bank

TYP

Record type (Local menu no. 656)

RESULT

Evaluated formula result

Open tables

Table Significant content Table title

TABFILBAN [TFB]

Yes

Bank files

PAYMENTH [PYH]

Yes

Payment header

PAYMENTD [PYD]

No

Payment lines

PAYFRM [FRM]

Yes

Payment advice notes

TABPAYTYP [TPY]

Yes

Payment transaction

TABFILBAN [TFB]

Yes

Bank files

BANK [BAN]

Yes

Banks

COMPANY [CPY]

Yes

Companies

FACILITY [FCY]

Yes except when TYP=1

Sites

BPARTNER [BPR]

No

BP

BPCUSTOMER [BPC]

Yes if Revenue payment

Customers

BPSUPPLIER [BPS]

Yes if Expense payment

Suppliers

BPADDRESS [BPA]

Yes

Addresses

TABCUR [TCU]

Yes

Currencies

GACCOUNT [GAC]

Yes except when TYP=1

Accounts

TABCHANGE [TCH]

No

Currency rate

ATABDIV [ADI]

Yes except when TYP=1

Miscellaneous tables

TABCOUNTRY [TCY]

Yes except when TYP=1

Country table

SINVOICE [SIH]

Yes except TYP=1 and purchase payment

Sales invoices

PINVOICE [PIH]

Yes except TYP=1 and sales payment

Purchase invoices

EDIPAR [EDP]

No

Message setup

BID [BID]

Yes except when TYP=1

RIB

BEFLOAD: Before loading the open items

Use this entry point to improve the processing performance by avoiding an open item loading loop.

Context and operating mode

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

When setting the FLGLOA variable to 0, the script does not execute the loading of open items which saves time.

To use this entry point, the setup of the bank file must not be based on the following variables: TFAC, TTIP, NBFAC, TTYP, TDAT, TREF, TIMPORTE, TSNS and the [PIHX] and [HAEX] classes.

Open tables

Table Significant content Table title

PAYMENTH [PYH]

Yes

Payment header

BPARTNER [BPR]

Yes

BP

FACILITY [FCY]

Yes

Sites

TABCUR [TCU]

Yes

Currencies

UPDMODEL: list of characters to be replaced by a space

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Code context

By changing the values of the variables MODEL and RPL, the UPDMODEL entry point allows the modification of the list of characters, that will be replaced by a space.

If some characters have to be preserved, they can be removed from the MODEL variable.

Example of context: The specific character "&" has to be preserved.

As this character is present in the standard MODEL variable:

Copy
MODEL = '!"#$%&*;<>=@[]_^`{}|~§µ°£¤€' : # 30 characters
RPL = '                            ' # 30 spaces 

In the entry point, the new list MODEL is assigned without "&" and RPL is assigned with 29 spaces.

Copy
MODEL = '!"#$%*;<>=@[]_^`{}|~§µ°£¤€' : # 29 characters without "&"
RPL = '                           ' # 29 spaces 

Available variables and masks

Variable Definition
STRCAR Original string to update
MODEL List of the characters to be replaced by a space
RPL The list of replacements (with the same number of characters as MODEL)

Open tables

Table Significant content Table title
TABFILBAN Yes Bank file definitions

SPEREPL: specific replacement of characters

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Code context

During standard processing, characters in the STRCAR1 variable are replaced based on their ASCII code.

The SPEREPLentry point allows to preserve some characters or to replace one character by a string.

The entry point is in the loop to manage the replacement of each character:

Copy
I=1
While I <= len(STRCAR1)
Raz  REPLACED
ACT = ascii(mid$(STRCAR1,I,1))
GPOINT = "SPEREPL" : Gosub ENTREE From EXEFNC
If REPLACED  = 0
# Standard replacement
Endif
Wend

In the entry point, the replacement can be managed in a specific way and the variable REPLACED has to be assigned to 1.

Example of specific replacement to replace one character by string of several characters, "&" replaced by "& a m p ;":

Copy
If ACT = 38 : # &
STRCAR1 = left$(STRCAR1,I) + "amp;" + right$(STRCAR1,I+1)
I+=4  # addition of 4 characters in the string STRCAR1, update index I to manage properly the next part of the string
REPLACED = 1 : # replacement done
Endif

Example to prevent the replacement of specific characters:

Copy
If ACT >= 383
REPLACED = 1 : # replacement done - avoid standard replacement
Endif

Available variables and masks

Variable Definition
STRCAR Original string to update
STRCAR1 Updated string
ACT Ascii code of the character treated in the loop
I Index of the loop
REPLACED Replacement status : 0: not done / 1: done

Open tables

Table Significant content Table title
TABFILBAN Yes Bank file definitions