Start of Content Area

Enabling Fields for Input  Locate the document in its SAP Library structure

You can make output fields in lists input-enabled. The user can change these fields on the screen. The changes can then be printed, or you use the READ LINE statement from the interactive list processing to process the changes (see Interactive Lists). If you make the contents of variables input-enabled in the output list, the changes the user enters do not affect the variables themselves.

To make output fields input-enabled from within the program, use the FORMAT statement as follows:

Syntax

FORMAT INPUT [ON|OFF].

To make output fields input-enabled at runtime, use:

Syntax

FORMAT INPUT = i.

Use the ON option (or i unequal to zero) to format subsequent output as input-enabled fields. Input-enabled fields have different background and foreground colors than the remainder of the list. For input fields, the options COLOR, INVERSE, and HOTSPOT have no effects. The INTENSIFIED option changes the foreground color of the input fields.

You can make horizontal lines input-enabled by formatting them as input fields. However, blank lines you created using SKIP cannot accept input.

Example

REPORT demo_list_format_input.

WRITE   'Please fill in your name before printing:'.

WRITE / '   Enter name here    ' INPUT ON.
ULINE.

WRITE 'You can overwrite the following line:'.

FORMAT INPUT ON INTENSIFIED OFF.
ULINE.
FORMAT INPUT OFF INTENSIFIED ON.

In this program, a WRITE statement directly receives the INPUT ON format and an underline is formatted using the FORMAT statement. The header is defined as a text element. The output appears as follows:

This graphic is explained in the accompanying text

Due to INTENSIFIED OFF, the foreground color of the second input field differs from that of the first. The user can fill the input fields on the screen, for example:

This graphic is explained in the accompanying text

 

 

 

End of Content Area