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

Radiobutton

Hi Experts,

I have a doubt on radiobutton display and activation.

I have two radiobutton groups.

PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a,

p_date TYPE c RADIOBUTTON GROUP a.

PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b,

p_appl TYPE c RADIOBUTTON GROUP b.

I want.... if the user selects p_file1 then only radiobutton group b should get active/enabled.

If the user selects p_date radiobutton then the radiobutton group b should get disabled/inactive.

I was trying with loop at screen but its not working. May be I am missing out on something.

Please help.

Regards,

Sangeeta.

Points will be awarded generously for correct answer.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jan 29, 2008 at 07:32 AM

    hi Sangeeta,

    that's the way to do:

    PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'

    USER-COMMAND uc01,

    p_date TYPE c RADIOBUTTON GROUP a.

    PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,

    p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF screen-group1 EQ '001'.

    IF p_file1 EQ 'X'.

    screen-active = '1'.

    ELSE.

    screen-active = '0'.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    hope this helps

    ec

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 07:27 AM

    Hi Sangeetha,

    Could you please specify the part of code where you are looping at the screen.

    Regards,

    Kiran

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 07:34 AM

    sangeeta,

    see the code.

    PARAMETERS : p_file1 RADIOBUTTON GROUP

    radi USER-COMMAND radio,

    p_date RADIOBUTTON GROUP radi DEFAULT 'X'.

    PARAMETERS: p_pres TYPE c RADIOBUTTON

    GROUP b MODIF ID mod,

    p_appl TYPE c RADIOBUTTON GROUP b

    MODIF ID mod.

    AT SELECTION-SCREEN OUTPUT.

    IF p_file1 eq 'X'.

    LOOP AT SCREEN.

    IF screen-group1 EQ 'MOD'.

    screen-active = 1.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    ELSE.

    IF screen-group1 EQ 'MOD'.

    screen-active = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    Now it will work.

    Don't forget to reward if useful.....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 07:41 AM

    PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'

    p_date TYPE c RADIOBUTTON GROUP a.

    PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID id1,

    p_appl TYPE c RADIOBUTTON GROUP b MODIF ID id1.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF screen-group1 EQ 'id1'.

    IF p_file1 EQ 'X'.

    screen-active = '1'.

    ELSE.

    screen-active = '0'.

    ENDIF.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    modify screen command modify the screen at event selection-screen output according to the need

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 08:05 AM

    Hi Sangeeta,

    u are missing USER-COMMAND OPTIONS IN RADIO BUTTONS.See the below syntax..

    PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a user-command c1,

    p_date TYPE c RADIOBUTTON GROUP a.

    PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b user-command c2,

    p_appl TYPE c RADIOBUTTON GROUP b.

    Try this logic ok..

    if screen-name = 'P_FILE'.

    loop at screen.

    if screen-name = 'P_PRES'.

    screen-input = 1.

    endif.

    if screen-name = 'P_APPL'.

    screen-input = 0.

    endif.

    modify screen.

    endif.

    if screen-name = 'P_DATE'.

    loop at screen.

    if screen-name = 'P_PRES'.

    screen-input = 0.

    endif.

    if screen-name = 'P_APPL'.

    screen-input = 1.

    endif.

    modify screen.

    endif.

    Reward points if helpful

    Kiran Kumar.G.A

    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.