Data Manager User Prompts
User Prompts
This command generates customized dialog boxes. This allows you to query a user for
the following types of information:
The file to load
The data to export
The target application for the selected data
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:
In a SELECT prompt, the user leaves any field blank
For a given dimension in a COPYMOVE prompt, both the source and destination
fields are blank
The syntax for the PROMPT command is:
PROMPT([prompt type], [variable name], [second variable name],
[parameters,])
The currently supported types of PROMPT commands are:
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
CHECKBOXGROUP Prompt() Command
This command is used to present the user with a set of check boxes to select or leave
empty.
Syntax: PROMPT (CHECKBOX, [variable],[label],[default values],[label for
check items])
Parameter Description Default Value
CHECKBOXGROUP A set of check boxes n/a
[variable] The name of the returned variable %CHECKBOX%
[label] The text to display to the user Please select.
The text of checkboxes to display to the
[label for check items]
user
[default value for check
The default value of the checkboxes
items]
The default value can be 0 (unchecked by default) or 1 (checked by default).
Note
Separate multiple values with commas.
Example
PROMPT(CHECKBOXGROUP,%CHECKGROUP%,"Text for
CheckBoxGroup",{1,0,1},{"ch1","ch2","ch3"},,)
CHECKBOXNO Prompt() Command
The CHECKBOXNO prompt command presents the user with a deselected checkbox.
CHECKBOXYES Prompt() Command
Page 2 of 12
Data Manager User Prompts
The CHECKBOXYES prompt command presents the user with a selected checkbox.
CONVERSION Prompt() Command
This command is used to prompt the user for a transformation file to use.
Syntax: PROMPT(CONVERSION, [variable], [label], [mask], [path])
Where Means Default Value
CONVERSION Select an existing DATA file. n/a
[variable] The name of the returned variable %CONVERSION%
[label] The text to display to the user. Please select a transformation file.
[mask] The types of files to select. Data files (*.txt), *.txt, All files(*.*),*.*
[path] The search path. The transformation files directory.
Example
PROMPT(CONVERSION,%CONVERSION%,"Text for Conversion:",Excel files
(*.xls), *.xls, All files(*.*),*.*,,[Link])
COPYMOVE Prompt() Command
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.
Syntax: PROMPT(COPYMOVE, [variable], [second variable], [label],
[dimensions])
Where Means Default Value
COPYMOVE Select two data ranges. n/a
[variable] The name of the returned variable. %SELECTION%
[second The name of the second returned %TOSELECTION%
variable] variable.
[label] The text to display to the user. Enter your selection
Category, Time,
[dimensions] The dimensions to select from. Entity
Page 3 of 12
Data Manager User Prompts
Example
PROMPT(COPYMOVE,%SELECTION%,%TOSELECTION%,"Test for
COPYMOVE",%DIMS%,)
COPYMOVEINPUT Prompt() Command
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.
Syntax: PROMPT(COPYMOVEINPUT, [variable], [second variable], [label],
[dimensions])
Where Means Default Value
Select noncalculated data
COPYMOVEINPUT n/a
ranges.
[variable]
The name of the returned %SELECTION%
variable
[second The name of the second %TOSELECTION%
variable] returned variable
The text to display to the
[label] Please select a file..
user.
Category, Time, Entity
[dimensions]
The dimensions to select
from %DIMS% is the dimension list in
current application.
Example
PROMPT(COPYMOVEINPUT,%SELECTION%,%TOSELECTION%,"Test for
COPYMOVEINPUT",%DIMS%,)
DELIMITER Prompt() Command
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.
Syntax: PROMPT(DELIMITER, [variable], [label])
Page 4 of 12
Data Manager User Prompts
Where Means Default Value
DELIMITER The data delimiter n/a
[variable] The name of the returned variable %DELIMITER%
[label] The text to display to the user Please select a delimiter.
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")
INFILE Prompt() Command
This command is used to prompt the user for a file to import.
Syntax: PROMPT(INFILE, [variable], [label], [mask])
Where Means Default Value
INFILE One or more data files n/a
[variable] The name of the returned variable %FILE%
[label] The text to display to the user Please select a file.
[mask]
The file types to display in the selected Data files (*.txt), *.txt, All
folder files(*.*),*.*
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\[Link].
Example
PROMPT(INFILE,%FILE%,"Test for INFILE:",Data files (*.txt), *.txt, All
files(*.*),*.*,)
INFILES Prompt() Command
Page 5 of 12
Data Manager User Prompts
This command is used to prompt the user for a file to import.
Syntax: PROMPT(INFILEs, [variable], [label], [mask])
Where Means Default Value
INFILES One or more DATA files n/a
[variable] The name of the returned variable %FILE%
[label] The text to display to the user Please select a file.
[mask] The file types to display in the selected folder *.*
Example
PROMPT(INFILES,%FILE%,"Test for INFILES:", All files(*.*),*.*,)
LOGICFILE Prompt() Command
This command is used to prompt the user for a logic file to import.
Syntax: PROMPT(LOGICFILE, [variable],[label],[mask])
Where Means Default Value
LOGICFILE One or more logic files n/a
[variable] The name of the returned variable %LOGICFILE%
[label] The text to display to the user Please select a file.
[mask] The file types to display in the selected folder *.lgx, *.lgf
Example
PROMPT(LOGICFILE,%LOGICFILE%,"Test for LOGICFILE:", Logic
files(*.lgx),*.lgx,)
MESSAGE Prompt() Command
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.
Syntax: PROMPT(MESSAGE, [content])
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")
OUTFILE Prompt() Command
This command is used to prompt the user for the name of the export file.
Syntax: PROMPT(OUTFILE, [variable], [label], [mask],)
Where Means Default Value
OUTFILE An existing DATA file. n/a
[variable] The name of the returned variable %FILE%
[label] The text to display to the user Please select a file.
[mask]
The file types to display in the selected Data files (*.txt), *.txt,All
folder files(*.*),*.*
Example
PROMPT(OUTFILE,%FILE%,"Test for OUTFILE:",Data files (*.txt), *.txt,
All files(*.*),*.*,)
RADIOBUTTON Prompt() Command
This command is used to present the user with a radio button control.
Syntax: PROMPT(RADIOBUTTON, [variable],[label],[default value],[label for
choices],[values for choices])
Separate multiple values with commas.
[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"})
SELECT Prompt() Command
This command is used to prompt the user for a data range (for export, for example).
Syntax: PROMPT(SELECT, [variable], [second variable], [label],
[dimensions])
Where Means Default Value
SELECT Select one data range. n/a
[variable] The name of the returned variable %SELECTION%
[label] The text to display to the user Enter your selection
[dimensions] The dimensions from which to select members Category, Time, Entity
Example
PROMPT(SELECT,%SELECTION%,,"Select the members to
export","CATEGORY,ENTITY")
SELECTINPUT Prompt() Command
This command is used to allow the user to select only noncalculated members (for export,
for example).
Syntax: PROMPT(SELECTINPUT, [variable], [second variable], [label],
[dimensions])
Where Means Default Value
SELECTINPUT Select one noncalculated data range n/a
[variable] The name of the returned variable %SELECTION%
[label] The text to display to the user. Enter your selection
[dimensions] The dimensions from which to select members Category, Time, Entity
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%)
You can hardcode the selection using INFO commands, as follows:
INFO(%DIMVALUE%,E=24)
INFO(%SELECTION%,
/APP123/PLANNING/PrivatePublications/I045795/TempFiles/[Link]@@@SAVE@
@@@@@EXPAND@@@|DIMENSION:ENTITY|A1000|DIMENSION:CATEGORY||DIMENSION:TIM
E||)
INFO(%DIMVALUE%,E=24) means that 24 different entity members are selected in a group.
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.
SELECTIONFILE Prompt() Command
This command is used to prompt the user for a file to import.
Syntax: PROMPT(SELECTIONFILE, [variable], [label], [mask], [path])
Where Means Default Value
SELECTIONFILE Select existing DATA files n/a
[variable] The name of the returned variable %SELECTIONFILE%
[label] The text to display to the user Please select a selection file
[mask] The types of file to select Selection files (*esf), .*.esf
[path] The search path The selection files directory
TEXT Prompt() Command
This command is used to display a text message to the user.
Syntax: PROMPT(TEXT, [variable], [label], [PWD], [VALIDATE LIST])
Default
Where Means
Value
TEXT This is the function name. None
Page 10 of 12
Data Manager User Prompts
[variable] The name of the returned variable %TEXT%
[label] The text to display to the user None
Use this variable when you want to display the password as
[PWD] None
asterisks (*****) in the text box.
This parameter contains a list of items used to validate the
[VALIDATE
LIST] input text. The delimiter must be a comma, and the list must None
close with a double quotation.
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 ( *).
PROMPT(TEXT,%Password%,"Please enter your password",PWD)
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
TRANSFORMATION Prompt() Command
This command is used to prompt the user for a transformation file.
Syntax: PROMPT(TRANSFORMATION, [variable], [label], [mask],,[default file
name])
Where Means Default Value
TRANSFORMATION Select an existing DATA file. n/a
[variable] The name of the returned variable %TRANSFORMATION%
Please select a transformation
[label] The text to display to the user
file.
Excel files (*.xls), *.xls
[mask]
The file types to display in the
selected folder
All files(*.*),*.*
[default file
name] The default file name [Link].
Example
PROMPT(TRANSFORMATION,%TRANSFORMATION %,"Text for
Transformation:",Excel files (*.xls), *.xls, All
files(*.*),*.*,,[Link])
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