2006 Jan 16 4:33 PM
HI ALL!!
I HACE A REPORT THAT CONTAINS SOME SELECT OPTIONS AND I'M USING THE OBLIGATORY OPTION BUT IT'S ONLY FOR LO LOW ONE, SO HOW CAN I DO IT TO MAKE IT FOR BOTH, LOW AND HIGH.
THANKS AND REGARDS
2006 Jan 16 4:35 PM
I think FM SELECT_OPTIONS_RESTRICT will help. It has good documentation.
Rob
I think FM SELECT_OPTIONS_RESTRICT will help. It has good documentation.
Rob
2006 Jan 16 4:35 PM
I think FM SELECT_OPTIONS_RESTRICT will help. It has good documentation.
Rob
2006 Jan 16 4:43 PM
I THINK IT CUOLD BE:
AT SELECTION SCREEN ON SODATE.
IF SODATE-HIGH IS INITIAL.
MESSAGE E(000).
ENDIF.
THANKS ANY WAY
2006 Jan 16 4:44 PM
Rob's right, here is a sample.
report zrich_0002 .
* Type pools
type-pools: slis, sscr.
* Selection Screen
select-options: s_date for sy-datum obligatory.
initialization.
perform initilization.
************************************************************************
* INITILIZATION
************************************************************************
form initilization.
* Restrict the select options for S_DATE
* to just a date range
data: selopt type sscr_ass,
opt_list type sscr_opt_list,
restrict type sscr_restrict.
clear opt_list.
opt_list-name = 'BT'.
opt_list-options-bt = 'X'.
append opt_list to restrict-opt_list_tab.
clear selopt.
selopt-kind = 'S'.
selopt-name = 'S_DATE'.
selopt-sg_main = 'I'.
selopt-sg_addy = ' '.
selopt-op_main = 'BT'.
selopt-op_addy = 'BT'.
append selopt to restrict-ass_tab.
call function 'SELECT_OPTIONS_RESTRICT'
exporting
restriction = restrict
exceptions
too_late = 1
repeated = 2
selopt_without_options = 5
selopt_without_signs = 6
invalid_sign = 7
empty_option_list = 9
invalid_kind = 10
repeated_kind_a = 11
others = 12.
endform.
Regards,
Rich Heilman
2006 Jan 16 4:45 PM
2006 Jan 16 4:46 PM
If you just want to validate the you can do that in your AT SELECTION-SCREEN and don't use the option ON sodate as sodate is a select-option. ON should be with sodate-low or sodate-high.
If you don't want the users to use multiple values option (the green arrow next to the select-option) then you can use no-extension. You may have to do this because your logic may not work on the multiple value screen.
Using the function module gives you more flexibility on how to control the behaviour of this select-option.
Srinivas
2006 Jan 16 4:45 PM
select-options: s_pernr for pa0000-pernr obligatory.
at selection-screen.
if s_pernr-high is initial.
message e000. "Error message
endif.
2006 Jan 16 4:46 PM
Hi,
Chk the code below. I guess this solves the problem.
SELECT-OPTIONS s_matnr FOR mara-matnr OBLIGATORY.
WRITE g_target TO v_char NO-ZERO.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'S_MATNR-HIGH'.
SCREEN-REQUIRED = '1'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-NAME = 'S_MATNR'.
SCREEN-REQUIRED = 'X'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Regards
Santosh
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |