RunInterfaceService (Export) at scenario level
The RunInterfaceService (Export) macro is used to run an interface service that exports
plan data for the current scenario. This macro is executed at scenario level.
This table lists the parameters used to execute the RunInterfaceService (Export) macro:
Parameter | Description |
---|---|
Interface Service Name | The name of the interface service that is run. |
Direction | The direction of the data flow. The values must be set to ‘Export’. |
Item Hierarchy Node | The item to export. Note: If the value is not specified, all items are
exported.
|
Location Hierarchy Node | The location of the item to export. Note: If the value is not specified, all
locations are exported.
|
Calendar Type | The period for which the data is exported. Possible values:
Note: If the value is not specified, Start Bucket period is considered.
|
Period Label | The cycle period to export. This supports rolling period nodes. Note:
|
Num Periods | The number of horizon level periods to export. If the horizon level is not
equal to the Calendar Level to store scenario values or if the Telescopic option is enabled, all the base buckets
within the specified range of selected periods are exported. Possible values:
|
Horizon Level | The calendar horizon level to be used by [num periods] for exporting. Note: If
the value is not specified, the number of periods are based on the calendar level
to store scenario values.
|
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 exported. |
The value for the Command field must be specified
in this format: RunInterfaceService (Interface Service Name, Direction, [Item
Hierarchy Node], [Location Hierarchy Node],[Calendar Type], [Period Label], [Num Periods],
[Horizon Level],[Filter]).
Note: The optional Parameters are specified in [
].
Requirement | Parameter |
---|---|
Export All items at all locations from the current planning period for the cycle period horizon. | RunInterfaceService("Export Scenario file","Export","","","Current Bucket","") |
Export GOO items at all locations for the duration of the calendar bucket ‘Current Year’ at the calendar level to store scenario values (no telescopic buckets are defined). | RunInterfaceService("Export Scenario file","Export","GOO","","Bucket","Current Year","0") |
Export GOO items at all locations for the current planning period. For example, "FY10 M03" for 1 month period (if cycle calendar level to store scenario values = months). | RunInterfaceService("Export Scenario file","Export","GOO","","Current Bucket","1"). |
Export All items at US locations from the current cycle period for 52 weekly periods (if cycle calendar level to store scenario values = weeks). | RunInterfaceService("Export Scenario file","Export","","US","Current Bucket","52"). |
Export All items at all locations from calendar bucket "FY10 M03" for 9 month periods (if cycle calendar level to store scenario values = months). | RunInterfaceService("Export Scenario file","Export","","","Bucket","FY10 M03","9") |
Export All items at all locations for all periods in the cycle period horizon; starting from first (oldest) historic period. | RunInterfaceService("Export Scenario file","Export","","","","") |
Export All items at all locations for 7 periods at calendar level to store scenario values; starting from the first (oldest) period in the cycle period horizon. If the cycle horizon is specified as historical = 6 and future = 6. Results is 6 historical periods and 1 future period in the export process (no telescopic buckets are defined). | RunInterfaceService("Export Scenario file","Export","","","Start Bucket","7") |
Export GOO items at all locations where 0 < [DPLS_FUNITS] for pconst. For example "FY10 M03" for 1-month period (if cycle calendar level to store scenario values = months and no telescopic buckets are defined). | RunInterfaceService("Export Scenario file","Export","GOO","","Current Bucket","1","", "0 < [DPLS_FUNITS]"). |
Export All items at all locations from calendar bucket "FY10 M03" for 3 Months of weekly periods (if cycle calendar level to store scenario values = weeks). | RunInterfaceService("Export Scenario file","Export","","","Bucket","FY10 M03","3", "Months"). |
Export GOO items at all locations for the current planning period. For example, "FY10 M03" for 1 Month of weekly periods (cycle calendar level to store scenario values = Weeks and no telescopic buckets are defined). | RunInterfaceService("Export Scenario file","Export","GOO","","Current Bucket","1","Months"). |
Export GOO items at all locations for the current planning period. For example, "FY10 M03" for one month where telescopic is enabled for the cycle. Cycle calendar level to store scenario values = Weeks, telescopic periods for cycle = 7 days, with future horizon = 8 weeks. Result is one month of telescopic, base buckets, that is, 7 daily buckets, 3 weekly buckets. | RunInterfaceService("Export Scenario file","Export","GOO","","Current Bucket","1","Months"). |
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 | Any | Yes | N/A |
Completed | Any | Yes | N/A |
Aborted | Any | Yes | N/A |
Paused | Any | Yes | N/A |
Archived | Any | No | Cannot run macro {0} because Cycle Period has status "Archived" |
The plan data is exported 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, that is, 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}". |
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. |
RunInterfaceService in cycle period context must belong to a cycle period with Running, Paused, Completed, Aborted status. | Cannot execute RunInterfaceService for a cycle period with status {0}. |
When executing RunInterfaceService in a cycle period context, the selected interface service must refer to a calendar that matches the calendar of 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. |
When executing RunInterfaceService for export, check that the horizon level (if specified) is valid. | Horizon Level {0} cannot be found. |
When executing RunInterfaceService for Export, check that the horizon level, if specified, is at or above Calendar Level to store scenario values (if the Telescopic option is not enabled). | Horizon Level {0} is below the Calendar level {1} for storing scenario values. |