Skip to Content

Need to hide the parameter based on radio button

hi friends

I have a requirement that when the person select the radio button based on the radio button selection the parameter should be disabled. Can any one tell me with a sample code.

I have 2 radio button and 4 parameters. if 1st radio button selects the 1st parameter field alone should disable all other field should be enabled.

Regards

vijay

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Oct 01, 2008 at 09:16 AM

    PS:Do not reward for this easy finding information.

    just refer:

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 01, 2008 at 09:16 AM

    hi Vijay,

    pls. have a look at the following sample:

    PARAMETERS : p_rb1 RADIOBUTTON GROUP 1 DEFAULT 'X' USER-COMMAND uc01,
                 p_rb2 RADIOBUTTON GROUP 1,
                 p_1 TYPE bkpf-bukrs MODIF ID 001,
                 p_2 TYPE bkpf-bukrs,
                 p_3 TYPE bkpf-bukrs,
                 p_4 TYPE bkpf-bukrs.
    
    AT SELECTION-SCREEN OUTPUT.
    
      LOOP AT SCREEN.
        CASE 'X'.
          WHEN p_rb1.
            CHECK screen-group1 EQ '001'.
            screen-input = '0'.
          WHEN p_rb2.
            CHECK screen-group1 EQ '001'.
            screen-input = '1'.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.

    hope this helps

    ec

    Add a comment
    10|10000 characters needed characters exceeded

    • hi friends

      I worte the code to disable the parameter field according to the selection. its working fine but below the code is not working.

      This is my code.

      START-OF-SELECTION.

      DATA : BEGIN OF ITAB1 OCCURS 0,

      BEGDA LIKE P0006-BEGDA,

      ENDDA LIKE P0006-ENDDA,

      END OF ITAB1.

      DATA : IT_HR LIKE ZNOC_FVISIT OCCURS 0 WITH HEADER LINE .

      DAT1 = SY-DATUM.

      TIM1 = SY-UZEIT.

      CONCATENATE DAT1+6(2) '.'

      DAT1+4(2) '.'

      DAT1+(4) '_'

      TIM1+(2) ':'

      TIM1+4(2) ':'

      TIM1+2(2) INTO ZKEY .

      AT SELECTION-SCREEN OUTPUT.

      IF NEW = 'X'.

      LOOP AT SCREEN.

      IF SCREEN-NAME = 'ZKEY'.

      SCREEN-INPUT = 0.

      • SCREEN-REQUIRED = 0.

      MODIFY SCREEN.

      • SCREEN-ACTIVE = 1.

      ENDIF.

      ENDLOOP.

      SELECT SINGLE BEGDA ENDDA INTO ITAB1 FROM PA0006 WHERE PERNR = PERNR.

      IT_HR-ZKEY = ZKEY .

      IT_HR-ZPERNR = PERNR .

      IT_HR-ZSYSDATE = SY-DATUM.

      IT_HR-ZBEGDA = ITAB1-BEGDA.

      IT_HR-ZENDDA = ITAB1-ENDDA.

      IT_HR-ZHR_PERNR = P_HPERNR.

      IT_HR-ZDESGINATION = P_DTEXT.

      APPEND IT_HR.

      INSERT INTO ZNOC_FVISIT VALUES IT_HR.

      ENDIF.

      My key field is disabled. But my key does not fetch any values and its does not enter the value on the table. Since my table is based on the key field. No value is getting in the key.

      Regards

      vijay

  • Posted on Oct 10, 2008 at 05:48 AM

    problem sloved by changing the code.

    Regards

    vijay

    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.