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

Disabling input option

Hi, I am new to ABAP and I have a requirement where in I need to display two radio buttons with each radio button accepting one parameter. When the first radio button is chosen, the parameter of second radio button should be disabled. When the second radio button is chosen, the first parameter should be disabled. I have written the following code but it does not seem to be working.Please have a look at it and suggest any modifications required.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS: ODS RADIOBUTTON GROUP radi default 'X' modif id RD1

user-command ucomm.

PARAMETER : p_odc(20) type c modif ID RD1 . "OBLIGATORY .

PARAMETERS: FILE RADIOBUTTON GROUP radi modif ID RD2.

PARAMETER : p_filpth LIKE rlgrap-filename modif id RD2. "OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

AT selection-screen output.

loop at screen.

if ods = 'X'.

if screen-group1 = 'RD1'.

screen-input = 1.

modify screen.

endif.

endif.

endloop.

loop at screen.

if file = 'X'.

if screen-group1 = 'RD2'.

screen-input = '1'.

modify screen.

endif.

endif.

endloop.

Thanks,

-Kiran

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2007 at 03:53 AM

    little better than old one

    REPORT YCHATEST .

    DATA : FLAG(1) value 1,

    FLAG1(1) value 0.

    PARAMETERS : APPLSER RADIOBUTTON GROUP R1 USER-COMMAND R,

    PRESER RADIOBUTTON GROUP R1,

    P_ASER(25) MODIF ID AS,

    P_PSER(25) MODIF ID PS.

    AT SELECTION-SCREEN.

    IF SY-UCOMM = 'R'.

    IF APPLSER = 'X'.

    FLAG = '1'.

    FLAG1 = '0'.

    ELSEIF PRESER = 'X'.

    FLAG = '0'.

    FLAG1 = '1'.

    ENDIF.

    ENDIF.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'AS'.

    SCREEN-INPUT = FLAG.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'PS'.

    SCREEN-INPUT = FLAG1.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    Message was edited by:

    Chandrasekhar Jagarlamudi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2007 at 04:02 AM

    Hi Kiran,

    Try out the below code -

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

    PARAMETERS: ods RADIOBUTTON GROUP radi DEFAULT 'X'

    USER-COMMAND ucomm.

    PARAMETER : p_odc(20) TYPE c MODIF ID rd1 . "OBLIGATORY .

    PARAMETERS: file RADIOBUTTON GROUP radi.

    PARAMETER : p_filpth LIKE rlgrap-filename MODIF ID rd2. "OBLIGATORY.

    SELECTION-SCREEN END OF BLOCK b1.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF ods = 'X'.

    IF screen-group1 = 'RD1'.

    screen-input = 1.

    MODIFY SCREEN.

    ENDIF.

    IF screen-group1 = 'RD2'.

    screen-input = 0.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    ENDLOOP.

    LOOP AT SCREEN.

    IF file = 'X'.

    IF screen-group1 = 'RD2'.

    screen-input = '1'.

    MODIFY SCREEN.

    ENDIF.

    IF screen-group1 = 'RD1'.

    screen-input = '0'.

    MODIFY SCREEN.

    ENDIF.

    ENDIF.

    ENDLOOP.

    Reward points if found useful...!

    Cheers

    Abhishek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2007 at 04:14 AM

    do this...

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'AS'.

    SCREEN-INPUT = FLAG.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'PS'.

    SCREEN-INPUT = FLAG1.

    MODIFY SCREEN.

    ENDIF.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2007 at 04:40 AM

    Hi, the issue has been resolved now. Thanks for your prompt replies.. but now I want to check whether the value entered in parameter 1 exists in a table or not.

    Can you please tell me how to do it? Thanks in advance again..

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 26, 2007 at 05:01 AM

    Hi Kiran,

    What is the parameter and which table do you want to check?

    Can you be more specific ?

    Regards

    Abhishek

    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.