Application Development 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: 

selection-screen comment.....?`

Former Member
0 Kudos

Hi All,

I need explanation for the following statement

SELECTION-SCREEN COMMENT 1(15) TEXT-001.

What does 1 and 15 mean in the above statement?

Regards

Dnyanesh

6 REPLIES 6

Former Member
0 Kudos

1 IS STSRTING POINT

15- MAX LENGTH OF TEXT

abdul_hakim
Active Contributor
0 Kudos

hi

it is used to write comment on the selection screen.

your statement SELECTION-SCREEN COMMENT 1(15) TEXT-001 starts at position 1 and it can hold 15 characters.

Cheers,

Abdul Hakim

Mark all useful answers..

former_member188685
Active Contributor
0 Kudos

Hi,

<b>1</b> is starting position for the comment,ans maximum of <b>15</b> chars comment it can take .

so you have any problem in generating the selection screen.

Regards

vijay

Former Member
0 Kudos

Hai Go through the following Document

SELECTION-SCREEN COMMENT fmt name.

Additions

1. ... FOR TABLE dbtab

2. ... FOR FIELD f

3. ... MODIF ID mod

4. ... ID id

Effect

Generates a comment on the selection screen. For the name name , there are two options:

name takes the form TEXT-xxx where xxx is a three-character name for a text symbol. In this case, the contents of the text symbol are displayed at runtime, i.e. the text cannot be changed dynamically. name is another eight-character name. Here, you create a field with the name name in the length specified in the format fmt< /> and it is then generated as an output field on the selection screen. The contents of these comments must therefore be set at runtime (e.g. at INITIALIZATION or - in the case of comments in the database include program DBldbSEL - in the routine INIT of the database program SAPDBldb . They can also be changed when the selection screen is being processed.

Note

The field name is generated automatically and so cannot be defined with DATA .

With comments, you must always specify a format fmt (see variant ULINE ).

Note

You must program a new line yourself via the format fmt .

Addition 1

... FOR TABLE dbtab

Note

See variation 3 (SELECTION-SCREEN SKIP).

Addition 2

... FOR FIELD f

Effect

Since the comment is assigned to a parameteror a select-option , the help display shows the documentation of the reference field if this parameter or selection option.

In addition, the comment is suppressed if the reference object was set to 'invisible' via a selection variant.

Note

In database access routines, the comment is generated whenever the reference field is output. Therefore, you should not use the addition FOR TABLE with this variant.

Example

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 10(20) TEXT-001

FOR FIELD PARM.

SELECTION-SCREEN POSITION POS_LOW.

PARAMETERS PARM LIKE SAPLANE-PLANETYPE.

SELECTION-SCREEN END OF LINE.

This code displays a 20-byte long comment followed by the parameter at the normal position ( POS_LOW ) on the same line. If the user presses F1 for both objects, the documentation of SAPLANE-PLANETYPE is displayed.

Addition 3

... MODIF ID mod

Addition 4

... ID id

Thansk & regards

Sreenivasulu P

0 Kudos

1 represents the starting position

and 15 the maximum number of characters.

Former Member
0 Kudos

hi

good

To place comments on the selection screen, you use:

SELECTION-SCREEN COMMENT [/]<pos(len)> <comm> [FOR FIELD <f>]

[MODIF ID <key>].

This statement writes the <comm> comment on the selection screen. For <comm>, you can specify a text symbol or a field name with a maximum length of eight characters. This character field must not be declared with the DATA statement, but is generated automatically with length <len>. The field must be filled before the selection screen is called. You must always specify the <pos(len)> addition. Only if there are several elements in one line, can you omit <pos>.

The text <comm> will be displayed, starting in column <pos>, for a length of <len>. If you do not use a slash (/), the comment is written into the current line; otherwise a new line is created.

You use FOR FIELD <f> to assign a field label to the comment. <f> can be the name of a parameter or a selection criterion. As a result, if the user requests help on the comment on the selection screen, the help text for the assigned field <f> is displayed.

The MODIF ID <key> addition has the same function as for the PARAMETERS statement. You can use it to modify the comment before the selection screen is called.

Example

REPORT DEMO.

SELECTION-SCREEN COMMENT /2(50) TEXT-001 MODIF ID SC1.

SELECTION-SCREEN SKIP 2.

SELECTION-SCREEN COMMENT /10(30) COMM1.

SELECTION-SCREEN ULINE.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1,

R2 RADIOBUTTON GROUP RAD1,

R3 RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN ULINE /1(50).

SELECTION-SCREEN COMMENT /10(30) COMM2.

SELECTION-SCREEN ULINE.

PARAMETERS: S1 RADIOBUTTON GROUP RAD2,

S2 RADIOBUTTON GROUP RAD2,

S3 RADIOBUTTON GROUP RAD2.

SELECTION-SCREEN ULINE /1(50).

INITIALIZATION.

COMM1 ='Radio Button Group 1'.

COMM2 ='Radio Button Group 2'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'.

SCREEN-INTENSIFIED = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

thanks

mrutyun