User Prompts
User Prompts
User Prompts
This command generates customized dialog boxes. This allows you to query a user for
the following types of information:
When multiple PROMPT commands are entered in the same script, all prompts are
combined into one dialog box. This rule applies to all PROMPT commands that ask for the
selection of a file, a delimiter, or text. This rule does not apply to the COPYMOVE and
SELECT prompts, which are presented to the user individually.
All file selection prompts return the name of the selected file with the complete path. The
system assumes all members for this dimension (the system does not insert a range for
this dimension in the returned SQL statement) in the following cases:
CHECKBOXGROUP
CHECKBOXNO
CHECKBOXYES
CONVERSION
COPYMOVE
COPYMOVEINPUT
DELIMITER
INFILE
INFILES
LOGICFILE
MESSAGE
OUTFILE
RADIOBUTTON
SELECT
SELECTINPUT
Page 1 of 12
Data Manager User Prompts
SELECTIONFILE
TEXT
TRANSFORMATION
This command is used to present the user with a set of check boxes to select or leave
empty.
Note
Example
PROMPT(CHECKBOXGROUP,%CHECKGROUP%,"Text for
CheckBoxGroup",{1,0,1},{"ch1","ch2","ch3"},,)
The CHECKBOXNO prompt command presents the user with a deselected checkbox.
Page 2 of 12
Data Manager User Prompts
The CHECKBOXYES prompt command presents the user with a selected checkbox.
This command is used to prompt the user for a transformation file to use.
Example
PROMPT(CONVERSION,%CONVERSION%,"Text for Conversion:",Excel files
(*.xls), *.xls, All files(*.*),*.*,,Import.xls)
This command is used to prompt the user for a source and destination data range. The
number of members in FROM and TO should be the same.
Page 3 of 12
Data Manager User Prompts
Example
PROMPT(COPYMOVE,%SELECTION%,%TOSELECTION%,"Test for
COPYMOVE",%DIMS%,)
This command prompts the user for two noncalculated data ranges (for copying data, for
example). The number of members in FROM and TO should be the same.
Example
PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Test for
COPYMOVEINPUT",%DIMS%,)
This command is used to prompt the user for a delimiter to be used in the import or
export file. The possible delimiter options are Comma, Tab, or other delimiter.
Page 4 of 12
Data Manager User Prompts
If you are using Planning and Consolidation for the Microsoft platform, you need to
distinguish between the delimiters for input and output. You do this in the Data Manager
Dynamic Script editor by appending a command similar to the following:
TASK(CONVERT data,DELIMITERFORINPUT,%DELIMITER%).
Example
PROMPT(DELIMITER,%DELIMITER%,"Text for delimiter")
The INFILE prompt command supports file names stored on the Application Server and
FTP. The qualified path and file name need to be entered, for example,
\uxcikf1\usr\sap\TEMP\file.csv.
Example
PROMPT(INFILE,%FILE%,"Test for INFILE:",Data files (*.txt), *.txt, All
files(*.*),*.*,)
Page 5 of 12
Data Manager User Prompts
Example
This command is used to prompt the user for a logic file to import.
Example
This command sets the text to be displayed to the user at the time the package is set. The
text is displayed at the top of the dialog box.
Page 6 of 12
Data Manager User Prompts
Example
PROMPT(MESSAGE,"When this package is running, end user functionality
will be affected: Data cannot be sent to the database or incorrect
numbers can be retrieved from the database")
This command is used to prompt the user for the name of the export file.
Example
This command is used to present the user with a radio button control.
[label for choices] and [values for choices] should be a one to one mapping.
The default value can be empty or one of the value in the [values for choices]. If it is
empty, no radio button is checked by default. If it is one of the value in the [values for
choices], the corresponding radio button is checked by default.
Page 7 of 12
Data Manager User Prompts
Example
PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status
settings when importing data.",1,{"Yes, check for work status settings
before importing","No, do not check work status settings"},{"1","0"})
This command is used to prompt the user for a data range (for export, for example).
Example
PROMPT(SELECT,%SELECTION%,,"Select the members to
export","CATEGORY,ENTITY")
This command is used to allow the user to select only noncalculated members (for export,
for example).
Page 8 of 12
Data Manager User Prompts
Activities
%DIMS% is the dimension list in the current application. The value can be ACCOUT,
ENTITY, TIME. %SELECTION% is the result that the user selects in the Run Package
dialog box.
PROMPT(SELECTINPUT,,,,"%DIMS%")
%SELECTION% is the result that the user selects in the Run Package dialog box. The script
can be the following:
PROMPT(SELECTINPUT,%SELECTION%,,,"%DIMS%")
%DIMS% creates the screen, and the selected result is saved in %SELECTION%. Without
%selection%, you use %SELECTION% as the default. Therefore, you can also write the
script as PROMPT(SELECTINPUT,%ANYNAME%,,,"%DIMS%"), then use %ANYNAME% in the
task commands.
Example
If you need only one SELECTINPUT prompt command, create the package script as
follows:
PROMPT(SELECTINPUT,%SOURCEENTITY%,,"Enter Source
Entity","%ENTITY_DIM%")
TASK(/CPMB/ALLOCATION_LOGIC,SELECTION,%SOURCEENTITY%)
If you need more than one SELECTINPUT prompt command, create the package script
as follows:
PROMPT(SELECTINPUT,%SOURCEENTITY%,,"Enter Source
Entity","%ENTITY_DIM%")
PROMPT(SELECTINPUT,%TARGETENTITY%,,"Enter Target
Entity","%ENTITY_DIM%")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/ALLOCATION_LOGIC,TAB,%TAB%)
TASK(/CPMB/ALLOCATION_LOGIC,EQU,%EQU%)
TASK(/CPMB/ALLOCATION_LOGIC,REPLACEPARAM,ASARENT%EQU%%ASARENT%%TAB%SOUR
CE%EQU%%SOURCEENTITY%%TAB
%TARGET%EQU%%TARGETENTITY%)
Page 9 of 12
Data Manager User Prompts
TASK(/CPMB/ALLOCATION_LOGIC,MEMBERSELECTION,SOURCE%EQU%%SOURCEENTITY%%T
AB %TARGET%EQU%%TARGETENTITY%)
INFO(%DIMVALUE%,E=24)
INFO(%SELECTION%,
/APP123/PLANNING/PrivatePublications/I045795/TempFiles/FROM.TMP@@@SAVE@
@@@@@EXPAND@@@|DIMENSION:ENTITY|A1000|DIMENSION:CATEGORY||DIMENSION:TIM
E||)
In the import package, the package_size specifies how large each group is. In the export,
this value is used to specify the group to improve the export performance.
Default
Where Means
Value
TEXT This is the function name. None
Page 10 of 12
Data Manager User Prompts
Example
Example 1
This function shows a text box with the label Application list:. The system validates the
user entry against an application list.
PROMPT(TEXT,%APPLIST%,"Application list:",,"%APP_LIST%")
Example 2
This function shows a text box with the label Dimension list:. The system validates the
user entry against a dimension list.
PROMPT(TEXT,%DIMLIST%,"Dimension list:",,"%DIMS%")
Example 3
This function shows a text box with the label Alphabet list:. The system validates the user
entry against A,B,C,D,E.
PROMPT(TEXT,%AlphabetList%,"Alphabet list:",,"A,B,C,D,E")
Example 4
This function shows a text box with a password value shown in asterisks ( *).
Caution
All parameter values containing the string password, for example, %Password1%,
%password2% or %FtpPassword% are masked in the log. If you use PSD as the parameter
name for passwords, the password values are not masked in the log. For instance, in
PROMPT(TEXT,%PSD%,"Please enter your password",PWD)), the value for the
parameter names %Password1%, %password2%, and %FtpPassword% are masked.
Page 11 of 12
Data Manager User Prompts
Example
PROMPT(TRANSFORMATION,%TRANSFORMATION %,"Text for
Transformation:",Excel files (*.xls), *.xls, All
files(*.*),*.*,,Import.xls)
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.
Page 12 of 12