Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Disabling complex selection button

Former Member
0 Likes
1,095

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

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
980

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

8 REPLIES 8
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
980

Find the screen-name of complex button and deactivate that also in the same fashion.

Read only

GauthamV
Active Contributor
0 Likes
980

Plz SEARCH in SCN before posting.

SELECT-OPTIONS: s_mara FOR mara-matnr NO INTERVALS NO-EXTENSION.

Read only

Former Member
0 Likes
980

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 STATMENTS--


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.

Read only

Former Member
0 Likes
980

see if this is what u want:

SELECT-OPTIONS S_DATE FOR sy-datum NO-EXTENSION

NO INTERVALS.

Read only

Former Member
0 Likes
980

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

Read only

Former Member
0 Likes
980

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

Read only

Former Member
0 Likes
980

Use function module "RS_SET_SELECT_OPTIONS_OPTIONS" or "RS_complex_SELECTION".

It has option to restrict the select option.

Hope this will help.

Read only

Sm1tje
Active Contributor
0 Likes
981

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