Restricting Select Options to Multiple Single Entries
Hi All,
I have a requirement where we have two select options. I need to restrict only One of the select options to only accept multiple single entries. I have tried using the 'SELECT_OPTIONS_RESTRICT' Function module. But it provided little help to me.
Please check the below code.
gv_w_opt_list-name = 'A'.
gv_w_opt_list-options-eq = 'X'.
APPEND gv_w_opt_list TO gv_w_res-opt_list_tab.
gv_w_***-kind = 'A'.
gv_w_***-name = 'YTRADE_DESC'.
gv_w_***-sg_main = '*'.
gv_w_***-sg_addy = 'N'.
gv_w_***-op_main = 'A'.
APPEND gv_w_*** TO gv_w_res-***_tab.
It allows to restrict intervals for select-options in selection screen
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
program = sy-repid
restriction = gv_w_res
EXCEPTIONS
too_late = 1
repeated = 2
selopt_without_options = 3
selopt_without_signs = 4
invalid_sign = 5
empty_option_list = 6
invalid_kind = 7
repeated_kind_a = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Please help me if you have any information related to this requirement. Relevant anwers will be surely rewarded.
Regards
Nagaraj
I have a code sample I use in a report. Result is only EQ and no intervals and no excludes
LOAD-OF-PROGRAM.
Subscreen: Select Options for delivery *
SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN
NO INTERVALS.
SELECT-OPTIONS:
so_dlvno FOR /scwm/s_aspq_tu-docno
MODIF ID dlv .
SELECTION-SCREEN END OF SCREEN 1100.
Subscreen: Select Options Restrictions *
Include type pool SSCR
TYPE-POOLS sscr.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA t_opt_list TYPE sscr_opt_list.
DATA *** TYPE sscr_***.
CLEAR ***.
***-kind = 'S'. "Apply only to the named SELECT-OPTION
***-name = 'SO_DLVNO'. "This is name of the SELECT-OPTION
***-sg_main = 'I'. "I = ONLY Inclusions; * = Both
***-op_main = 'NOINTERVALS'. "This must match opt_list-name
APPEND *** TO restrict-***_tab.
Create t_opt_list entry to specify capabilities of S_BUKRS.
CLEAR t_opt_list.
t_opt_list-name = 'NOINTERVALS'."This must match ***_tab-op_main
t_opt_list-options-bt = space. "Do not permit BETWEEN
t_opt_list-options-cp = space. "Do not permit MATCHES-PATTERN
t_opt_list-options-eq = 'X'. " Permit EQUALS
t_opt_list-options-ge = space. "Do not permit GREATER-OR-EQUAL
t_opt_list-options-gt = space. "Do not permit GREATER-THAN
t_opt_list-options-le = space. "Do not permit LESS-OR-EQUAL
t_opt_list-options-lt = space. "Do not permit LESS-THAN
t_opt_list-options-nb = space. "Do not permit NOT-BETWEEN
t_opt_list-options-ne = space. "Do not permit NOT-EQUAL
t_opt_list-options-np = space. "Do not permit NO-PATTERN-MATCH
APPEND t_opt_list TO restrict-opt_list_tab.
Call function module
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.
Exception handling
IF sy-subrc NE 0.
ENDIF.
Edited by: Suhel Awad on Feb 1, 2011 3:06 PM
Similar Messages
-
I am using a logical database in HR.I use the selection screen of the logical database but i want to restrict a select options for only permit introduce one value.
I restrict in abap to only use values ,nor intervals by example and other conditions.Now i have to restrict to only one value.
it must be work like a parameterHi,
U can use No-extension to restrict multiple selcet option button.
See this link
http://www.sapdevelopment.co.uk/reporting/selscr/selscr_restrictso.htm
*: Report: ZRESTRICT_SELOPT :
*: Author: www.SAPdev.co.uk :
*: Date : 2004 :
*: Description: Demonstrates how to restrict select options to only :
*: allow specific restriction options: :
*: i.e.. EQ, NE, BT etc.. :
REPORT ZRESTRICT_SELOPT.
* Include type pool SSCR
TYPE-POOLS sscr.
TABLES: EKPO.
* Selection-screen
select-options : so_ebeln for ekpo-ebeln,
so_ebelp for ekpo-ebelp.
* Variables for populating restriction data
DATA: gd_restrict TYPE sscr_restrict. "structure containing 2 tables
DATA: gd_optlist TYPE sscr_opt_list, "header line for table 1
gd_*** TYPE sscr_***. "header line for table 2
*INITIALIZATION.
INITIALIZATION.
* Restrict SO_EBELN to only except EQ, BT and NE.
gd_optlist-name = 'KEY1'. "Can be anything
gd_optlist-options-eq = 'X'.
gd_optlist-options-bt = 'X'.
gd_optlist-options-ne = 'X'.
APPEND gd_optlist TO gd_restrict-opt_list_tab.
clear: gd_optlist.
gd_***-kind = 'S'.
gd_***-name = 'SO_EBELN'.
gd_***-sg_main = 'I'.
gd_***-sg_addy = SPACE.
gd_***-op_main = 'KEY1'. "Must be same as above
APPEND gd_*** TO gd_restrict-***_tab.
clear: gd_***.
* Restrict SO_EBELP to only except CP, GE, LT.
gd_optlist-name = 'KEY2'. "Can be anything
gd_optlist-options-cp = 'X'.
gd_optlist-options-ge = 'X'.
gd_optlist-options-lt = 'X'.
APPEND gd_optlist TO gd_restrict-opt_list_tab.
clear: gd_optlist.
gd_***-kind = 'S'.
gd_***-name = 'SO_EBELP'.
gd_***-sg_main = 'I'.
gd_***-sg_addy = SPACE.
gd_***-op_main = 'KEY2'. "Must be same as above
APPEND gd_*** TO gd_restrict-***_tab.
clear: gd_***.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
* PROGRAM =
restriction = gd_restrict
* DB = ' '
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Kindly reward points for the answer which helped u and close the thread if ur problem got solved.
Message was edited by: Judith Jessie Selvi -
Restrict Select-Options for Logical Database field
The way we restrict select options for custom defined select option fields on selection screen.. can we restrict select options for standard Logical Database fields?
i.e. report uses PNPCE logical database and has field called PERNR. I want to restrict select options for this PERNR field so that it has options for 'Select single values' only.
Thanks,
Falguni
Edited by: Falguni V on Nov 13, 2010 6:42 AMYou can user AT SELECTION-SCREEN event, and check whether any record is having high value for PNPPERNR.
-
Requirement to maintain select-options for multiple fileds in webdynpro aba
Hello Gurus,
We have a requirement to maintain select-options for multiple fileds in webdynpro abap.
now we are able to create select-options for a single field using wdr_select_options componet usage.
how can we achive this select-options feature for multiple fields.
Could anyone please suggest solutions?
and if possible send me the sample code for this requirement.
Thanks in Advance for your replies.
Regards,
ShyamHi,
Nothing different for more fields, same. some declaration changes.
For example code i am using.. in WDDOINIT method.
TYPES:
fiscal_year TYPE RANGE OF GJAHR,
S_KUNNR TYPE RANGE OF J_3RS_KUNNR,
S_VKORG TYPE RANGE OF VKORG_RAN,
status type PVWTY-RETPA,
ty_r_date TYPE RANGE OF s_date,
ty_s_date TYPE LINE OF ty_r_date.
DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Reference variable used instantiate the select-options component
DATA
lr_cmp_usage TYPE REF TO if_wd_component_usage.
* Variables used to create the select-options fields and
* define its initial values
DATA:
lr_field TYPE REF TO data,
ls_date TYPE ty_s_date.
FIELD-SYMBOLS:
<fs_field> TYPE ANY,
<fs_range> TYPE INDEX TABLE.
* Instantiate the select-options component
lr_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
IF lr_cmp_usage->has_active_component( ) IS INITIAL.
lr_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_cmp_sel_opt( ).
wd_this->m_sel_opt = lo_interfacecontroller->init_selection_screen( ).
data : vhelp type wdy_md_value_help_mode_enum .
* Sets the helper reference
wd_this->m_sel_opt1 = wd_this->wd_cpifc_cmp_sel_opt( ).
wd_this->m_helper = wd_this->m_sel_opt1->init_selection_screen( ).
* Hide the standard select-options components.
wd_this->m_helper->set_global_options(
i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_false
lr_field = wd_this->m_helper->create_range_table( `KUNNR` ).
wd_this->m_helper->add_selection_field(
i_id = `KUNNR`
I_DESCRIPTION = 'Customer Code'
* i_within_block = `BL01`
it_result = lr_field ).
FREE lr_field.
lr_field = wd_this->m_helper->create_range_table( `VKORG` ).
wd_this->m_helper->add_selection_field(
i_id = `VKORG`
I_DESCRIPTION = 'Sales Organization'
* i_within_block = `BL01`
it_result = lr_field ).
FREE lr_field.
Go through this..
http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages
Cheers,
Kris. -
How to convert select-options table into single field internal table
Hi,
My requirement is to convert select-options table into single internal table which has one field.
e.g. select-options: s_matnr for mara-matnr.
select-options table can have options 'BT',"EQ", "NE", "GE", "GT", "LE", "LT", "CP" etc. select-options table
have Sign:I ,Option:BT, Low: 1, High.10.The new internal table records should be 1,2,3,4,5,6,7,8,9,10.
Please suggest any function module available for this scenario in SAP.
Thanks,
Somi.
Edited by: somi reddy satti on Sep 15, 2009 3:18 PMHi Sowmya,
Here is the answer if I understand well of your question.
Data: begin of gt_mon OCCURS 0,
mon(2) TYPE n,
end of gt_mon.
Data: begin of gt_year OCCURS 0,
year(4) TYPE n,
end of gt_year.
Select-options: s_period FOR ptdw_pws_db-kmonth NO-EXTENSION
DEFAULT sy-datum(6)
TO sy-datum(6).
For example according to above statement period is 201110 is 201201.
Period field does n't exists in SAP for selection. If your selection is on date based on period which is given on the selection-screen then you need to convert the period to date by concatenating ( or using FM to convert )01 at the end of each period . You need to declare one range table for date to select the data from table.
loop at s_period.
gr_date-sign = s_period-sign.
gr_date-option = s_period-option.
COncatenate s_period-low
'01'
into gr_date-high.
COncatenate s_period-high
'01'
into gr_date-low
append gr_date.
ENDloop.
Thanks,
Satheesh -
Select options for multiple entries
hi,
in selection screen i have 2 select-options as below
SELECT-OPTIONS: s_belnr FOR bkpf-belnr ,
s_bukrs FOR bkpf-bukrs.
the problem is if BELNR or BUKRS are not given the error message should be displayed as enter the required fields.
if i keep the OBLIGATORY i will get the message but if i keep OBLIGATORY first they need to enter one belnr or bukrs in selection screen then it allows for multiple option but the bussiness want to directly goto multiple option and upload data.
please helpNote Replace P with % Sign in IF Condition it not allow me to Put % there
TABLES: bkpf.
SELECT-OPTIONS: s_belnr FOR bkpf-belnr,
s_bukrs FOR bkpf-bukrs.
AT SELECTION-SCREEN.
IF s_belnr[] IS INITIAL AND s_bukrs[] IS INITIAL AND sy-ucomm NE 'P000' AND sy-ucomm NE 'P001'.
IF s_belnr[] IS INITIAL OR s_bukrs IS INITIAL.
MESSAGE: 'Please Enter Value in Bothe Fields' TYPE 'E'.
ENDIF.
ENDIF. -
I want to restrict the selection option of a field.
There will be no intervals to enter.
Only EQ will be available.
Will allow multiple values but no intervals.
when I enter somthing* and than proceed it displays a popup showing which criteria to select and there is only EQ value.
In other circumstances it works as I want. But I do not want the popup.
Please help.
I write the code below.
TABLES:
vbak.
SELECT-OPTIONS:
zvbeln FOR vbak-vbeln
NO INTERVALS
MATCHCODE OBJECT zpyp_posid
OBLIGATORY
INITIALIZATION.
PERFORM init_1001.
*& Form init_1001
text
FORM init_1001 .
TYPE-POOLS:
sscr.
DATA:
restriction TYPE sscr_restrict,
wa_opt_list TYPE sscr_opt_list,
ls_*** TYPE sscr_***.
MOVE 'EQ' TO wa_opt_list-name.
MOVE 'X' TO wa_opt_list-options-eq.
APPEND wa_opt_list TO restriction-opt_list_tab.
MOVE: 'S' TO ls_***-kind,
'I' TO ls_***-sg_main,
' ' TO ls_***-sg_addy,
'EQ' TO ls_***-op_main,
'EQ' TO ls_***-op_addy,
'ZVBELN' TO ls_***-name.
APPEND ls_*** TO restriction-***_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
PROGRAM =
restriction = restriction
DB = ' '
EXCEPTIONS
too_late = 1
repeated = 2
selopt_without_options = 3
selopt_without_signs = 4
invalid_sign = 5
empty_option_list = 6
invalid_kind = 7
repeated_kind_a = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.Hi Fuat ,
i don't understand ?!
in my example report comes <b>no addtitional popup</b>:
here's the complete test-report:
REPORT z6.
TABLES:
vbak, bkpf.
SELECT-OPTIONS:
zvbeln FOR vbak-vbeln OBLIGATORY DEFAULT '5300000000'.
INITIALIZATION.
PERFORM init_1001.
START-OF-SELECTION.
SELECT belnr FROM bkpf INTO bkpf-belnr
WHERE bukrs = '0001'
AND belnr IN zvbeln
AND gjahr = sy-datum(4).
WRITE: / bkpf-belnr.
ENDSELECT.
IF sy-subrc <> 0.
WRITE: / 'no entry found!'.
ENDIF.
*& Form init_1001
FORM init_1001 .
TYPE-POOLS:
sscr.
DATA:
restriction TYPE sscr_restrict,
wa_opt_list TYPE sscr_opt_list,
ls_*** TYPE sscr_***.
MOVE 'EQ' TO wa_opt_list-name.
MOVE 'X' TO wa_opt_list-options-eq.
APPEND wa_opt_list TO restriction-opt_list_tab.
MOVE: 'S' TO ls_***-kind,
'I' TO ls_***-sg_main,
'EQ' TO ls_***-op_main,
'ZVBELN' TO ls_***-name.
APPEND ls_*** TO restriction-***_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restriction.
ENDFORM.
regards Andreas -
Hi,
I came across this piece of code in ABAP FAQ. It is supposed to restrict the select-options so that the user can enter only specific options like only intervals or single values or patterns etc. But for some reason its not working for me. I am using SAP 4.7.
Any pointers will be greatly appreciated.
Restricting the selection screen
REPORT ZDANY_RESTRICT_SELECTION.
Include type pool SSCR
TYPE-POOLS sscr.
TABLES : sflight.
defining the selection-screen
select-options :
s_carrid for sflight-carrid,
s_connid for sflight-connid.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA : optlist TYPE sscr_opt_list,
*** type sscr_***.
INITIALIZATION.
Restricting the carrid selection to only EQ and 'BT'.
optlist-name = 'OBJECTKEY1'.
optlist-options-eq = 'X'.
optlist-options-bt = 'X'.
APPEND optlist TO restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_carrid'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY1'.
APPEND *** TO restrict-***_tab.
Restricting the connid selection to CP, GE, LT, NE.
optlist-name = 'OBJECTKEY2'.
optlist-options-cp = 'X'.
optlist-options-ge = 'X'.
optlist-options-lt = 'X'.
optlist-options-ne = 'X'.
APPEND optlist TO restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_connid'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY2'.
APPEND *** TO restrict-***_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
SudeepHi
Olaf's solution should be OK. Always use uppercase for this kind of variable values. I guess you've already seen, but the FM has a documentation if you need more information on it.
*--Serdar -
How do I restrict Select-option values to those founn in a Z table?
Hello friends,
I would like to display and restrict values for a select-option to those found in a Z table. That is to say, the user is only able to choose those values found in the Z table and not otherwise.
How to do this please?
Thank you for your help.USE FM : SELECT_OPTIONS_RESTRICT
report zs_list_select_option.
type-pools sscr.
tables : marc.
defining the selection-screen
select-options :
s_matnr for marc-matnr,
s_werks for marc-werks.
Define the object to be passed to the RESTRICTION parameter
data restrict type sscr_restrict.
Auxiliary objects for filling RESTRICT
data : optlist type sscr_opt_list,
*** type sscr_***.
initialization.
Restricting the MATNR selection to only EQ and 'BT'.
optlist-name = 'OBJECTKEY1'.
optlist-options-eq = 'X'.
optlist-options-bt = 'X'.
append optlist to restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_MATNR'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY1'.
append *** to restrict-***_tab.
Restricting the WERKS selection to CP, GE, LT, NE.
optlist-name = 'OBJECTKEY2'.
optlist-options-cp = 'X'.
optlist-options-ge = 'X'.
optlist-options-lt = 'X'.
optlist-options-ne = 'X'.
append optlist to restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_WERKS'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY2'.
append *** to restrict-***_tab.
call function 'SELECT_OPTIONS_RESTRICT'
exporting
restriction = restrict
exceptions
too_late = 1
repeated = 2
selopt_without_options = 3
selopt_without_signs = 4
invalid_sign = 5
empty_option_list = 6
invalid_kind = 7
repeated_kind_a = 8
others = 9
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Edited by: Srinivas Gurram Reddy on Mar 18, 2008 3:14 PM -
Restrict select option with few values by default
I have few values with which i have to restrict in a select option by default.
I have done in initialisation as below.
s_ktokd-sign = 'I'.
s_ktokd-option = 'NE'.
s_ktokd-low = '0012'.
append s_ktokd to s_ktokd.
clear s_ktokd.
Is there any other way?
Thanks
Kiranyeah you can do that in initalization.
> s_ktokd-sign = 'I'.
> s_ktokd-option = 'NE'.
> s_ktokd-low = '0012'.
> append s_ktokd to s_ktokd.
> clear s_ktokd.
small correction to your code, corrected code...
s_ktokd-sign = 'E'.
s_ktokd-option = 'EQ'.
s_ktokd-low = '0012'.
append s_ktokd to s_ktokd.
clear s_ktokd. -
Select Options in multiple views
I am running into a problem. I have an application with 2 views. I use select-options in both views, but with different fields. When I move from view 1 to view 2, it works correctly, displaying the select-options for view 2. When I return to view 1 however, the container still shows the select-options for view 2. Any help would be greatly appreciated.
Alex, please explain what you mean by 'clear the nodes'. All the setup for the select-options is currently done in the WDDOINIT in both views.
Sarath, could you please explain what you mean by 'changing the lifetime'. I've never heard this term. Where would this be done.
I copied the select-options code I had in my WDDOINIT into my HANDLEIN screen, and it dumps on the first 'ADD_SELECTION_FIELD' method call. If I add a
l_ref_comp_usage_so->delete_component( ).
before my
l_ref_comp_usage_so->create_component( ).
the selection screen comes up blank. -
Restrictions in select-options
Hi,
How to remove the diffrent tabs in the extention of a select-option? Foe example I want to remove 'exclude single values' and 'exclude range' from the extention of select-options.
Thanks in advance
Jaison JosephHi
Please check the following link which has many examples from our friends in the forum.
Re: Restricting Select-options
And one small example from me:
TABLES: VBAK.
TYPE-POOLS: SSCR.
* S E L E C T I O N S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK BLK3 WITH FRAME NO INTERVALS.
SELECTION-SCREEN BEGIN OF BLOCK BLK0 WITH FRAME TITLE TEXT-000 NO
INTERVALS.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_ARC RADIOBUTTON GROUP RAD0 DEFAULT 'X'
USER-COMMAND ABC.
SELECTION-SCREEN COMMENT (20) TEXT-003 FOR FIELD P_ARC.
SELECTION-SCREEN POSITION 33.
PARAMETERS: P_DIS RADIOBUTTON GROUP RAD0.
SELECTION-SCREEN COMMENT (20) TEXT-004 FOR FIELD P_DIS.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK BLK0.
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001 NO
INTERVALS.
PARAMETERS: P_VKORG LIKE VBAK-VKORG OBLIGATORY.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN OBLIGATORY NO INTERVALS.
SELECTION-SCREEN END OF BLOCK BLK1.
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002 NO
INTERVALS.
PARAMETERS: P_SO RADIOBUTTON GROUP RAD1 DEFAULT 'X' MODIF ID ABC,
P_PO RADIOBUTTON GROUP RAD1 MODIF ID ABC,
P_SOPO RADIOBUTTON GROUP RAD1 MODIF ID ABC.
SELECTION-SCREEN END OF BLOCK BLK2.
SELECTION-SCREEN END OF BLOCK BLK3.
* A T S E L E C T I O N - S C R E E N OUTPUT *
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC' OR SCREEN-NAME = '%B002014_BLOCK_1000'.
CASE 'X'.
WHEN P_ARC.
SCREEN-ACTIVE = 1.
WHEN P_DIS.
SCREEN-ACTIVE = 0.
ENDCASE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
* I N I T I A L I Z A T I O N *
INITIALIZATION.
DATA: RES TYPE SSCR_RESTRICT.
DATA OPT_LIST TYPE SSCR_OPT_LIST.
DATA *** TYPE SSCR_***.
MOVE: 'OPT1' TO OPT_LIST-NAME,
'X' TO OPT_LIST-OPTIONS-EQ.
APPEND OPT_LIST TO RES-OPT_LIST_TAB.
MOVE: 'S' TO ***-KIND,
'S_VBELN' TO ***-NAME,
'I' TO ***-SG_MAIN,
' ' TO ***-SG_ADDY,
'OPT1' TO ***-OP_MAIN.
APPEND *** TO RES-***_TAB.
CALL FUNCTION 'RS_INT_SELOPT_RESTRICT'
EXPORTING
PROGRAM = SY-REPID
RESTRICTION = RES
EXCEPTIONS
SELOPT_WITHOUT_OPTIONS = 1
SELOPT_WITHOUT_SIGNS = 2
INVALID_SIGN = 3
EMPTY_OPTION_LIST = 4
INVALID_KIND = 5
REPEATED_KIND_A = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
ENDIF.
* S T A R T - O F - S E L E C T I O N *
Regards
Eswar
Message was edited by:
Eswar Rao Boddeti
Just checked that the thread is already answered, am slow... NVM, it had resolved your query:) -
Selection option for variable entry in BEx in 2004s
Hi All,
Have any of you noticed that the selection option functionality for variable entry while creating a variable does not allow wild card entry,Even though you create the variable with selection option as input.
In 3.5 we had option the option "contains the pattern " but in 2004s its not available in the variable entry screen.Hello Guys,
When I posted this thread we were upgrading to SP11, now I am in the middle of another upgrade (SP15) and I still notice that wild card option is yet to be made available for a variable of type selection option.
Back then I had sent a message to SAP and was told that the functionality would be rolled out in new SP's. I am very curious as too how others are handling this problem, as they are bound to be reports for which such variables are a must.
P.S - The option has been made available
Edited by: Karthik on Jul 22, 2008 6:52 PM -
Multipl selection not working in Select Options, NO-EXTENSION not specified
Hi,
My code for the selection screen is as given below:
data: v_bukrs type ekko-bukrs.
select-options: s_one for v_bukrs default '1234',
s_two for ekko-lifnr,
s_three for ekko-ekgrp.
select-options: s_last for ekko-llief no intervals.
However, when I execute my program, all for select-options show Multiple selection icon. When I click on the icon for multiple selection, it is not processed.
I tried to debug and find out but to no avail. Also I have searched extensively over SDN, but have not found any solution for my problem.
Kindly help with relevant solution.
Regards,
SmruthiHi Anurag and Vinod,
Thanks for your replies.
The FM - SELECT_OPTIONS_RESTRICT has not been used in my program.
The issue is however, resolved. There was an error in the selection screen events, that was triggering the disabling.
Regards,
Smruthi -
is exist restriction for select-options?
for example:
<b> data: ftxt04(4).
select-options: txt04 for ftxt04.</b>Hi,
You can restrict select-options.
SELECT-OPTIONS : S_VKORG FOR TVKO-VKORG MEMORY ID VKO.
Form F1000_RESTRICT_VKORG.
INITIALIZATION.
PERFORM F1000_RESTRICT_VKORG.
Define the object to be passed to the RESTRICTION parameter
DATA lw_restrict TYPE SSCR_RESTRICT.
Auxiliary objects for filling RESTRICT
DATA lw_opt_list TYPE sscr_opt_list.
DATA lw_*** TYPE sscr_***.
Assign selection screen objects to option list and sign
NOINTERVLS: BT and NB not allowed
CLEAR lw_opt_list.
MOVE 'NOINTERVLS' TO lw_opt_list-name.
MOVE 'X' TO: lw_opt_list-options-cp,
lw_opt_list-options-eq,
lw_opt_list-options-ge,
lw_opt_list-options-gt,
lw_opt_list-options-le,
lw_opt_list-options-lt,
lw_opt_list-options-ne,
lw_opt_list-options-np.
APPEND lw_opt_list TO lw_restrict-opt_list_tab.
KIND = 'S':
CLEAR lw_***.
MOVE: 'S' TO lw_***-kind,
'S_VKORG' TO lw_***-name,
'I' TO lw_***-sg_main,
'*' TO lw_***-sg_addy,
'NOINTERVLS' TO lw_***-op_main.
APPEND lw_*** TO lw_restrict-***_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = lw_restrict
EXCEPTIONS
too_late = 1
repeated = 2
selopt_without_options = 3
selopt_without_signs = 4
invalid_sign = 5
empty_option_list = 6
invalid_kind = 7
repeated_kind_a = 8
OTHERS = 9.
IF sy-subrc <> 0. "Restriction error encountered for Select
"Option
MESSAGE I001 WITH 'ERROR IN SELECT OPTION'."ERROR IN SELECT OPTION
ENDIF.
endform. " F1000_RESTRICT_VKORG
Maybe you are looking for
-
All my TIFFs will open from CS6. In Bridge, when I select some TIFFs, the "File > Open in Camera Raw-" is greyed out. For other TIFFs it is not. Similarly for right clicking on an thumbnail in bridge. I've noted that preferences refers to "supporte
-
Could some one let me know how I can have the Logical model show the relationships betn two entities, but the foriegn keys are not generated during "Database Design Transform" process? e.g. CUSTOMER Customer_Id Customer_name Order OrderId CustomerId
-
Keep Dense_rank() Last
I am using said function in my query SQL> select job, max(hiredate) keep (dense_rank last order by hiredate) Hdate from emp 2 group by job 3 ; JOB HDATE ANALYST 19-APR-87 CLERK 23-MAY-87 MANAGER 09-JUN-81 PRESIDENT 17-NOV-81 SALE
-
After encoding, out of application memory: problem & solution
Shortly after completing a batch in Compressor 4.1 running in OS 10.9.1, I started receiving an error message that the system was out of application memory. (Despite the fact that I have 16 GB of RAM!) I had activity monitor open and there were num
-
Copy client 000 to 001 in preview abap
I am trying to copy client 000 to 001 in preview abap without success. Can someone help me if it is possible? How can I activate HELP in preview abap? Mat