进入! OBLIGATORY 参数中的(感叹号)不能用作输入。为什么?

Entering ! (exclamation sign) in the OBLIGATORY parameter doesn't work as input. Why?

假设我们有以下选择屏幕:

PARAMETERS: d_char OBLIGATORY.

WRITE d_char.

当用户在选择屏幕的这个字段中输入 ! 并运行程序时,它仍然提示需要在此字段中输入。

为什么?

您可以在 Dynpro Fields 的文档中找到答案。

When dynpro fields are received from input fields on the screen, input fields are templates that expect a certain format depending on the data type of the underlying dynpro field. When passed to the dynpro field, the input is converted to a value of the appropriate type. This also means that some characters function as special characters by default.

The "!" character in the initial position of an input field on the screen deletes all characters in the field before the data transport.

The "=" character in the initial position of an input field on the screen initiates a search using search helps.

If an input field contains only blanks and "_" characters, the latter are transported as blanks.

To deactivate the template and also the modifying effect of special characters, the attribute Without Template can be activated in Screen Painter. However, the template cannot be deactivated for selection screens.

将参数定义为 TYPE STRING,您将收到 !以及 = 甚至 space.