Development > Script dictionary > Functions 

This function is used to list all the functions in the software database called from a menu. A function can correspond to either a menu or a processing.

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

The definition of a function is made on 2 tabs: one tab is used for the general information and the other for the identification of the action.

Header

Presentation

The header is used to specify the function.

Close

 

Fields

The following fields are present on this tab :

Indicate the function code. The codes starting with "GES" are automatically generated by the object management supervisor.

  • Description (field ZNOM)

 

Close

 

Tab General

Presentation

This tab is used to mention the general characteristics of the function.

Close

 

Fields

The following fields are present on this tab :

Characteristics

  • Parent menu (field MENU)

When a function is created, it is indispensable to reference it in a menu, in order that this function can be called. The menus are parameterized by user, but a reference user exists, called ADMIN, but whose name is modifiable using the parameter ADMUSR.. These menus contain all the functions and can serve as a template during the creation of the menus. Therefore a reference menu for where the function is found is defined here.

The top menu in the standard menu tree structure is called GENE ; all functions must be referenced, whether in this menu GENE, or in another menu itself accessible via the menu GENE. The following constrains exist :

  it is not possible to have more than 30 choices in a menu.

  it is not possible to exceed 4 levels of sub-menus.

The menu title is the text (translatable) that will actually appear in the user menu to describe the function.

  • Sequence (field RANG)

Indicate the rank where the function will appear in the menu above. In a menu the functions are sorted by rank in ascending order.

  • Menu title (field ZLIBMENU)

 

Block number 2

  • Module (field MODULE)

Specify the module that uses this function. If the function is using several modules, indicate "supervisor".

If this field is not assigned, the function will always be active and will generate a menu line for the user ADMIN. If this field corresponds to an inactive activity code, the function will not be active. If this field starts with an X, Y or Z, the folder validation does not update the function.

  • Function type (field TYPTRAIT)

Indicate the type of function : process or sub-menu.

  • Menu/process (field TRAIT)

The process, if it is entered, corresponds to :

  • either the name of the process to be executed on the condition that it does not open the window.
  • or to the name of the menu.

For a function of the process type, the method recommended is to enter the action, if it is not of the type "miscellaneous process", rather than enter the process directly.

Authorizations

  • Access type object (field TYP)

When the function is linked to an object, the field "Object access type" is automatically set. It is used to propose the following 3 codes in the functional authorizations : C (Creation), M (Modification), S (Deletion).
For any object, it will be possible to restrict the functional authorizations rights, by not authorizing the creation and/or modification and/or the deletion.

  • Authorization site (field FCYAUZ)

When the "site authorization" field is set, it allows the detailing of the functional authorizations by site or group of sites.

Miscellaneous

  • Single execution (field MONO)

This check box is used to make the function executable even if the folder has been set to the "mono-module" ; that is to say it does not authorize any function or the module. A folder is set to mono-module by an exclusive function.

  • Entry help (field ZAIDE)

 

  • Printing (field RPT1)

These two fields are used to define the name of the two report codes that can be called by the functions Print file and List file. These codes being stored in the following varables :GREPORT1 and GREPORT2. In the standard way, the Print function relates to the current record (the function is not in principal available if there is no current record), whilst the List function is available in all cases. In the case of a function linked to the object, the supervisor manages these buttons (activation, de-activation, execution). For all the other functions, the developer in the function is assumed to manage the call to these two reports, as well as the activation.

  • List (field RPT2)

 

  • Navigation (field NAVIG)

Setting autorizations, around this function, for the "Navigation/Go to the gunction" menu:

 Autorized: this function can be accessed via the navigation.

 Forbidden to this fonction: this function cannot be reached via navigation if, for instance, a calling context is necessary.

 Forbidden from this function: The navigation is forbidden from this function when, for instance, it is necessary to protect the current context.

 Forbidden in all cases: It is forbidden to access this function via navigation and to access navigation via this function.

Grid Options

  • No. (field NUMLIG1)

 

  • Option code (field FLAG)

This table is used to define the options codes (up to a maximum of 20) in the form of a letter and associated comment. The lower case letters are reserved for specific/custom developments. On each functional authorization, this letter can be selected or not in order to add the options to the function. On the execution of a function, the supervisor loads the global variable GUSRAUZ(n) with the authorized option codes; n is the index that indicates the breakdown of the authorizations by site. The developer can link a section of their process with the presence or not of an option code in this variable.

  • Option title (field ZOPTION)

 

  • Function (field FNCOPT)

This field makes it possible to define a function that will govern the access to this parameter. This makes it possible to avoid access authorization errors. For example : The button 'Validation' for the function GESBIC 'BP customer invoices' corresponds to the function BPCVAL. It is therefore possible to control access to the button according to the authorizations defined in the function BPCVAL.

This activity code governs the presence or not, of the option in the function.

Grid Variables

  • No. (field NUMLIG2)

 

  • Variable (field VARIA)

This table is used to define a list of global variables that must be assigned in order to give a calling process a more specific context. These variables are initialized by the function, when the process is called from the menu.

  • Value (field VALEUR)

Specify the value to be assigned to the variable of the same line. Be careful to respect its type (no control is carried out).

This activity code makes it possible to protect the variable during a folder update.

Close

 

Tab Action

Presentation

This tab is used to specify the action to execute.

 

Fields

The following fields are present on this tab :

Block number 1

The action that will be executed at the launch of the function is defined here. The action must exist in the dictionary and must not be of the type "miscellaneous process". If this is the case, the unction must not call the function but must call the process directly ; to do this the name of the process must be entered in the first tab.

Grid

 

  • Parameter value (field VALPAR)

possibility to enter the values for the action parameters.

 

Reports

By default, the following reports are associated with this function :

 AFONCTION : Functions

This can be changed using a different setup.

Specific Buttons

This button is used to copy the function definition to another folder.

Menu Bar

Option / Formula Wizard setup

Used to tunnel to the function "contextual formula wizard".

Option / Function Validation

Documentation / Paragraphs

This menu item allows access to the documentation management on the first paragraph of the documentation (if there is one) associated with the current record.

Documentation / Links

This menu item allows access to link management. It is used to define the links between the current record and other records (for example, the links between functions and parameters). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu item launches a documentation generation. You can also launch it from the Generation button at the bottom of the screen.

You can launch three types of generation one by one or simultaneously

  • The generation of the documentation structure from the dictionary (ADOCUMENT, ADOCBLB, and ADOCCLB tables)
  • The generation of the documentation from the previous tables
  • The generation of the field documentation

The range suggested by default takes into account the current record, but you can modify it at launch time.

Error messages

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

Function code format incorrect (5 characters max)

For a function of the type menu, the function code must not exceed 5 characters.

Incorrect value

It is prohibited to associate a function of the type process with a general menu GENE.

It is prohibited to associate a function of the type menu with itself.

Mandatory field

In a function of the type processing, the action code (see the process name) must be entered.

Modification impossible

When standard activity code is present, it is not possible to delete it.

Incorrect option  /   Incorrect option line no. xxx

In a function linked to the object, the option codes C, M and D are reserved for the supervisor.

Record does not exist

In the options table, the function when it is entered, must exist in the dictionary.

Tables used

SEEREFERTTO Refer to documentation Implementation