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

Radio Button with Icon Light and Text

Hi,

By using below program i can able to display Icon light for Radio button. But, i want text also for this Radio button in right side.(Currently Icon light is displaying at Left side then radio button after that i want

to display Text for that radio button?) .Could you please help me in this Regard?

TYPE-POOLS icon.
SELECTION-SCREEN BEGIN OF BLOCK b1 .
SELECTION-SCREEN BEGIN OF LINE.        
SELECTION-SCREEN COMMENT 2(5) text_001.
PARAMETER : r_pa TYPE c RADIOBUTTON GROUP gr1 USER-COMMAND mode.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(5) text_002.
PARAMETER : r_pa1 TYPE c RADIOBUTTON GROUP gr1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.  
SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
  IF r_pa = 'X'.
    WRITE icon_green_light AS ICON TO text_001.
    WRITE icon_red_light   AS ICON TO text_002.
    MODIFY SCREEN.
  ELSE.
    WRITE icon_red_light   AS ICON TO text_001.
    WRITE icon_green_light AS ICON TO text_002.
    MODIFY SCREEN.
  ENDIF.
ENDLOOP.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 07:42 AM

    Hi Venkat,

    Give it like below,

    "Radio Button 1
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) text_001.
    PARAMETER : r_pa TYPE c RADIOBUTTON GROUP gr1 USER-COMMAND mode.
    SELECTION-SCREEN COMMENT 10(10) text-001."<=Your text symbol
    SELECTION-SCREEN END OF LINE.
    "Radio Button 2
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) text_002.
    PARAMETER : r_pa1 TYPE c RADIOBUTTON GROUP gr1 DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 10(10) text-002."<=Your text symbol
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b1.

    Refer ABAP Help for clear knowledge of all these.

    Regards,

    Manoj Kumar P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 02:47 PM

    Hi,

    You can try this,

    SELECTION-SCREEN BEGIN OF BLOCK b1 .
    SELECTION-SCREEN BEGIN OF LINE. "<= insert this
    SELECTION-SCREEN COMMENT 1(5) text_001.
    "Here change it
    SELECTION-SCREEN COMMENT 10(10) text-001."<=Your text symbol
    
    PARAMETER : r_pa TYPE c RADIOBUTTON GROUP gr1 USER-COMMAND mode.
    SELECTION-SCREEN COMMENT 30(5) text_002.
    PARAMETER : r_pa1 TYPE c RADIOBUTTON GROUP gr1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE."<= insert this
    SELECTION-SCREEN END OF BLOCK b1.

    Regards,

    Manoj Kumar P

    Add a comment
    10|10000 characters needed characters exceeded

    • hi,

      SELECTION-SCREEN BEGIN OF BLOCK b1 .
      SELECTION-SCREEN BEGIN OF LINE. 
      SELECTION-SCREEN COMMENT 1(5) text_001.
      SELECTION-SCREEN COMMENT 10(10) text-001."<=Your text symbol
      PARAMETER : r_pa TYPE c RADIOBUTTON GROUP gr1 USER-COMMAND mode.
      "Here change it
      SELECTION-SCREEN END OF LINE."<= insert this
      SELECTION-SCREEN BEGIN OF LINE. "<= insert this
      SELECTION-SCREEN COMMENT 30(5) text_002.
      PARAMETER : r_pa1 TYPE c RADIOBUTTON GROUP gr1 DEFAULT 'X'.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK b1.

      Thanks & Regards

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 03:00 PM

    Hi,

    Try it this way,

    SELECTION-SCREEN BEGIN OF BLOCK b1 .
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(5) text_001.
    SELECTION-SCREEN COMMENT 10(10) text-001."<=Your text symbol
    PARAMETER : r_pa TYPE c RADIOBUTTON GROUP gr1 USER-COMMAND mode.
    SELECTION-SCREEN END OF LINE. "<=Put thi here above 2nd radio button

    Regards,

    Manoj Kumar P

    Add a comment
    10|10000 characters needed characters exceeded

    • hi

      Do F1 on Seletion-screen .

      SELECTION-SCREEN BEGIN OF BLOCK b1 .
      SELECTION-SCREEN BEGIN OF LINE. 
      SELECTION-SCREEN COMMENT 1(5) text_001.
      PARAMETER : r_pa TYPE c RADIOBUTTON GROUP gr1 USER-COMMAND mode.
      "Here change it
      SELECTION-SCREEN COMMENT 10(10) text-001."<=Your text symbol
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT 1(5) text_002.
      PARAMETER : r_pa1 TYPE c RADIOBUTTON GROUP gr1 DEFAULT 'X'.
      SELECTION-SCREEN COMMENT 10(10) text-002."<=Your text symbol
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN END OF BLOCK b1.

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.