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

Selec-Option Default Value to be grayed out

Former Member
0 Likes
2,508

Hello Experts,

Can we make a 'Select-Option' default value to be grayed out?

My requirement is: I have Plant as the select-option on a report.

For Eg:

select-options: s_werks for marc-werks obligatory default 'AB'.

Now I want this 'AB' to be grayed out for the users and then they can not change this value upon execution of the report.

Is there a way to do this? Thanks for the help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,452

i have a sample code based on this you can change it as per your

requirement

when your declaring the select-option use MODIF id key word for that like this

SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.

enetr values like this

iNITIALIZATION.

S_EBELN-LOW = '4500016926'.

S_EBELN-OPTION = 'EQ'.

S_EBELN-SIGN = 'I'.

APPEND S_EBELN.

CLEAR S_EBELN.

and write the code to disable that filed like this

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

SCREEN-GROUP1 EQ 'S2'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Hello Experts,

Can we make a 'Select-Option' default value to be grayed out?

My requirement is: I have Plant as the select-option on a report.

For Eg:

select-options: s_werks for marc-werks obligatory default 'AB'.

Now I want this 'AB' to be grayed out for the users and then they can not change this value upon execution of the report.

Is there a way to do this? Thanks for the help.

8 REPLIES 8
Read only

Former Member
0 Likes
1,453

i have a sample code based on this you can change it as per your

requirement

when your declaring the select-option use MODIF id key word for that like this

SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.

enetr values like this

iNITIALIZATION.

S_EBELN-LOW = '4500016926'.

S_EBELN-OPTION = 'EQ'.

S_EBELN-SIGN = 'I'.

APPEND S_EBELN.

CLEAR S_EBELN.

and write the code to disable that filed like this

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

SCREEN-GROUP1 EQ 'S2'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
1,452

HI ,

check this ....

tables: marc.

select-options: s_werks for marc-werks obligatory default 'AB'.

at selection-screen output.

LOOP AT SCREEN.

IF SCREEN-NAME EQ 'S_WERKS-LOW'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

regards,

venkat.

Read only

Former Member
0 Likes
1,452

HI,

Please refer below code:


select-options : bukrs for bsis-bukrs DEFAULT '1000' MODIF ID SP1.


AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF SCREEN-GROUP1 = 'SP1'.
      SCREEN-INPUT = '0'.
      MODIFY SCREEN.
    ENDIF.
 ENDLOOP.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,452

Hi,

Use parameter instead of select-option .

TABLES: T001W.
SELECT-OPTIONS: WERKS FOR T001W-WERKS .

AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
  IF SCREEN-NAME = 'WERKS'.
     SCREEN-INPUT = 0.
     MODIFY SCREEN.
  ENDIF.
ENDLOOP.

1. save variant with protect this field.

2. create tcode with this variant.

rgds

vijay

Read only

0 Likes
1,452

Thanks all for the help. That was quick.

Read only

Former Member
0 Likes
1,452

Sorry Folks,

I got to re-open this - Have an issue. Actually We have clients in DEV environment: 010 & 020. We have to configure/code in 010 and test in 020. When I ran this program in client 010 it is working fine. But when I enter the program name in SE38 and hit F8 it is taking for ever to show up the selection- screen. I am terminating the session.

When I debug the following code, I am not seeing

screen-group1 = 'AB1'.

at selection-screen output.

 loop at screen.
  if screen-group1 = 'AB1'.
    screen-input    = 0.
    modify screen.
  endif.
 endloop.

Any thoughts. Please let me know the reason.

Edited by: SAM K on Mar 25, 2008 4:31 PM

Read only

0 Likes
1,452

Hi Sam,

Try to reactivate the code.

Can you show your complete code also.

Regards,

Atish

Read only

Former Member
0 Likes
1,452

Thanks All.