09-01-2008 2:41 PM
in select options , the user should not able to give other values.( i.e)he should be able to use only the default value given in the select option, not other valid values.......
any idea?????
09-01-2008 2:46 PM
Use can deactivate it the entry field @ at selection-screen output event using loop at screen.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'S_WERKS-LOW' OR
screen-name = 'S_WERKS-HIGH'.
screen-input = '0'.
ENDIF.
ENDLOOP.
Replace S_WERKS by your select-options field name.
Thanks,
Karthik
Edited by: karthik arunachalam on Sep 1, 2008 7:21 PM
Edited by: karthik arunachalam on Sep 1, 2008 7:17 PM
09-01-2008 2:46 PM
Use can deactivate it the entry field @ at selection-screen output event using loop at screen.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'S_WERKS-LOW' OR
screen-name = 'S_WERKS-HIGH'.
screen-input = '0'.
ENDIF.
ENDLOOP.
Replace S_WERKS by your select-options field name.
Thanks,
Karthik
Edited by: karthik arunachalam on Sep 1, 2008 7:21 PM
Edited by: karthik arunachalam on Sep 1, 2008 7:17 PM
09-01-2008 2:47 PM
Hi,
No. U can give any value in select option. There must be some thing being done in AT SELECTION-SCREEN OUTPUT. like REFRESH and populate with default values.
Can u paste ur code???
If u want to achieve this requirement then in At selection screen output do like this.
AT SELECTION-screen output.
Populate default values to the select option.
LOOP AT screen.
IF screen-name EQ 'SO_MATNR-LOW' OR
screen-name EQ 'SO_MATNR-HIGH' Your Selectoptionname
screen-input = 0. "Make it input disabled.
MODIFY screen.
ENDIF.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Sep 1, 2008 7:18 PM
09-01-2008 2:52 PM
for p_ccr1 the value should only be xq01.
so i hav used a FM 'SELECT_OPTIONS_RESTRICT'
but its not working.
SELECT-OPTIONS: p_ccr1 FOR mbew-hrkft obligatory .
PARAMETERS : p_mrp2 TYPE marc-webaz.
SELECTION-SCREEN END OF BLOCK b2 .
INITIALIZATION .
CLEAR opt_list .
MOVE 'NOINTERVLS' TO opt_list-name .
MOVE 'X' TO: opt_list-options-eq .
APPEND opt_list
TO restrict-opt_list_tab.
CLEAR ass .
MOVE: 'S' TO ass-kind ,
'P_CCR1' TO ass-name ,
'I' TO ass-sg_main ,
'N' TO ass-sg_addy ,
'NOINTERVLS' TO ass-op_main .
APPEND ass TO restrict-ass_tab .
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
too_late = 1
repeated = 2
not_during_submit = 3
db_call_after_report_call = 4
selopt_without_options = 5
selopt_without_signs = 6
invalid_sign = 7
report_call_after_db_error = 8
empty_option_list = 9
invalid_kind = 10
repeated_kind_a = 11
OTHERS = 12.
09-01-2008 2:53 PM
Suppose s_val is you select-option
Use event.
AT SELECTION-SCREEN on s_val.
if s_val-low = val1.
..
else.
error message.
endif.
Hope this helps!
Regards,
Prashant
09-01-2008 2:54 PM
Hi,
At first in Initialization provide the default value...
And In AT SELECTION-SCREEN EVENT simply provide the value for that select-option so that even if you do any action on selection-screen then AT SELECTION-SCREEN EVENT gets triggered and resets the
value to the value you specified.
Even if you execute also then it will Trigger the AT SELECTION-SCREEN EVENT and then goes to the
Start-Of-Selection Event.
It better if you debug the code once where exactly it triggering the events you can better understand my
explanation..
Hope this would help you.
Please revert back if any questions..
Good luck`
Narin
09-01-2008 2:57 PM
Hi,
then u can validate that field in this way,
SELECT-OPTIONS matnr for mara-matnr default 'ABC'.
at SELECTION-SCREEN OUTPUT.
if matnr-LOW = 'ABC'. "here you have to decide low and high value
message 'correct value' type 'I'.
else.
message 'value incorrect' type 'E'.
endif.
thanks,
Sanket.