Skip to Content
author's profile photo Former Member
Former Member

Select options

Can we give "SELECTION-SCREEN COMMENT" for SELECT-OPTIONS. Currently I am using comment option for parameters but i want to use it for select-options also. Can anybody tell me how to use comment option for select-option?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

10 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:21 AM

    my problem is not yet solved. Actually see below code, it works fine with p_bukrs but when i used it for s_amt1 it gives error

    "Error when generating the selection screen "1000" of report"

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    SELECTION-SCREEN SKIP.

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS: p_bukrs LIKE GLT0-BUKRS,

    p_year like glt0-RYEAR.

    SELECTION-SCREEN COMMENT 1(60) TEXT-003 FOR FIELD s_amt1.

    SELECT-OPTIONS: s_amt1 for glt0-TSL01.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN END OF BLOCK b1.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Try as below:

      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
        SELECTION-SCREEN SKIP.
        SELECTION-SCREEN BEGIN OF LINE.
        PARAMETERS: p_bukrs LIKE glt0-bukrs,
                    p_year LIKE glt0-ryear.
        SELECTION-SCREEN END OF LINE.
        SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN COMMENT 1(60) text-003 FOR FIELD s_amt1.
        SELECT-OPTIONS: s_amt1 FOR glt0-tsl01.
        SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK b1.
      

      The problem earlier is you are trying to create two parameters and one select-option in a single line where select-options is having text of length 60, that is more for the selection-screen frame.

      Regards

      Eswar

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:14 AM

    hi

    hope it will help you.

    Pls reward if help.

    REPORT zextest595 .

    *--- Radiobuttons

    PARAMETERS: p_up RADIOBUTTON GROUP a DEFAULT 'X' USER-COMMAND rb,

    p_list RADIOBUTTON GROUP a.

    PARAMETERS: p_pcfile LIKE rlgrap-filename OBLIGATORY DEFAULT 'C:\'

    MODIF ID ccc,

    p_pctype LIKE rlgrap-filetype OBLIGATORY DEFAULT 'ASC'

    MODIF ID ccc,

    p_unix LIKE rlgrap-filename OBLIGATORY DEFAULT '.\'

    MODIF ID ccc.

    PARAMETERS: p_dir LIKE rlgrap-filename OBLIGATORY DEFAULT '.'

    MODIF ID ddd,

    p_fp LIKE rlgrap-filename

    MODIF ID ddd.

    *----


    • AT SELECTION-SCREEN

    *----


    AT SELECTION-SCREEN OUTPUT.

    IF p_up = 'X' .

    LOOP AT SCREEN.

    CASE screen-group1.

    WHEN 'CCC'.

    screen-input = 1. "Enable

    screen-invisible = 0. "Disable

    MODIFY SCREEN.

    WHEN 'DDD'.

    screen-input = 0.

    screen-invisible = 1.

    MODIFY SCREEN.

    ENDCASE.

    ENDLOOP.

    ENDIF.

    IF p_list = 'X'.

    LOOP AT SCREEN.

    CASE screen-group1.

    WHEN 'CCC'.

    screen-input = 0.

    screen-invisible = 1.

    MODIFY SCREEN.

    WHEN 'DDD'.

    screen-input = 1.

    screen-invisible = 0.

    MODIFY SCREEN.

    ENDCASE.

    ENDLOOP.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi

      hope it will also clear your idea.

      DATA PROTOCOL LIKE BTCXPM OCCURS 0 WITH HEADER LINE.

      DATA COMMAND LIKE SXPGCOLIST-NAME.

      DATA PARAM LIKE SXPGCOLIST-PARAMETERS.

      DATA DEST(12).

      SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-008.

      • TEXT-008 : Request_parameters

      SELECT-OPTIONS TRKORR FOR E070-TRKORR.

      SELECT-OPTIONS TRSTATUS FOR E070-TRSTATUS DEFAULT 'R' NO INTERVALS.

      • TRSTATUS - Correction status

      SELECTION-SCREEN END OF BLOCK B1.

      SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME.

      SELECTION-SCREEN BEGIN OF LINE.

      PARAMETERS REPEAT AS CHECKBOX.

      • If REPEAT = 'X' then request REPKORR will be transported once more

      SELECTION-SCREEN COMMENT 3(25) TEXT-012 FOR FIELD REPEAT.

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:16 AM

    Hi

    Hope it will help you.,

    pls reward if help.

    REPORT selscreendef.

    ...

    PARAMETERS par1 ....

    SELECT-OPTIONS sel1 FOR ... .

    ...

    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.

    PARAMETERS par2 ... .

    SELECT-OPTIONS sel2 FOR ... .

    ...

    SELECTION-SCREEN END OF SCREEN 500.

    SELECTION-SCREEN BEGIN OF SCREEN 600 TITLE text-100.

    SELECTION-SCREEN INCLUDE: PARAMETERS par1,

    SELECT-OPTIONS sel1.

    PARAMETERS par3 ... .

    SELECT-OPTIONS sel3 ... .

    ...

    SELECTION-SCREEN END OF SCREEN 600.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:17 AM

    hi

    hope it will help you.

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:17 AM

    Yes we can do it for Select Options as well.

    It is the same procedure as for Parameters.

    Refer to below example for some idea:

    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT (10) text-010 FOR FIELD so_date.
      SELECT-OPTIONS: so_date FOR sy-datum.
    SELECTION-SCREEN END OF LINE.
    

    Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:18 AM

    hI

    YOU CAN USE LIKE THIS OR

    IN SE38 EDITOR

    GOTO -> TEXT ELEMENTS -> SELECTION TEXTS

    GO TO THIS PLACE AND DECLARE WHAT DO YOU WANT FOR YOU SELECT-OPTION AND ACTIVATE AND COME BACK

    OR

    SELECTION-SCREEN BEGIN OF LINE.

    PARAMETERS : R2 RADIOBUTTON GROUP G1.

    SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.

    SELECTION-SCREEN END OF LINE.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2008 at 05:23 AM

    Hi Santhosh,

    Yes, u can use comment for select-options also. Instead of using paramter use select-options in that place .

    check this standard program.

    report demo_sel_screen_select_comment

    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.

    <b>select-options: budat for sy-datum</b>.

    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 ='Auswahlknopfgruppe 1'.

    comm2 ='Auswahlknopfgruppe 2'.

    loop at screen.

    if screen-group1 = 'SC1'.

    screen-intensified = '1'.

    modify screen.

    endif.

    endloop.

    i have added select-options BUDAT in that.

    hope this will help u.

    <b>reward if useful</b>

    Regards,

    sunil kairam.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:27 AM

    Hi,

    One can use selection-screen with comments,

    Try out the following syntax,

    Copy paste activate and test the code..

    TYPES: BEGIN OF T_T001,

    BUKRS TYPE BUKRS,

    BUTXT TYPE BUTXT,

    END OF T_T001.

    DATA: it_t001 TYPE STANDARD TABLE OF t_t001.

    DATA: WA_T001 TYPE T_T001.

    SELECTION-SCREEN BEGIN OF BLOCK b1.

    SELECTION-SCREEN BEGIN OF LINE.

    SELECTION-SCREEN POSITION POS_LOW.

    SELECT-OPTIONS: p_open FOR wa_t001-bukrs.

    SELECTION-SCREEN COMMENT 1(5) text-001 FOR FIELD p_open.

    SELECTION-SCREEN POSITION POS_HIGH.

    SELECTION-SCREEN COMMENT 7(5) text-002 FOR FIELD p_open.

    selection-screen position 30.

    PARAMETERS: def AS CHECKBOX.

    SELECTION-SCREEN COMMENT 19(5) TEXT-005 FOR FIELD def.

    SELECTION-SCREEN END OF LINE.

    SELECTION-SCREEN END OF BLOCK b1.

    Note: here, Text-001 = ebeln.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 05:31 AM

    REPORT ytest_data.

    tables: kna1.

    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    SELECTION-SCREEN: BEGIN OF LINE.

    SELECTION-SCREEN: COMMENT 5(10) text-004 FOR FIELD s_kunnr.

    • Presentation server

    select-options:

    s_kunnr for kna1-kunnr.

    SELECTION-SCREEN: END OF LINE.

    SELECTION-SCREEN: END OF BLOCK b1.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2008 at 05:41 AM

    Hi Santosh,

    check this,

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    SELECTION-SCREEN SKIP.

    PARAMETERS: p_bukrs LIKE GLT0-BUKRS,

    p_year like glt0-RYEAR.

    selection-screen uline /1(50).

    selection-screen skip.

    .

    SELECT-OPTIONS: s_amt1 for glt0-TSL01.

    selection-screen skip.

    SELECTION-SCREEN COMMENT 1(10) TEXT-003 FOR FIELD s_amt1.

    SELECTION-SCREEN END OF BLOCK b1.

    regards,

    sunil kairam.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.