Accounting entry file (FEC file)

The French book of fiscal procedures (article A 47 A-1) stipulates that as of 01/01/2014, when a company1 uses a computerized accounting system, the software used must support the extraction of past accounting entries for a given closed fiscal year.

The extraction process must be dematerialized.

In Sage X3, the file is sent as a flat file with the following characteristics:

  • Extraction based on the main general ledger
  • Character set: ASCII 13 + ASCII 10
  • Record length: variable
  • Field separator: tab
  • Record separator: carriage return and line end

One prerequisite of the accounting entry file is that the relevant fiscal year must be closed.

For extractions by period: the relevant period(s) must be closed.

Functional translation

In Sage X3, two functions can be used to extract the accounting entry file:

  • ACCENTFIL setup (GESFAE)
  • ACCENTFIL interface launch (FAEINT)

Two pivot files complete these features:

ACCENTFIL and ACCENTFILN pivot files

These two files include 19 lines of information that must correspond, in the same order, to the information listed in Article 1 47 A-1 of the French book of procedures.

  • The first pivot file, ACCENTFIL, is based on the final entry number assigned by the application when setting an accounting entry to final.
  • The second file, ACCENTFILN, is based on the accounting entry number assigned to the accounting entry when it is created.

ACCENTFIL pivot - Accounting entry file on final number

#

TABLE CODE

FIELD CODE

TITLE

FORMULA

1

GACCENTRY

JOU

JournalCode

 

2

GJOURNAL

WDESTRA

JournalLib

string$(len([F:JAX]TEXTE)<>0, [F:JAX]TEXTE)+string$(len([F:JAX]TEXTE)=0, [F:JAX2]TEXTE)

3

GACCENTRY

FNLPSTNUM

EcritureNum

 

4

GACCENTRY

ACCDAT

EcritureDate

 

5

GACCENTRYD

ACC

CompteNum

 

6

GACCOUNT

WDESTRA

CompteLib

[F:CAX]TEXTE

7

GACCENTRYD

BPR

CompAuxNum

 

*8

BPARTNER

WBPRNAM

CompAuxLib

[F:BPR]BPRNAM(0)

9

GACCENTRY

NUM

PieceRef

 

10

GACCENTRY

WACCDAT

PieceDate

[F:HAE]ACCDAT

11

GACCENTRYD

WDES

EcritureLib

string$([F:DAE]DES<>"", [F:DAE]DES)+string$([F:DAE]DES="","NA")

12

GACCENTRYD

WAMTLED

Amount

vireblc(ctrans(format$("N:12.2",[F:DAE]AMTLED),".",","),2)

13

GACCENTRYD

WSNS

Sens

string$([F:DAE]SNS=-1,"-1")+string$([F:DAE]SNS=1,"+1")

14

GACCENTRYD

MTC

EcritureLet

 

15

GACCENTRYD

WMTCDAT

DateLet

string$([F:DAE]MTCDAT<>[0/0/0],format$("D:YYYYMMDD",[F:DAE]MTCDAT))+string$([F:DAE]MTCDAT=[0/0/0],"")

16

GACCENTRY

FNLPSTDAT

ValidDate

 

17

GACCENTRYD

WAMTCUR

Montantdevise

string$([F:DAE]CUR<>[F:CPY]ACCCUR, vireblc(ctrans(format$("N:12.2",[F:DAE]AMTCUR*[F:DAE]SNS),".",","),2))

18

GACCENTRY

CUR

Idevise

string$([F:DAE]CUR<>[F:CPY]ACCCUR, [F:DAE]CUR)

19

GACCENTRYD

FCYLIN

CodeEtbt

 

The Title column corresponds to the Field name column described in the article.

