2008 Aug 08 5:42 AM
hi friends,
how to give comments in selection screen.
kindly give the syntax.
thanks in advance.
2008 Aug 08 6:02 AM
Hi,
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 keyaddition has the same function as for the PARAMETERS statement. You can use it to modify the comment before the selection screen is called.
So 1 - SELECT ION-SCREEN COMMENT: to write a label for a parameter of selection-screen or write a text in selection-screen.
example if you have radio button,text will come right side,if you want to use left side text,then use comment line.
E.g :
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (17) text-023 FOR FIELD p_mpmva1.
PARAMETER: p_mpmva1 TYPE przb-variant .
SELECTION-SCREEN PUSHBUTTON 70(4) but1 USER-COMMAND create.
SELECTION-SCREEN PUSHBUTTON 74(4) but2 USER-COMMAND change.
SELECTION-SCREEN PUSHBUTTON 78(4) but3 USER-COMMAND display.
SELECTION-SCREEN END OF LINE.
Hope this helps you.
thanx,
dhanashri.
2008 Aug 08 5:46 AM
2008 Aug 08 5:46 AM
hi,
Use Comment Statement of selection screen.
SELECTION-SCREEN COMMENT [/]pos(len) comm [FOR FIELD f] [MODIF ID key].
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba7a135c111d1829f0000e829fbfe/content.htm
Regards
Sumit Agarwal
2008 Aug 08 5:47 AM
Hello
Try this
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(15) tptable.
SELECTION-SCREEN END OF LINE.
and in
initialization write this
tptable = 'Comment'.
Thanks
Anirudh Saini
2008 Aug 08 5:48 AM
Hi Bhupi,
Use SELECTION-SCREEN COMMENT.
Check the following:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-001.
PARAMETERS: p1(3) TYPE c,
p2(5) TYPE c.
SELECTION-SCREEN COMMENT 55(10) p_wmunit.
SELECTION-SCREEN END OF LINE.
Regards,
Chandra Sekhar
2008 Aug 08 5:49 AM
Hi,
Selection-screen comment 1(10) text-001 for field f1.
Check this link, you will get details-
http://www.sapnet.ru/abap_docu/ABAPSELECTION-SCREEN_LAYOUT.htm
Regards,
Sujit
2008 Aug 08 6:02 AM
Hi,
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 keyaddition has the same function as for the PARAMETERS statement. You can use it to modify the comment before the selection screen is called.
So 1 - SELECT ION-SCREEN COMMENT: to write a label for a parameter of selection-screen or write a text in selection-screen.
example if you have radio button,text will come right side,if you want to use left side text,then use comment line.
E.g :
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (17) text-023 FOR FIELD p_mpmva1.
PARAMETER: p_mpmva1 TYPE przb-variant .
SELECTION-SCREEN PUSHBUTTON 70(4) but1 USER-COMMAND create.
SELECTION-SCREEN PUSHBUTTON 74(4) but2 USER-COMMAND change.
SELECTION-SCREEN PUSHBUTTON 78(4) but3 USER-COMMAND display.
SELECTION-SCREEN END OF LINE.
Hope this helps you.
thanx,
dhanashri.