RunInterfaceService (Import) at scenario level
The RunInterfaceService macro is used to run an interface service that imports plan data
for the current scenario. This macro is executed at scenario level.
This table lists the parameters used to execute the RunInterfaceService (Import) macro:
Parameter | Description |
---|---|
Interface Service Name | The name of the interface service that is run. |
Direction | The direction of the data flow. This value must be set to ‘Import’. |
Reject all on error | Indicates the import process is aborted, if error occurs. Note: This parameter
is applicable only if Direction is set to Import.
|
Filter | The filter used to determine the item and location selection. Only the relevant data, of the selected items and locations that meet the specified criteria, is imported. |
The value for the Command field must be specified
in this format: RunInterfaceService(Interface Service Name, Direction, [Reject all on
error], [Filter]).
Note: The optional Parameters are specified in [ ].
Requirement | Parameter |
---|---|
Import all items at all locations from the current planning period for the cycle period horizon. | RunInterfaceService("Import My Forecast","Import") |
Import all items at all locations from the current planning period for the cycle period horizon. If error occurs, reject all imported records. | RunInterfaceService("Import My Forecast","Import","True") |
Validation and error messages
This table lists the Cycle Period status and the related validation messages:
Cycle Period status | Scenario status | Can Execute? | Validation message |
---|---|---|---|
Pending | N/A | No | Cannot run macro {0} because Cycle Period has status "Pending". |
Running | WIP | Yes | N/A |
Running | Review, Rejected, Stopped, Approved, Published | No | Cannot run macro {0} because Scenario has status {1} |
Completed | Any | No | Cannot run macro {0} because Cycle Period has status "Completed" |
Aborted | Any | No | Cannot run macro {0} because Cycle Period has status "Aborted" |
Paused | Any | No | Cannot run macro {0} because Cycle Period is “not running" |
Archived | Any | No | Cannot run macro {0} because Cycle Period has status "Archived" |
The plan data is imported for the current scenario on successful validation and execution
of the macro. If the validation fails, the macro is aborted, and the related error message
is displayed. This table lists the error messages displayed for various validation
failures:
Validation Condition/Rules | Error Message |
---|---|
Check that the passed interface service is valid. | Interface Service "{0}" cannot be found. |
If the selected Interface Service data entity is not applicable to the current macro context, the macro is not executed. For example, RunInterfaceService for scenario can only run interfaces of data entity = scenario value. | Interface Service {0} does not match the data entity required for a scenario macro. |
If the Direction does not match the Interface Direction of the selected Interface Service, the macro is not executed. | Direction parameter {0} does not match the direction of the selected Interface Service "{1}". |
When the selected direction is Import, the cycle period must be "Available" with a “WIP” scenario. | Cannot execute RunInterfaceService with direction of import for a cycle period with status "{0}". |
Ensure that the scenario status is WIP when running an Import. | Cannot execute RunInterfaceService with direction of import for a scenario status "{0}". |
For Import scenario Interface, if the Calendar Level specified in the interface service does not exist in the calendar for the current cycle. | Calendar Level {0} cannot be found. |
If the calendar level is not higher or equal to the Calendar level for storing scenario values, a warning message is displayed, and the import process is aborted. | Calendar Level {0} is below the Calendar level {1} for storing scenario values. |
When executing RunInterfaceService in a cycle period context, the selected interface service must refer to a calendar that matches the calendar for the current cycle period. Else the macro is not executed. | Calendar referenced in Interface Service {0} does not match the calendar of the current cycle period. |