Show TOC

Function documentationTEXT Prompt() Command Locate this document in the navigation structure

 

This command is used to display a text message to the user.

Syntax: PROMPT(TEXT, [variable], [label], [PWD], [VALIDATE LIST])

Where

Means

Default Value

TEXT

This is the function name.

None

[variable]

The name of the returned variable

%TEXT%

[label]

The text to display to the user

None

[PWD]

Use this variable when you want to display the password as asterisks (*****) in the text box.

None

[VALIDATE LIST]

This parameter contains a list of items used to validate the input text. The delimiter must be a comma, and the list must close with a double quotation.

None

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 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.

End of the caution.

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.