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

Disabling Check Box

HI Experts,

I have Selection screen where in 1st Block I have 3 Radio Button & respective input fields. In 2nd Block I have 2 Radio button & Respective Check Boxes. I used Loop At Screen for Disabling Input Fields in 1st Block whose Radio Button is not clicked. I need to do the same Functionality for 2nd Block so that I can Disable Check Box whose Radio Button is not Clicked.

I have allready writen USER-COMMAND ABC in 1sr Block.

And it wont allow me to write another USER-COMMAND for 2nd block. What Would I Do.

Plz Help. Urgent.

Thanks.

Khan.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:58 AM

    ITS SIMPLE U JUST NEED TO ASSIGN SEPARATE GROUP TO YOUR CHECKBOX BY MODIF-ID.

    then oyu can change attributes to this group using

    loop at screen

    plz reward if useful

    keep rockin

    vivek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:59 AM

    Hi,

    Refer to the following code:

    selection-screen begin of screen 100 title title.

    selection-screen begin of block b1 with frame title text-t01.

    parameter:rad1 radiobutton group rad user-command frad1 default 'X',

    rad2 radiobutton group rad .

    selection-screen end of block b1.

    selection-screen begin of block b2 with frame title text-t02.

    parameter: mtr as checkbox modif id g3 user-command chk1,

    p_matnr type eban-matnr modif id g1,

    sloc as checkbox modif id g3 user-command chk2,

    str_loc type eban-lgort modif id g4.

    selection-screen end of block b2.

    selection-screen begin of block b3 with frame title text-t03.

    select-options: matnr1 for eban-matnr modif id g2.

    selection-screen end of block b3.

    selection-screen pushbutton /20(10) name user-command ucom.

    selection-screen end of screen 100.

    name = 'FETCH'.

    title = 'Test Report'.

    call selection-screen '100'.

    type-pools slis.

    • declaration of internal tables and work areas to be used

    data: begin of it_pr occurs 0,

    banfn type eban-banfn,

    bnfpo type eban-bnfpo,

    loekz type eban-loekz,

    statu type eban-statu,

    ekgrp type eban-ekgrp,

    matnr type eban-matnr,

    werks type eban-werks,

    lgort type eban-lgort,

    preis type eban-preis,

    peinh type eban-peinh,

    end of it_pr.

    data: begin of it_mat occurs 0,

    matnr type eban-matnr,

    end of it_mat.

    *DATA:BEGIN OF ITAB1 OCCURS 0,

    data: l_answer.

    data: it_fieldcat type slis_t_fieldcat_alv,

    wa_fieldcat like line of it_fieldcat,

    it_event type slis_t_event,

    wa_event type slis_alv_event.

    • declaration of variables to be used

    data: r_ucomm type sy-ucomm,

    mat_no type eban-matnr,

    len type i value 1,

    count type i value is initial,

    iflag type i value is initial,

    iflag1 type i value 0.

    data :pr_id type sy-repid,

    rt_extab type slis_t_extab.

    at selection-screen output.

    if rad1 = 'X'.

    loop at screen.

    if screen-group1 = 'G1' or screen-group1 = 'G4'.

    screen-active = '1'.

    screen-input = 0.

    elseif screen-group1 = 'G2'.

    screen-active = '0'.

    endif.

    modify screen.

    endloop.

    elseif rad2 = 'X'.

    loop at screen.

    if screen-group1 = 'G1' or screen-group1 = 'G4' or screen-group1 = 'G3' or screen-group1 = 'G5'.

    screen-active = '0'.

    elseif screen-group1 = 'G2'.

    screen-active = '1'.

    endif.

    modify screen.

    endloop.

    endif.

    if mtr = 'X'.

    loop at screen.

    if screen-group1 = 'G1'.

    screen-input = 1 .

    endif.

    modify screen.

    endloop.

    endif.

    if sloc = 'X'.

    loop at screen.

    if screen-group1 = 'G4'.

    screen-input = 1 .

    endif.

    modify screen.

    endloop.

    endif.

    clear sy-ucomm.

    This will surely sort your prob

    Regards

    Gaurav

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 12:00 PM

    HI,

    Have you taken 2 separate User groups for radio buttons, 1 for block one radio button and 2 for block 2 radio buttons. If not try to do like that.

    Rgds,

    Bujji

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi , i HAVE DEFINED DIFFRENT gROUPS.....BELOW IS MY CODE.

      *****************************************

      SELECTION-SCREEN : BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-001.

      SELECTION-SCREEN BEGIN OF LINE.

      PARAMETER : CHECK1 RADIOBUTTON GROUP RAD1 DEFAULT 'X' USER-COMMAND ABC.

      SELECTION-SCREEN COMMENT 3(26) TEXT-015.

      SELECT-OPTIONS : S_WERKS FOR VBRP-WERKS MODIF ID PL.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN BEGIN OF LINE.

      PARAMETER : CHECK2 RADIOBUTTON GROUP RAD1.

      SELECTION-SCREEN COMMENT 3(26) TEXT-011.

      SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR MODIF ID CU.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN BEGIN OF LINE.

      PARAMETER : CHECK3 RADIOBUTTON GROUP RAD1.

      SELECTION-SCREEN COMMENT 3(26) TEXT-012.

      SELECT-OPTIONS : S_KUNNSO FOR KNA1-KUNNR MODIF ID SO.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN : END OF BLOCK B3.

      SELECTION-SCREEN : BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-002.

      parameters : RB_ALL radiobutton group rb default 'X'.

      SELECTION-SCREEN BEGIN OF LINE.

      parameters : RB_VAT radiobutton group rb .

      SELECTION-SCREEN: COMMENT 3(10) TEXT-003.

      parameters : CK_VAT AS CHECKBOX MODIF ID VAT.

      SELECTION-SCREEN: COMMENT 18(16) TEXT-004.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN BEGIN OF LINE.

      parameters : RB_CST radiobutton group rb.

      SELECTION-SCREEN: COMMENT 3(10) TEXT-005.

      parameters : CK_CST AS CHECKBOX MODIF ID CST.

      SELECTION-SCREEN: COMMENT 18(16) TEXT-006.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN BEGIN OF LINE.

      parameters : RB_LST radiobutton group rb.

      SELECTION-SCREEN: COMMENT 3(10) TEXT-007.

      parameters : CK_LST AS CHECKBOX MODIF ID LST.

      SELECTION-SCREEN: COMMENT 18(16) TEXT-008.

      SELECTION-SCREEN END OF LINE.

      SELECTION-SCREEN : END OF BLOCK B4.

      *******************************

      pLZ HELP. uRGENT.

      kHAN

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 12:22 PM

    SELF SOLVED

    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.