Entering content frame

Displaying Field Contents as Checkboxes Locate the document in its SAP Library structure

You can output the first character of a field as a checkbox on the output screen by using the following syntax:



If the first character of field f is an "X", the checkbox is displayed filled. If the first character is space , the checkbox is displayed blank.

In other words, the user can fill or clear them with a mouse click. For information on how you can check if output fields are ready for input or not, see Enabling Fields for Input.

 Fields that are ready for input are an essential component of interactive lists that allow a dialog with the user (see Interactive Lists.


DATA: flag1(1) TYPE c    VALUE ' ',
      flag2(1) TYPE c    VALUE 'X',
      flag3(5) TYPE c    VALUE 'Xenon'.

WRITE: / 'Flag 1 ', flag1  AS CHECKBOX,
       / 'Flag 2 ', flag2  AS CHECKBOX,
       / 'Flag 3 ', flag3  AS CHECKBOX.

This produces the following output list:

This graphic is explained in the accompanying text

The checkbox fields for flag2 und flag3 are filled because their first position is "X". The user can change the contents of the checkboxes with a mouse click.



Leaving content frame