Supported by
Supported by Inetum

SELECT-OPTIONS default behavior

images/thumbnail.jpg - Thumbnail

Abapinho received a letter.

Mr. Abapinho,

Everybody knows how to set default values in select options using the DEFAULT keyword. What some people may not know is that one can also set the default option, sign and even if allows for intervals or just fixed values.

Like this:

DATA: s_record TYPE ZDATA.

SELECT-OPTIONS so_code1 FOR s_record-code
                        DEFAULT '20140805'
                        OPTION GE SIGN I.

SELECT-OPTIONS so_code2 FOR s_record-code
                       NO INTERVALS.

A big hug Mr. Abapinho.

Thank you Mr. Sérgio Fraga.

Thank you David Sjunnesson for the photo. Greetings from Abapinho.