Show TOC

Syntax documentationSpecial Keywords Locate this document in the navigation structure

The following are special keywords:

SET

An implied keyword is available for each dimension. This keyword holds the set of members passed to the logic engine for a given dimension. This keyword can be used as a replacement string anywhere in the logic.

%{DimName}_SET%

{DimName} is the name of a valid dimension in the application. For example the keyword %INTCO_SET% contains the set of members passed to the logic for the dimension INTCO.

This keyword can be used anywhere in the logic and not just within some specific statement like XDIM_MEMBERSET.

This keyword is not modified by the XDIM_MEMBERSET instruction, as it always returns the original set passed to the logic.

This keyword does not return a default set if no set is passed. Its default is an empty set.

DIM

Another type of implied keywords is available for each non-user-defined dimension. This keyword holds the actual name of a dimension of a given type, and can be used as a replacement string to use anywhere in the logic.

%{DimType}_DIM%

{DimType} is the type of dimension.

Example Example

If, in an application, the category dimension is called SCENARIO, the keyword %CATEGORY_DIM% returns the word SCENARIO.

End of the example.

Valid types are:

  • ACCOUNT

  • CATEGORY

  • TIME

  • ENTITY

  • INTCO

  • CURRENCY

  • DATASRC

Using Data Manager Prompts

In most of the script executions, you need to get user selection and use that value inside the script logic. For this purpose, you can use Data Manager prompts inside the script logic.

Syntax

$DM_PROMPT$...

Example

*XDIM_MEMBERSET P_ACCT= CE0004020, CE0004010

*XDIM_MEMBERSET CATEGORY = ACTUAL

*XDIM_MEMBERSET TIME=2006.SEP

*XDIM_MEMBERSET ENTITY= C9000

*XDIM_MEMBERSET P_ACTIVITY=NONE

*XDIM_MEMBERSET P_DATASRC=UPLOAD

*XDIM_MEMBERSET RPTCURRENCY = LC

// Increase Wage and Salary, and Personnel Expense by entered percentage

[P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100) [P_ACCT].[#CE0004010] = [P_ACCT].[CE0004010] * ( 1 + $EXP_PERCT$ / 100)

The percentage to be increased for the above two accounts is provided by the user.

Note Note

Additional configuration is required in the Data Manager to pass these parameters to script logic. In transaction RSPC in the ABAP layer, the corresponding process chain's BPC:Run Logic step, Process Variant, needs to be maintained with additional parameters like TAB, SUSER, and REPLACEPARAM.

End of the note.

Then, the dynamic script of Data Manager needs to be adjusted to accept the prompts.

PROMPT(SELECTINPUT,,,,"%ENTITY_DIM%,%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%")

PROMPT(TEXT,%WS_PERCT%,"Input W/S Percent in decimals",)

PROMPT(TEXT,%EXP_PERCT%,"Input Exp. Percent in decimals",)

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,TAB,%TAB%)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,EQU,%EQU%)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,SUSER,%USER%)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,SAPPSET,%APPSET%)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,SAPP,%APP%)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,SELECTION,%SELECTION%)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,LOGICFILENAME,TESTING0123.LGF)

TASK(ZBPC_PROT_EXP_RUN_LOGIC,REPLACEPARAM,WS_PERCT%EQU%%WS_PERCT%%TAB%EXP_PERCT%EQU%%EXP_PERCT%)

Note Note

Read the restriction around Validation when DM prompts are used in your script in OSS note 1334695.

End of the note.

Script logic system variables

%USER% - Returns current Planning and Consolidation User

%APPSET% - Returns current Planning and Consolidation AppSet

%APPLICATION% - Returns current Planning and Consolidation Application

%YEAR% - Returns current calendar year

You can use %YEAR% to derive the member values. For example, %YEAR%.TOTAL, and %YEAR%.Q1. You can also use to offset years like %YEAR%(-2).TOTAL.

Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or by its gross negligence.