Setting Up Utilities
To define element mapping, use the Map Elems to Comp/Rcd MEX (GPMX_ELEM_MAP) component.
To define component variables, use the Define Variable Attributes MEX (GPMX_COMP_VARS) component.
Note: This setup is optional and is designed to help technical people manipulate PIN numbers during development.
Page Name |
Definition Name |
Usage |
---|---|---|
GPMX_ELEM_MAP |
Set up the mapping to the fields and variables of an element which are used during development in the components interface objects. |
|
GPMX_COMP_VARS |
Define the component variables to be used on the Map Elems to Comp/Rcd MEX page when defining the variable type. |
The element map plays a critical role when packaging and moving elements and data to other databases.
PIN numbers are used in PeopleCode, component interfaces, and reports to refer to global elements. The PIN number is a consecutive number so it can change between databases or releases; therefore, there is a need to create a utility during development so that the PIN number is not hard-coded. Using the utility also ensures consistency between the PIN number changes.
PeopleCode Function Example
When you need to use a PIN number in the PeopleCode, use this function to obtain the corresponding PIN number:
Declare Function Get_Pin_Num PeopleCode GPMX_DERIVED_EM.PIN_NUM FieldFormula;
&Record_Name = "GPMX_LOAN";
&Date_Pin_Num = Get_Pin_Num("R", &Record_Name, "DATE");
There are two ways to map an element:
By record
By component
Select Record when you need to map a record field into a core Global Payroll element.
Select Component when the mapping doesn't depend on a record field; instead, it depends on some behavior on the page, for example, the record is used in more than one place and must map to different core Global Payroll elements.
If you select to map an element by component, you may want to define your component variables before you define your element mapping. You'll do this on the Define Variable Attributes MEX page.
Use the Map Elems to Comp/Rcd MEX page (GPMX_ELEM_MAP) to set up the mapping to the fields and variables of an element which are used during development in the components interface objects.
Navigation:
This example illustrates the fields and controls on the Map Elems to Comp/Rcd MEX page . You can find definitions for the fields and controls later on this page.
![Map Elems to Comp/Rcd MEX page](img/i-cd7d26dn-7d9b.png)
Field or Control |
Description |
---|---|
Key Type |
The key type that your mapping applies to appears here. Values are Other and Field. Note: The Key Type field is populated depending on the key type you selected (either Record or Component) and can't be modified. |
Map Value |
Select the field or value to which you want to map. If you selected Record as the key type, you can select the record fields. If you selected Component as the key type, then you can select the variables defined for the component. |
Entry Type |
Select the element type on which you want to transform your field or variable. Values are Accumulator, Bracket- Numeric, Count, Deduction, Earnings, Formula − Numeric, Rate Code, Rate Code − Amount, Variable − Numeric, Variable − Pointer, and Variable − Dec+Char+Date+Ptr. Values depend on the Map Value type. For example, if you select a Character map value, then you can select only character values. Note: Although you can see System Element − Numeric as a value, you will not be able to select it. The entry type cannot be a system element or a constant. |
Name |
Select the name of the element. |
Use the Define Variable Attributes MEX page (GPMX_COMP_VARS) to define the component variables to be used on the Map Elems to Comp/Rcd MEX page when defining the variable type.
Navigation:
This example illustrates the fields and controls on the Define Variable Attributes MEX page. You can find definitions for the fields and controls later on this page.
![Define Variable Attributes MEX page](img/i-cd7d26dn-7d9d.png)
Field or Control |
Description |
---|---|
Variable Name |
Enter the name of the variable. This can be any name you want to use during PeopleCode development. |
Variable Type |
Select the variable type. Values are Character, Date, and Numeric. Note: Once you've defined your component variables, you can map your elements on the Map Elems to Comp/Rcd MEX page. |