7 Replies Latest reply: Apr 7, 2010 10:54 AM by rama basa RSS

disable table control field

Murali Krishna
Currently Being Moderated

Hi Experts,

 

                  I have create a module pool program where in there is a table control with some fields. I had a requirement where I need to disable all the tablecontrol fields when I click DISPLAY button. ( Display button ).

 

loop at screen.
 if screen-group1 = 'GR'.
 if sy-ucomm = 'CHANGE'.
 screen-input = 1.
else.
 screen-input = 0.      " when clicked DISPLAY button.
endif.
endif.
endloop.

 

My problem is only menge ( Quantity) field is not disabling.

please provide your suggestions.

 

Thanks and Regards

 

Murali Krishna. T

  • Re: disable table control field
    Niraj Gadre
    Currently Being Moderated

    HI,

     

    Check the screen group of quantity field in the table control  it should be GR only.

    • Re: disable table control field
      Murali Krishna
      Currently Being Moderated

      hi niraj,

       

                   Thanks for your view. quantity field also exist in group 'GR'.  Still problem is arising.

      • Re: disable table control field
        Niraj Gadre
        Currently Being Moderated

        Hi Murali,

         

        In your code i guess the modify screen statement missing. just add the modify screen statement within the loop screen and try

         

        loop at screen.
         if screen-group1 = 'GR'.
         if sy-ucomm = 'CHANGE'.
         screen-input = 1.
        else.
         screen-input = 0.      " when clicked DISPLAY button.
        endif.
        endif.
        modify screen. " add line here
        endloop.

         

        • Re: disable table control field
          Murali Krishna
          Currently Being Moderated

          Hi Niraj,

           

                     I tried with modify screen as you suggested. But no solution.

          Here one thing I need to make clear.  Here Iam using TabStrip. The tabstrip control exits in screen 320. For this I declared a subscreen in the screen 340. Here in 340, the table control is there.

          The push buttons DISPLAY and CHANGE are in screen 320. For these push buttons Iam writing the disable and enable functionality.

           

          I think, If Iam able to identify the tablecontrol field in screen 320, the problem will be solved.

           

          Screen Group ' GR ' is already used for another internal table for screen 320.

          Do I need to use another Screen Group for my table control?

           

          Also please make me clear about    the difference between      screen-group1

                                                                                          screen-group2

                                                                                          screen-group3

                                                                                          screen-group4

          Thanks and regards,

           

           

          Murali Krishna T

  • Re: disable table control field
    rama basa
    Currently Being Moderated

    HAI Murali,

     

    Make some small change in ur code..Make the Active attribute of Screen to 0.

     

    loop at screen.
     if screen-group1 = 'GR'.
     if sy-ucomm = 'CHANGE'.
     screen-input = 1.
    else.
     screen-active = 0.    " Add this line to ur code here
     screen-input = 0.      " when clicked DISPLAY button.
    endif.
    endif.
    endloop.

     

    Best Regards,

    rama

Actions