The Table code and Field code allow you to see the field correspondences in the system. They are sometimes completed with formulas in specific cases (see below).

  • Field no. 3: Uses the final number assigned to the journal when it is set to final.
  • Field no. 11: To comply with the compulsory nature of specific information in the accounting entry file that are not compulsory in the system, the conventional value NA is displayed on the accounting entry label (EcritureLib).
  • Fields no. 12 and 17: For amounts (Montant and Montantdevise), the formulas in the table above replace the period by a comma, as expected (French standard). The amount can thus be written with two decimal places. There is no thousand separator (French standard).
  • Fields no. 12 and 13: The guidelines specify that Debit/Credit information is not recorded in the system; it can be replaced by the Amount (Montant) and Sign (Sens), which is the case in Sage X3.
    A transcoding rule is entered in order to obtain (+1) for debits and (-1) for credits.
  • Fields no.17 and 18: When the accounting entry has been recorded in a foreign currency other than the accounting currency, the amount in the foreign currency and the document currency should be specified in those two sections. The amount in currency corresponds to an amount signed in compliance with the debit or credit sign of the entry.
  • Field no.19: An additional Company code column was added following an amendment of article A 47 A-1 (from 28/11).

    To ensure the chronology of entries and following the amendment on article A.47 A-1 of the French fiscal book of procedures, the carry-forward entries are not the first recorded entries at the beginning of the fiscal year; they are displayed according to their order of generation in the system.
    The sort order of the entries is based on the site of the entry line (FCYLIN of GACCENTRYD), then on the final journal number (FNLPSTNUM of GACCENTRY) and finally on the internal number (ACCNUM of GACCENTRYD).
    As specified in the article, closing entries for expense and revenue accounts must be excluded from the extraction. When launching the interface, an exclusion rule based on the automatic generation flag (FLGREP=2) and on the accounting date (ACCDAT=last day of fiscal year) applies to identify the closing entry2 generated automatically, and to make sure it is not recovered on the accounting entry file.
    However, the manual closing entries are included in the file if needed.
    Sage X3 cannot generate a global entry. Only detailed entries are extracted.

ACCENTFILN pivot - Accounting entry file on entry number

#

TABLE CODE

FIELD CODE

TITLE

FORMULA

1

GACCENTRY

JOU

JournalCode

 

2

GJOURNAL

WDESTRA

JournalLib

string$(len([F:JAX]TEXTE)<>0, [F:JAX]TEXTE)+string$(len([F:JAX]TEXTE)=0, [F:JAX2]TEXTE)

3

GACCENTRY

NUM

EcritureNum

 

4

GACCENTRY

ACCDAT

EcritureDate

 

5

GACCENTRYD

ACC

CompteNum

 

6

GACCOUNT

WDESTRA

CompteLib

[F:CAX]TEXTE

7

GACCENTRYD

BPR

CompAuxNum

 

*8

BPARTNER

WBPRNAM

CompAuxLib

[F:BPR]BPRNAM(0)

9

GACCENTRY

WBPRVCR

PieceRef

string$([F:HAE]BPRVCR<>"", [F:HAE]BPRVCR)+string$([F:HAE]BPRVCR="", "NA")

10

GACCENTRY

WBPRVCRDAT

PieceDate

string$([F:HAE]BPRDATVCR<>[0/0/0],format$("D:YYYYMMDD",[F:HAE]BPRDATVCR))+string$([F:HAE]BPRDATVCR=[0/0/0], format$("D:YYYYMMDD",[F:HAE]ACCDAT))

11

GACCENTRYD

WDES

EcritureLib

string$([F:DAE]DES<>"", [F:DAE]DES)+string$([F:DAE]DES="","NA")

12

GACCENTRYD

WAMTLED

Amount

vireblc(ctrans(format$("N:12.2",[F:DAE]AMTLED),".",","),2)

13

GACCENTRYD

WSNS

Sens

string$([F:DAE]SNS=-1,"-1")+string$([F:DAE]SNS=1,"+1")

14

GACCENTRYD

MTC

EcritureLet

 

15

GACCENTRYD

WMTCDAT

DateLet

string$([F:DAE]MTCDAT<>[0/0/0],format$("D:YYYYMMDD",[F:DAE]MTCDAT))+string$([F:DAE]MTCDAT=[0/0/0],"")

16

GACCENTRYD

ACCDAT

ValidDate

 

17

GACCENTRYD

WAMTCUR

Montantdevise

string$([F:DAE]CUR<>[F:CPY]ACCCUR, vireblc(ctrans(format$("N:12.2",[F:DAE]AMTCUR*[F:DAE]SNS),".",","),2))

18

GACCENTRY

CUR

Idevise

string$([F:DAE]CUR<>[F:CPY]ACCCUR, [F:DAE]CUR)

19

GACCENTRYD

FCYLIN

CodeEtbt

 

The Title column corresponds to the Field name column described in the article.

