Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SELECTION-SCREEN COMMENT does not work as documented?

KjetilKilhavn
Active Contributor
0 Likes
1,037

I have a selection screen where I wanted to add a changeable comment, and now the text for the parameter is not displayed.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: p_tstrun TYPE z_onep_dev_bts_testrun DEFAULT gc_xfeld_true AS CHECKBOX USER-COMMAND p_commit.

SELECTION-SCREEN COMMENT (25) text-tst FOR FIELD p_tstrun.

SELECTION-SCREEN POSITION POS_LOW.

SELECTION-SCREEN COMMENT (75) c_logcmt FOR FIELD p_logobj.

SELECTION-SCREEN END OF LINE.

According to the documentation this should work just fine (I have tried replacing text-tst with text-999), but the text from text-tst is not displayed, only the text from c_logcmt. However, if I use a variable name, e.g. c_tstrun, instead of text-tst and initialise this variable with text-tst the text is displayed as expected.

Has anyone else experienced this?

I looked for relevant OSS Notes, but could not find any. I haven't reported it either (yet...).


Kjetil Kilhavn (Vettug AS) - ABAP developer since Feb 2000, but will probably never be a Rockstar developer
1 REPLY 1
Read only

KjetilKilhavn
Active Contributor
0 Likes
551

I could have edited, but I chose to reply to my own message.

My selection screen is not as simple as the excerpt above seems. For reasons which are not important here, the screen is defined as a subscreen 0000 with elements included in subscreens 0100 and 0200, and the main selection screen displaying either 0100 or 0200 in addition to a block of common criteria.

Turns out that the behaviour can be re-produced by using the INCLUDE BLOCK statement directly in the main selection screen as well.

SELECTION-SCREEN BEGIN OF SCREEN 0000

                          AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b_other

                          WITH FRAME TITLE text-s99.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: p_tstrun TYPE z_onep_dev_bts_testrun DEFAULT c_true AS CHECKBOX USER-COMMAND p_commit.

SELECTION-SCREEN COMMENT (25) text-tst FOR FIELD p_tstrun.

SELECTION-SCREEN POSITION POS_LOW.

SELECTION-SCREEN COMMENT (75) c_logcmt FOR FIELD p_logobj.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b_other.

SELECTION-SCREEN END OF SCREEN 0000.

* Standard selection screen (1000)

SELECTION-SCREEN INCLUDE BLOCKS b_other.


Kjetil Kilhavn (Vettug AS) - ABAP developer since Feb 2000, but will probably never be a Rockstar developer