SetAppVariable macro at planning engine level
The SetAppVariable macro is used to set the value for the application variables.
For executing the macro, the value for the Command field must be specified in this format:
SetAppVariable(Variable Name,Variable Value)
This table lists the parameters used to determine the Application Variable values to be set:
Parameter name | Description |
---|---|
Variable Name | The name of the Application Variable. |
Variable Value | The value to be assigned to the Application Variable. This value overrides the global or Planning engine value defined for the Application Variable for the duration of the macro execution. |
On macro execution, the Application Variable values are set and used throughout the macro and all planning engine macros called from this macro through parameter variables. The value set in the SetAppVariable macro command can be used by subsequent macros within the same macro unless the parameter is specified to use an explicit value.
On completion of the macro execution, the application variable is reset to the original value using the global default/override or Planning Engine Cycle/Planning Engine value.
This table lists the examples of the SetAppVariable macro:
Test data | Processing details |
---|---|
Application Variable: Datasource=DataSrc1 Planning Engine Macro: SetAppVariable("Datasource","SCV2") RunPlanningEngineInterfaceService("SPLS_ImportAPSCO","", "%Datasource%") |
Execute Planning Engine Macro. SPLS_ImportAPSCO interface service is executed against the data source SCV2. |
Validations are performed when you execute the macro. If any of the validation fails, the macro is aborted, and the related error message is displayed.
This table lists the error message is displayed during the macro execution:
Parameter | Validation condition | Validation message |
---|---|---|
Variable Name | Check if the application variable exists. | Application Variable {0} cannot be found. |