The section explains what configuration alias and alias-references are, when they are needed, and how to create them.
An alias is a user defined name used to reference data on function/parameter. This applies to output and/or return values from a function call. Aliases can be created explicitly by a configuration or automatically using the ERP Configuration Tool and when its usage is implied and obvious. You would normally set up an alias under two conditions.
- When you need to access data which is part of
a complex-structure, such as an SAPStructure or an
- When you need to fetch data returned from a
function from within another function or operation, as in the case
of a getList/getDetails configuration.
Reading data from a complex structure
If you are flowing function or parameter data to or from a CS attribute, and the data type of the parameter is a structure (i.e. SAPStructure or SAPTable) you will need to define an alias for this parameter. Doing so will identify and label this data structure in memory and allow the MA to find the named-structure easily when retrieving the field data. We do this by defining an alias for the parameter structure.
Fetching data returned from a function, from within another function or operation
If an operation includes multiple functions, the output of the first function may be the input to the second function. The referenced value indicates from where an input parameter is populated. The alias value indicates where the out parameter for a function is used in a subsequent operation.
This scenario is typical of a getList/getDetails configuration where the data is collected in the getList operation and used later in the getDetails operation. This will be the case for importing SAP users where we must first collect a list of users before fetching their individual details.
Here, we define an alias in the first function to collect and name all the user IDs. Later, in the getDetails operation, we can then refer to these IDs via the alias name (a.k.a alias references.) This will cause the user IDs to be pinned and labeled in memory, and prevent them from being cleaned before the 2nd getDetails function is executed. Because the data collected here is a list of user IDs, when the getDetails function is called, referencing this list, a loop condition is implied and the user ID's will be moved onto the specified function/parameter one at a time.
Defining the Alias
To define an alias, simply edit the properties of a function/parameter and enter an alias name in the alias field provided in the Add or Edit Parameter Properties dialog box.
Referencing an Alias
To reference a previously defined alias, simply edit the properties of a function/parameter and enter an alias name in the reference field provided in the Add or Edit Parameter Properties dialog box.