The Table code and Field code allow you to see the field correspondences in the system. They are sometimes completed with formulas in specific cases (see below).

  • Field no. 3: Uses the number assigned to the accounting entry on creation.
  • Fields no. 9 and 11: To comply with the compulsory nature of specific information in the accounting entry file that are not compulsory in the system, the conventional value NA is specified on the supporting document reference (PieceRef) and for the accounting entry label (EcritureLib).
  • Field no. 10: The same goes for the date of the supporting document (PieceDate), which is not mandatory in the application. Instead of returning an empty date, the accounting date of the document is returned (ACCDAT of the entry).
  • Fields no. 12, 13, 17, 18 and 19: Same comment as for the ACCENTFIL pivot file.

The explanations given on the ACCENTFIL pivot file can be applied to the setup of the ACCENTFILN pivot file.

The only difference between the two setups is on the sort order applied to the extracted entries.
The use of the ACCENTFILN pivot file implies that the sort order of the entries is based on the site of the entry line (FCYLIN of GACCENTRYD), then on the accounting date of the entry (ACCDAT of GACCENTRY), then on the number of the accounting entry (NUM of GACCENTRY) and finally on the internal number (ACCNUM of GACCENTRYD).

ACCENTFIL setup (GESFAE)

Open: Declarations > Audit > France > Setup > ACCENTFIL setup

This function is used to define the default values to be applied during the extraction.
This step is a prerequisite to launch the interface as the identifier is mandatory.
No presetting is delivered. The company is responsible, in due time, for specifying the controlled company and extraction type.
As the volume of entries can be quite substantial, it is recommended to use the period option if the file needs to be split.

Only Accounting entry file (FEC) types are authorized in the Pivot field.

ACCENTFIL interface launch (FAEINT)

Open: Declarations > Audit > France > Processes > ACCENTFIL interface launch

The generation of the FEC file is launched from this screen.
The Pivot, Company and File breakdown fields are loaded based on the values entered in the setup screen. They can be modified if needed.
Specific controls are applied depending on the status of the fiscal year or extraction periods (closed or open), but also based on the chosen pivot file (see Coexistence of two pivot files - Controls).

File coding

In compliance with the list provided in Article A 47 A-1 of the French fiscal book of procedures: SirenFECYYYYMMDD (where the SIREN number (Company tax ID) expected is the one of the taxpayer): if the SIREN of the relevant company is not entered, a blocking message is displayed upon launch.

An additional processing can be used to apply the FEC fixed value to the file name, followed by the fiscal year closing date and, for extractions by period, followed by the extracted start period and end period number(s).

Coexistence of two pivot files - Controls

Two pivot files are available, which take into account a new journal number: the final number (in U9, see the How to guide on how to trigger a unique number on final entries).

To know which pivot file to use, several questions should be answered:

  • Was the utility run? If so, at what date? (UUINIFNLPST utility)
  • What pivot file setup is used: ACCENTFIL or ACCENTFILN?
  • What is the fiscal year start date used in the extraction in the FAEINT function?

Depending on the answers to those questions, some controls are triggered and are signaled by error or warning messages:

 

UUINIFNLPST utility executed?

 

When?

Pivot file

 

Number field

Extraction

Fiscal year start/end date

 

Results


1


No


Ø

ACCENTFIL - FNLPSTNUM

Any date

Error message:
'The update utility for final numbers must be used.'


2


No


Ø

ACCENTFILN - NUM

Any date

No message
The FEC file is extracted with this pivot


3


Yes


15/12/2014

ACCENTFILN - NUM

01/01/2013 to 31/12/2013

No message
The FEC file is extracted with this pivot


4


Yes


15/12/2014

ACCENTFILN - NUM

01/01/2014 to
31/12/2014

No message
The FEC file is extracted with this pivot


5


Yes


15/12/2014

ACCENTFILN

.

NUM

01/01/2015 to 31/12/2015

Error message:
'The extraction of the accounting entry file must be launched with the ACCENTFIL pivot.'


6


Yes


15/12/2014

ACCENTFIL - FNLPSTNUM

01/01/2013 to 31/12/2013

Warning message:
'The final number update utility has been run after the fiscal year start.'


7


Yes


15/12/2014

ACCENTFIL - FNLPSTNUM

01/01/2014 to
1/12/2014

Warning message:
'The final number update utility has been run after the fiscal year start.'


*8


Yes


15/12/2014

ACCENTFIL - FNLPSTNUM

01/01/2015 to
1/12/2015

No message
The FEC file is extracted with this pivot

These controls are triggered based on the pivot code used. When the pivot code is ACCENTFILN, the controls described above are triggered, as well as the sort order of the entries previously described.
Otherwise, when the pivot file code is different from ACCENTFILN, the controls described for the ACCENTFIL file are triggered, as well as the sort order of the entries previously described.