Setup > Usage > Extract template 

Use the Extract template function to define the layout and content of extract files.

Functions used to extract the data

Once you have created the required extract templates, you can extract data. To execute the data extraction, use one of the following methods:

Example

1. Set up the extract template for the termination run. For example, the name of this extract template is TAXRUN_TERMINATION.
2. Access the Termination run function (GENHRTEXTTER). In the Termination run screen, the system automatically calls the TAXRUN_TERMINATION extract template.
3. Define the selection criteria for which is run is being performed.
4. Click OK. The system runs the following elements:

  • The data extraction
  • The generation of a .csv file to submit to the tax authority
  • The generation of the certificates to be printed and given to the employees if necessary.

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Fields

The following fields are present on this tab :

Extract template

Enter the code of the extract template you are about to create or want to modify.

  • Title (field EXRTIT)

 Enter the title of the extract template you are about to create or want to modify.

Type of run

  • Validation only (field EXRVLYOLY)

Select this check box to generate data to be used on the .csv file and printouts. The file and printouts will be flagged as 'Test'.

  • Live run (field EXRLIVIND)

Select this check box to generate data to be used on the .csv file and printouts. The file and printouts will be flagged as 'Live'.

  • Block duplicate run (field EXRBLODUP)

Select this check box if you want to avoid accidental clearing of data from the previous run.

  • Clear previous data (field EXRCLEPRE)

Select this check box if you want to clear the data of the previous Live run.

Setup

  • File name (field EXRFILNAM)

Enter the name of the file you want to generate.

  • File extension (field EXRFILEXT)

  Enter the extension of the file (.csv) you want to generate.

  • Field separator (field EXRFLDSEP)

Define a field separator such as a comma for example.

  • Field delimiter (field EXRFLDQLF)

Define a field delimiter such as double quotes for example.

  • Fixed length (field EXRFXDLNG)

 

If you want to generate the certificates to print after the data extraction, enter the name of the corresponding report.

  • Print (field EXRPRNFLG)

The system populates the selection criteria by default according to the extract template.

  • Generate script (field EXRSRCNAM)

Enter the name of the program that compiles the different data coming from the different tables.

Enter the access code that protects this extract template.

Numeric fields

  • Negative sign (field EXRDEBSYM)

 

  • Positive sign (field EXRCDTSYM)

 

  • Position (field EXRSYMPOS)

 

No data message

  • Header (field EXRHEAMSG)

Enter the text that displays in the extract file if no header records or no detail records for the parameters are found.

  • Detail (field EXRDETMSG)

 

Close

 

Tab Source data

Presentation

In the Source data grid, select the level at which the data will be displayed and enter the names of the tables that contain the data.

The Filters grid contains fixed filters for the template. You cannot modify the data of this grid.

Close

 

Fields

The following fields are present on this tab :

Grid Source data

  • Level (field DTALVL)

Header line

Select 'Header line' if you want to display the data on the certificate header.

Detail line

Select 'Detail line' if you want to display the data on the main part of the certificate.

Footer line

Select 'Footer line' if you want to display the data on the certificate footer.

  • Table (field DTATBL)

 Enter the name of the table containing the data.

  • Link expression (field DTALNKCLC)

Enter the expression that links the data to each other.

Grid Filters

  • Level (field FLTDTALVL)

The Filtersgrid contains fixed filters for the template. You cannot modify the data of this grid.

  • The Level field contains the level at which the filter must apply.
  • The Filter field contains the filter expression.
  • The Or fields contain the expression where an 'OR' is required.

  • Filter (field FLTDTACLC1)

 

  • Or (field FLTDTACLC2)

 

  • Or (field FLTDTACLC3)

 

Close

 

Tab Selection criteria

Presentation

The Selection criteria tab contains default filters provided by Sage. You cannot modify these defaults parameters.

 

Fields

The following fields are present on this tab :

Grid

  • Level (field PARDTALVL)

The Selection criteria tab contains default filters provided by Sage. You cannot modify these defaults parameters.

  • The Levelfield contains the level at which the selection criteria must apply.
  • The Fieldfield contains the field the filter must be applied on.
  • The Code field contains a unique selection criteria code for this criteria.
  • The Titlefield contains the title of the field. This title is available as a selection criteria in the template.
  • The Type field contains the selection criteria data type.
  • The Local menu field contains the selection criteria local menu number if applicable.
  • The Length field contains the length of the field.
  • The Value type field is used to define if the selection criteria must be a single value, a range or a multiple value.
  • If the Mandatory check box is selected, the parameter is mandatory for the user.
  • The First value and Final value fields contains default values.

  • Field (field PARDTACLC)

 

  • Code (field PARCOD)

 

  • Title (field PARTIT)

 

 

  • Local menu (field PARNBRLIB)

