Páginas filhas
  • Configuring TXT Booking -- 23594


The TXT booking comes from an accounting entry; thus, the numbering of standard entries used in this routine must be between 001 and 499. The numbers higher than "499" refer to automatic entries of other modules; therefore, they are not used.

The TXT file must have same size of the record configured in the routine parameters. The detail line does not require fixed positions. The only exception refers to the Standard Entry code associated, which must be saved in the 3 first positions of each line.

To access specific information, the user must use LerStr and LerVal functions in the standardized entries; these functions do the reading of the TXT file, returning character and numeric type data, respectively.

Syntax:

LerStr( ExpN1, ExpN2 ) -> It reads a text file expression and saves it in the booking file as a character-type expression.
LerVal( ExpN1, ExpN2 ) -> It reads a text file expression and saves it in the booking file as a numeric-type expression.
LerData( ExpN1, ExpN2 ) -> It reads a text file expression and enables edition of the accounting entry date. This function may be placed in any SE field, since its role is only to edit the Accounting Entry Date from any date saved in the text file.

The ExpN1 parameter refers to the initial position of the field in the record; the ExpN2 is about the field size.

Configuring

  • Creating the following SE in the Standardized Entry register:
     

Field

Content

Cod Stand Entry

001

Sequential

001

Description

TXT Entry

Entry Type

Double Entry

Debt Account

LERSTR(10,20)

Credit Account

LERSTR(50,20)

Currency Val 1

LERVAL(80,17)

History

LERSTR(100,40)

Entry Origin

LERDATA(140.10)

Configure Text file so that:

  • The Code of SE 001 be found in the first 3 positions of each line of file.
  • Debt Accounts start in column 10 of each line.
  • Credit Accounts start in column 50 of each line.
  • The Entry Value starts in column 80.
  • The Entry History starts in column 100.
  • In this case, the Accounting Entry Date is manipulated by the function LERDATA, which reads a valid date starting at column 140. Note that the field Entry Origin has no association with this command.