hai I have screen filter at selection screen like this

SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME.
parameters s_werks like resb-werks default 'X' .

SELECT-OPTIONS:

  s_aufnr FOR in_param-aufnr,
  s_matnr FOR in_param-matnr,
  s_bldat FOR in_param-bldat.
SELECTION-SCREEN END OF BLOCK a.

and I want to disable just textbox/parameters (s_werks) but not parameter for select-option.

I want to disable it because it'll be exact value which is filled from table depends on the sy-uname :)

how can I deal with it?

Thanks

share|improve this question

2 Answers

up vote 6 down vote accepted

You can use the OUTPUT selection screen event for this. Add the following code:

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'S_WERKS'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Changing the input value to 0 for this screen element will disable input and makes the input field appear as grayed out.

share|improve this answer

You may define the parameter non-vivible with no-display.

parameters:
  s_visib like resb-werks default 'X',
  s_werks like resb-werks default 'X' no-display.

René's solution is usefull, when you want to define the visibility dynamic.

share|improve this answer

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.