The Selection criteria tab contains default filters provided by Sage. You cannot modify these defaults parameters.

  • The Levelfield contains the level at which the selection criteria must apply.
  • The Fieldfield contains the field the filter must be applied on.
  • The Code field contains a unique selection criteria code for this criteria.
  • The Titlefield contains the title of the field. This title is available as a selection criteria in the template.
  • The Type field contains the selection criteria data type.
  • The Local menu field contains the selection criteria local menu number if applicable.
  • The Length field contains the length of the field.
  • The Value type field is used to define if the selection criteria must be a single value, a range or a multiple value.
  • If the Mandatory check box is selected, the parameter is mandatory for the user.
  • The First value and Final value fields contains default values.

  • Length (field PARLNG)

 

  • Value type (field PARVALTYP)

 

  • Mandatory (field PARMDT)

 

  • First value (field PARDEFDEB)

 

  • Final value (field PARDEFFIN)

 

 

Tab Definition

Presentation

Use the Definitiontab to define the following elements:

  • Define which data is present on the extract file.
  • Define what the extract file looks like, that is to say what the header lines, the detail lines and the footer lines contain.

Use the Groups grid to define how data are grouped.

Use the Definition grid to define how the extract file looks like physically.

Close

 

Fields

The following fields are present on this tab :

Grid Groups

  • Level (field GRPDTALVL)

Select the level at which the data is displayed.

  • Grouping (field GRPDTACLC)

Enter the fields that you want to group.

  • Sort order (field GRPORD)

 

Grid Definition

  • Level (field DFNDTALVL)

Select the level at which the data is displayed.

  • Field (field DFNCOD)

Name of the field.

  • Line break after (field DFNNEWLIG)

 

  • Fixed text (field DFNFXDTXT)

Fixed pre-fix text.

  • Type (field DFNTYP)

Field type - alpha or numeric.

  • Length (field DFNLNG)

Field length.

  • Formula (field DFNVALCLC)

Formula used to calculate the value of the field.

  • Condition (field DFNCDN)

 

  • Title (field DFNTIT)

Title of field when reporting errors on it. It is only used if the value in the Mandatory field is 'Yes', and the result is blank.

  • Mandatory (field DFNMDT)

Select 'Yes' if the field is mandatory.

  • Extract if zero (field DFNEXREMT)

If you select 'Yes' the system extracts the data of the field even if the field contains a 0 or spaces.

  • Exclude (field DFNEXUFLD)

Enter an exclude formula to force the field not to print.

  • Total field (field DFNTOTFLD1)

Specifiy where the item should add up to.

  • Formula (field DFNTOTCLC1)

Formula used to determine how the total specified in the Total field field is affected.

  • Total field (field DFNTOTFLD2)

 

  • Formula (field DFNTOTCLC2)

 

  • Total field (field DFNTOTFLD3)

 

  • Formula (field DFNTOTCLC3)

 

Close

 

Tab Validations

Presentation

Use the Validations tab to validate the data that you have defined in the Definition tab. Define conditions and define if the system should display an error message or set a field value if the condition is true.

Close

 

Fields

The following fields are present on this tab :

Grid Validations

  • Level (field VLYDTALVL)

Level at which the data is displayed.

  • Type (field VLYTYP)

Select the validation type.

Display error

If there is a condition and if the condition is true, the system displays an error message. Enter this error message in the Message column.

Set field value

If there is a condition and if the condition is true, the system sets the field entered in the Set field column to the value contained in the Formula column.

  • Warning (field VLYOPT)

If the Warning check box is selected and the condition is not met, the extract process is stopped.

  • Condition (field VLYCDN1)

If the type is Display error, if there is a condition and if the condition is true, the system displays an error message. Enter this error message in the Message column.

If the type is Set field value, if there is a condition and if the condition is true, the system sets the field entered in the Set field column with the value contained in the Formula column.

  • Set field (field VLYSETFLD)

If the type is Set field value, if there is a condition and if the condition is true, the system sets the field entered in the Set field column with the value contained in the Formula column.

  • Formula (field VLYVALCLC)

 

  • Message (field VLYMSG)

If the type is Display error and if there is a condition and if the condition is true, the system displays an error message. Enter this error message in the Message column.

Close

 

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation