Setup > Usage > Statistics > Statistical parameters 

A tool that is used throughout the statistical setup is provided in the software. This tool is used to create a statistical database in a totals file. This file contains the records in the following form :

Code MAJ

Company

Site

Date

Criteria 1

Criteria 2

Criteria 3

...

Amounts
(1 to 5 or 10)

The MAJ code is a characteristic code used in the reports and inquiry programs. It is possible to create as many codes as necessary (each corresponding to a type of statistical information).

The company and site codes are used to have detailed statistics if necessary (this is not mandatory and if this level of detail is not required, the corresponding fields remain empty in the database construction).

The date field is entered with the first date of the period corresponding to the triggering event date (according to the case, this will be the first day of the week, fortnight, month, quarter, year....).

The criteria fields are freely defined by using the fields in the on-line tables (or with parts of these fields, for example the first two characters of the postal code). This makes it possible to have statistics with the analysis axes more or less detailed. From the version 140 on, it is possible to have 1 to 8 criteria (in version 130 the limit was 4)

The amounts fields contain the amounts totals that are to be analyzed in the statistics.

The setup is made using this function, by creating the triggering records for the statistical database construction. One record at least is created by MAJ code used. Each record is identified by a unique code, which is often confused with the MAJ code, except when two (or more) records updating the same MAJ code (in this case the codes are different).

In addition it is possible to define, for the statistical setups of this type, if the previsions must be entered (or calculated from the real situation) with regard to the statistical totals.

The statistics inquiries can be made with 1 to 10 expression calculated from the total amounts for the inquiry period, for the previous period, as well as on the budgets entered. For example it is possible to display only the average values for a total by using these expressions. To view the statistics, the inquiry function is started using the MAJ code to be viewed. It will then be possible to zoom on the different levels of detail introduced by the successive criteria. The final zooms on the detail of the aggregated movements (if they are still on line).

A contextual inquiry on the statistics is possible from the File / Statistics that can be set up for each object (there is a tick box that defines it). When this function is used, a list of the available statistics codes appear and the zoom is made to the most detailed level taking into account the calling context. For example, in the framework of a if a sales management, if statistics has been defined by region (the first 2 characters of the default address associated with the business partner), then by customer statistics group, then by customer, then by product, a call to the statistics from a customer record authorizing access to this statistic and automatically set itself at the level of the customer detail (then the context is used to give a value by default to the region, to the customer group and the customer code). The statistics for the totals for the customer by product group appear directly.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Presentation

In the record header, a code (unique identifier for the setup) and a title are found.

Close

 

Fields

The following fields are present on this tab :

It identifies the current statistical code. A set of totals based on one to eight crossed criteria is linked to each statistical code.

  • Description (field INTIT)

Use this field to assign a description to each record.

  • Short description (field INTSHO)

This title, which describes the record, is used in some screens or records when there is not enough space to display the long title.

Close

 

Tab General

Presentation

This tab defines the main information of the statistical aggregate (triggering event, frequency, definition level, etc.).

Close

 

Fields

The following fields are present on this tab :

Accessibility

  • Active (field ENAFLG)

Select this check box to activate the current record.

Disabled records keep their content and setup but cannot be used by recalling their code:

  • On other records such as documents and settings
  • On mass processes

The authorizations for a given function can prohibit the creation of an active record. In this case, the check box is disabled by default. It can only be modified by an authorized user or through a signature workflow.

An activity code is used to:

  • Make an element optional in the dictionary if the value associated with the activity code is null
  • Identify the specific/custom elements if they are marked with a code starting with X, Y, or Z
  • Size a maximum number of lines when the activity code marks elements from a grid

If the activity code is disabled:

  • The marked element will not be useable
  • The associated code will not be generated nor activated

This access code makes it possible to prohibit access to the current record for some users.

If the field is populated, only users that have this access code with read access rights (and write access rights respectively) can view (or with write access rights, modify) the record.

This access code makes it possible to prohibit access to the code for certain users.

If the field is assigned, only those users who have this access code in their profile can modify and/or enter this code according to the rights accorded.

  • Module (field MODULE)

Select a module for the setup.

Use this field to specify if the screen has to be created in the folder database. This is the case when the module linked to the screen is active on the folder.

Periodicity

  • Script (field PERPRG)

When wanting to establish aggregates with a periodicity not predefined in the software, there is the possibility to define the name of a process here where the following sub-programs should be defined :

  • # This sub-program is used to recalculate a date (defined by DAT1)
    # which should correspond to the end of the period.
    # The result is DAT2.
    # LIBCLE corresponds to the label for the period in alphanumeric format.

    Subprog BORNES(DAT1,DAT2,LIBCLE)
    Value    Date    DAT1
    Variable Date    DAT2
    Variable Char    LIBCLE
  • # This sub-program is used to identify a date (defined par DA1) that will correspond to the start of the period.
    Subprog CADRE(DAT1)
    Variable Date DAT1
  • # This sub-program returns in DAT2 the end of the period defined by DAT1
    Subprog DATFIN(DAT1,DAT2)
    Value Date DAT1
    Variable Date DAT2
  • # This sub-program returns the number of periods (signed) separating the two dates
    Subprog DECAL(DAT1,DAT2,DECAL)
    Value Date DAT1
    Value Date DAT2
    Variable Integer DECAL
  • # This sub-program adds a number of periods (signed) to an end date
    Subprog RECAL(DAT1,DAT2,DECAL)
    Value Date DAT1
    Variable Date DAT2
    Value Integer DECAL

An example of such sub-program can be consulted by looking at the SUBSTADEC process, which defines the sub-program corresponding to management by decade.

  • Periodicity (field PERTYP)

Periodicity for which the statistic is to be carried out. A local menu is used to define the different periodicities (daily, weekly, fortnightly, monthly...).

The aggregate records created by the statistical aggregation are dated to the first day of the period.

Management

Code for the triggering of the statistic that is used to identify the element that triggers the statistic.

It must be defined in the table of the triggering events.

  • Validity start date (field VLYSTR)

The validity start and end dates defined for certain records used to limit the validity of a record between two dates.

  • Validity end date (field VLYEND)

 

  • Update code (field UPDCOD)

This code is by default the statistic code. But it can be different, notably if wanting to create a single aggregate from several different triggering events (which imposes several statistics codes). In this case, the update code will be common to all the statistics codes.

  • Data retention days (field TIM)

Life of the statistic expressed in a number of months. This time is used by the management of purging, once the decision has been made to purge the statistical data.

The statistical data normally being strongly aggregated, they take up a limited amount of space and it is often interesting to keep these statistics for a fairly long time.

  • Update date (field LSTDAT)

This displayed date is used to identify the last date at which an aggregate has been carried out by recalculation of the statistic.

Inquiry

An enquiry screen can be defined in the case of customisable enquiries. For example, in the case of account enquiries.

This field makes it possible to define an object. In the Zoom menu for this object, it is possible to find all the statistics codes with this object code.

In order that the zoom menu appears in the object management, it is necessary to tick the box Zoom in the parameterisation of the object.

This field allows the entry of the Crystal Reports report associated with the consultation of this statistic code

 

Characteristics

  • Definition level (field UPDLEV)

Used to define the organizational level of the aggregate by period (a global, by company or by site aggregate).

The site level of detail can only be obtained if the triggering event defines a site code; the company level of detail can only be obtained if a site or company are defined in the triggering event.

On restitution, there is the possibility to request either the most detailed parametized, or an aggregate level (by company, or global if the aggregated is managed by site).

  • Type (field TYP)

Used to define if the aggregate in the statistical records is updated in real time or in batch mode.

It is important to note that only the standard triggering events can give rise to real-time aggregations (each time an update is made, the update is carried out). Except in the case or customized statistics, the statistics based on non standard triggering events that can only be updated in batch mode.

For performance reasons, the use of numerous standard aggregations based on a given triggering event can slow the corresponding transaction. It is therefore prudent to have batch based statistics and to plan to have a regular batch task to update them.

Block number 6

Close

 

Tab Fields

Presentation

This tab is used to define, in two successive grids:

  • the grouping criteria on which the statistical totals are managed. It is possible to see the statistical totals on the report at the different aggregation levels for this criteria values. The grouping criteria are fields (or sub-chains taken from these fields) extracted from the online tables.

    If these fields have a type (linked to another table, for instance) an associated title is also stored in the aggregation record. For instance, when using the user code (of type AUS), the user name is stored and can be reused.
  • the expressions to total, which can be reused either directly or via formulas (ratios, comparisons, percentages) defined in the tab Advanced.These expressions are defined in a grid of 10 lines maximum.

 

Fields

The following fields are present on this tab :

Grid Fields

Define the table in which is found the grouping criterion for the line of the statistic.

  • Abbreviation (field TBLABR)

When the previous table is on line several times in the trigger event, the abbreviation to be used in this specific case is defined here.

  • Field (field FLDNAM)

Define the field code such as it is known in the table.

  • Index (field FLDIND)

When the criterion chosen is multi-occurrence, the value of this field is used to give an index (from 0 to N-1, if N is the number of occurrences of the field).

  • Description (field FLDINTIT)

Define the title of a criterion as it will appear during an interrogation of the statistics. By default, the title of the field is picked up from the dictionary and so can be displayed in the connection language of the user.

But it is also possible to modify it to give a different title, so that other languages can be used to define it.

In translatable fields such as this one, you can enter a description in a language other than the connection language: Click On line translations from the Actions menu.
SEEREFERTTO For further information, see On line translation of descriptions.

 
  • Group (field FLDGRP)

 

  • Position (field FLDPOS)

When the criterion field is a string of characters, it is possible to define the aggregation on a sub-string of characters by defining the position of the first character retained (1=start of the string) and the length.

For example :

  • if it is necessary to aggregate the total of the first two characters of a post code of 5 characters, it is necessary to give position 1 and length 2.
  • if wanting to structure the aggregate of the last three characters of a code of 8 characters, it is necessary to give position 6 and length 3.
  • Length (field FLDLON)

 

  • Type (field FLDTYP)

Display only field that indicates the data type (character,numeric, local menu, date...) corresponding to the criteria entered on line.

Grid Values

  • Variable (field VARNAM)

Defines the title proposed by default with regard and the statistical total.

  • Description (field AMTDES)

Define title for the stock totals in statistics record.

  • Formulas (field AMTFOR)

This calculated formula, can call all variables and tables on line at the time of the aggregation, is evaluated and its result is aggregated in the statistic aggregate corresponding to the period an the organizational level of the defines aggregation.

  • Forecast (field FRTFLG)

If this indicator is set toYes, it is possible to define the provisions for the corresponding aggregate amount.

These provisions can be entered, calculated from actuals or from provisions in another period and this in an aggregation field freely defined from the criteria defined for the statistic.

On the restitution of the statistic, there is the possibility to present both the calculated aggregates, the corresponding provisions and any expression that acts on the two (this is parameterized in the tab Advanced of the statistic).

  • Conversion (field CNV)

This indicator is used to specify if the previous expression is expressed in a currency, where there is then the possibility to give the currency by calculate expression, as well as the common currency in which it should be converted.

The conversion is made at the historic rate defined on the reference date for the triggering event, the exchange rate type used for the conversion being defined by the parameter CHGTYP (the first type if nothing is defined).

Thus it is possible to get amount totals expressed in a homogenous fashion.

  • Source currency (field DEVORG)

When the statistical amount is expressed in currency, this field is used to identify the code for the destination currency, in order to be able to convert the amounts in a current currency before aggregating them.

It is a calculated expression either constant type, or via the intervention of a common variable for example GSYSCUR.

  • Destination currency (field DEVDES)

The statistical amount is expressed in currency, this field is used to identify the original currency code, in order to be able to convert the amounts in a common currency before aggregating them. It is a calculated expression either of the constant type, or via the intervention of fields that are online at the time of the aggregation.

 

Tab Advanced

Presentation

When the statistical report is not just a display of the totals performed in the previous tab, this tab is entered with the following additional information:

  • a grid of the columns to display. By default, upon statistics creation, the titles of the totals or reused.
  • criteria if needed to filter the data which are totaled by logical expressions that have to be verified for the total to be made.

Close

 

Fields

The following fields are present on this tab :

Grid Columns

  • Titles (field INTITFRM)

Enter the column title.

In translatable fields such as this one, you can enter a description in a language other than the connection language: Click On line translations from the Actions menu.
SEEREFERTTO For further information, see On line translation of descriptions.

 
  • Formulas (field AMTFRM)

Enter the formula that is used to calculate the total for the column.

The Selection button makes it possible to choose the available variables.

  • Column type (field CUMFRM)

Enter the column type :

- Normal : Column total.

- Progressive total : the cumulative line total by line without re-zeroing.

- % of the total : line total percentage with respect to the overall total.

- cumulative % : the cumulative line % of the total by line without re-zeroing.

  • Format (field FMTFRM)

Used to define, in the decimal format, the number of integers used before and after the decimal point. If this field is not entered, the value of the FMTSTA parameter is used.

Conditions

  • Criteria (field CRI)

In the case of multiple lines, the criteria are linked by an AND logic.

Close

 

Menu Bar

This button is used to generate the automatic processes linked to the statistical code. This validation is normally linked to the modification or the creation of a code. It is only necessary if the processes have not been deleted or if the setup has been created by copy from another folder (in this case, the validation is not carried out automatically).
 

The following fields are included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Use this field to define the folder from which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

  • All folders (field TOUDOS)

Use this option to copy the record to all the folders defined in the dictionary (ADOSSIER table of the current solution).

  • To folder (field DOSDES)

Use this field to define the folder to which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

Close

This button is used to copy the record definition from or to another folder.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

No link to the table XXXX

An attempt has been made to use a criteria extracted from a table not referenced as being linked to the triggering event.

Non-defined variable

An attempt has been made to use in the variables grid a variable not defined in the triggering event.

Incorrect expression

The arithmetic expression entered has incorrect syntax (additional information may follow this message).

Tables used

SEEREFERTTO Refer to documentation Implementation