The use declaration allows you to easily reference data areas and functions in parts that are separately generated. A program, for instance, can issue a use declaration that allows for easy reference to a data table, library, or form group, but only if those parts are visible to the program part. For details on visibility, see References to parts.
myLib.myVar
myVar
The previous, short form of the reference is valid only if the symbol myVar is unique for every variable and structure item that is global to the program. (If the symbol is not unique, an error occurs.) Also, the symbol myVar refers to an item in the library only if a local variable or parameter does not have the same name. (A local data area takes precedence over a same-named, program-global data area.)
Each name specified in the use declaration may be qualified by a package name, library name, or both.
Each use declaration in a program or library must be external to any function. The syntax for the declaration is as follows:
A reference in a use declaration is unnecessary for a dataTable part that is referenced in the program property msgTablePrefix.
You cannot override properties of a dataTable part in the use declaration.
For an overview of dataTable parts, see DataTable part.
You cannot override properties of the library part in the use declaration.
For an overview of library parts, see Library part of type basicLibrary and Library part of type nativeLibrary.
A program that uses any of the forms in a given formGroup part must have a use declaration for that formGroup part.
The properties that follow let you change behaviors when a form group is accessed by a specific program.
If you specify multiple keys, separate one from the next with a comma.
In a formGroup part, a use declaration refers to a form that is specified outside the form group. This kind of declaration allows multiple form groups to share the same form.
The syntax for a use declaration in a formGroup part is as follows:
You cannot override properties of a form part in the use declaration of a formGroup part.
Each use declaration in a pageHandler part must be external to any function. The syntax for the declaration is as follows:
You cannot override properties of a dataTable part in the use declaration.
For an overview of dataTable parts, see DataTable part.
You cannot override properties of the library part in the use declaration.
For an overview of library parts, see Library part.
Related concepts
DataTable
FormGroup part
Form part
Library part of type basicLibrary
Library part of type nativeLibrary
References to parts
Related reference
pfKeyEquate