‎2009 May 18 7:17 AM
Hi Experts,
In my select-options, based on the user ( sy-uname ), I am disabling the select-option-High value.
i.e. if screen-name = 'S_DATE-HIGH'.
screen-input = 0.
endif.
But at the same time I need to disable the complex selection button also. It means that the user has to give only one input like parameter.
How can I disable complex selection button.
Thanks and regards,
Venkat
‎2009 May 18 7:40 AM
Venkat,
correct me if I'm wrong, but this is how I interpret your requirement. Only for certain users this should be disabled, right?
well then you will have to want this for coding:
INITIALIZATION.
LOOP AT SCREEN.
IF screen-name = '%_S_DATE_%_APP_%-VALU_PUSH'.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
The name of the screen field depends on your selection-options name.
Alternative would be to look at the layout of the generated selection screen.
Otherwise, try do debug and see what screen field names are displayed.
Edited by: Micky Oestreich on May 18, 2009 8:40 AM
‎2009 May 18 7:19 AM
Find the screen-name of complex button and deactivate that also in the same fashion.
‎2009 May 18 7:20 AM
Plz SEARCH in SCN before posting.
SELECT-OPTIONS: s_mara FOR mara-matnr NO INTERVALS NO-EXTENSION.
‎2009 May 18 7:21 AM
hi,
please check this below code
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-027 .
PARAMETERS: P_RADIO1 RADIOBUTTON GROUP RAD DEFAULT 'X' USER-COMMAND UCOM .
PARAMETERS : P_KEY TYPE SYDATUM DEFAULT sy-datum MODIF ID MO1.
PARAMETERS: P_RADIO2 RADIOBUTTON GROUP RAD.
SELECT-OPTIONS: SO_BUDAT FOR BSIS-BUDAT MODIF ID MO2 .
SELECTION-SCREEN END OF BLOCK B2.
*--
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF P_RADIO1 = 'X'.
CHECK SCREEN-group1 = 'MO1'.
SCREEN-INPUT = 1.
ELSE.
CHECK SCREEN-group1 = 'MO1'.
SCREEN-INPUT = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
LOOP AT SCREEN.
if P_RADIO2 = 'X'.
CHECK SCREEN-GROUP1 = 'MO2'.
SCREEN-INPUT = 1.
ELSE.
CHECK SCREEN-GROUP1 = 'MO2'.
SCREEN-INPUT = 0.
endif.
MODIFY SCREEN.
ENDLOOP.
‎2009 May 18 7:23 AM
see if this is what u want:
SELECT-OPTIONS S_DATE FOR sy-datum NO-EXTENSION
NO INTERVALS.
‎2009 May 18 7:26 AM
Hi,
write this code....
this will resolve your issue completely... its check ....
loop at screen.
if screen-name CS 'S_DATE' and screen-name ne 'S_DATE-LOW'.
screen-input = 0.
modify screen.
endif.
endloop.Regards,
Siddarth
‎2009 May 18 7:26 AM
Hi Venkat,
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
IF sy-uname = ' '.
SELECT-OPTIONS s_matnr FOR mara-matnr.
ELSE.
SELECT-OPTIONS p_matnr FOR mara-matnr NO-EXTENSION
NO INTERVALS.
ENDIF.
SELECTION-SCREEN END OF BLOCK blk1 .
Try the above code.
Hope this solves your problem.
Cheers,
Suvendu
‎2009 May 18 7:37 AM
Use function module "RS_SET_SELECT_OPTIONS_OPTIONS" or "RS_complex_SELECTION".
It has option to restrict the select option.
Hope this will help.
‎2009 May 18 7:40 AM
Venkat,
correct me if I'm wrong, but this is how I interpret your requirement. Only for certain users this should be disabled, right?
well then you will have to want this for coding:
INITIALIZATION.
LOOP AT SCREEN.
IF screen-name = '%_S_DATE_%_APP_%-VALU_PUSH'.
screen-input = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
The name of the screen field depends on your selection-options name.
Alternative would be to look at the layout of the generated selection screen.
Otherwise, try do debug and see what screen field names are displayed.
Edited by: Micky Oestreich on May 18, 2009 8:40 AM