2008 Mar 25 5:53 PM
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.
2008 Mar 25 5:59 PM
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.
2008 Mar 25 5:59 PM
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.
2008 Mar 25 6:04 PM
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.
2008 Mar 25 6:05 PM
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.
2008 Mar 25 6:21 PM
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
2008 Mar 25 6:27 PM
2008 Mar 25 10:19 PM
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
2008 Mar 25 11:24 PM
Hi Sam,
Try to reactivate the code.
Can you show your complete code also.
Regards,
Atish
2008 Mar 27 7:26 PM