Disabling select-option
Hi Experts,
In the below code always the selectoption s_date must be disabled, once when i select the radiobutton op only it has to be enabled how to do that can any help me out,,
SELECTION-SCREEN BEGIN OF BLOCK A WITH FRAME TITLE TEXT-500.
PARAMETER :
CWEEK TYPE C RADIOBUTTON GROUP RB,
PWEEK TYPE C RADIOBUTTON GROUP RB,
UP TYPE C RADIOBUTTON GROUP RB,
PRCW TYPE C RADIOBUTTON GROUP RB,
OP TYPE C RADIOBUTTON GROUP RB.
SELECT-OPTIONS S_DATE for pa0102-begda no-extension.
SELECTION-SCREEN END OF BLOCK A.
Thanks and Regaards,
Thirukumaran. R
Hi
sample code see thsi
REPORT ZNNR_REPORT NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
TABLES EKKO.
*********END OF DATA DECLARATIONS**********
********SELECTION SCREEN DESIGN ***********
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X' user-command uc1.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
*******END OF SELECTION SCREEN DESIGN*****************
************SCREEN MODIFICATIONS********************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*********END OF SCREEN MODIFICATIONS******************
Similar Messages
-
Disable Select-Options Tabstrips
Hi,
Does anyone know how to disable select-options dialog box's tabstrips? Standard multiple selection dialog box comes with 4 tabstrips (single values, ranges values, excluded single values, and excluded ranges value). I would like to disable one of these tab, does anyone work with this before.
Thanks,
SPHi Seng,
Please use NO EXTENSION NO INTERVAL
for further help please go through KEY word documentaion.
Regards
Ramchander Rao.K -
Hi,,
I need to disable one of the select option field s_date in my selection screen.
I need to it to have the values that are populated in the initialization event and disable it for further entries.
Can someone please let me know how to do this.
Thanks in advance.Use the following FM for that purpose:
SELECT_OPTIONS_RESTRICT
Refer the code:
* 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 OPT_LIST TYPE SSCR_OPT_LIST.
DATA *** TYPE SSCR_***.
* Define the selection screen objects
* First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_0 WITH FRAME TITLE TEXT-BL0.
SELECT-OPTIONS SEL_0_0 FOR SY-TVAR0.
SELECT-OPTIONS SEL_0_1 FOR SY-TVAR1.
SELECT-OPTIONS SEL_0_2 FOR SY-TVAR2.
SELECT-OPTIONS SEL_0_3 FOR SY-TVAR3.
SELECTION-SCREEN END OF BLOCK BLOCK_0.
* Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_1 WITH FRAME TITLE TEXT-BL1.
SELECT-OPTIONS SEL_1_0 FOR SY-SUBRC.
SELECT-OPTIONS SEL_1_1 FOR SY-REPID.
SELECTION-SCREEN END OF BLOCK BLOCK_1.
INITIALIZATION.
* Define the option list
* ALL: All options allowed
MOVE 'ALL' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
OPT_LIST-OPTIONS-CP,
OPT_LIST-OPTIONS-EQ,
OPT_LIST-OPTIONS-GE,
OPT_LIST-OPTIONS-GT,
OPT_LIST-OPTIONS-LE,
OPT_LIST-OPTIONS-LT,
OPT_LIST-OPTIONS-NB,
OPT_LIST-OPTIONS-NE,
OPT_LIST-OPTIONS-NP.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* NOPATTERN: CP and NP not allowed
CLEAR OPT_LIST.
MOVE 'NOPATTERN' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
OPT_LIST-OPTIONS-EQ,
OPT_LIST-OPTIONS-GE,
OPT_LIST-OPTIONS-GT,
OPT_LIST-OPTIONS-LE,
OPT_LIST-OPTIONS-LT,
OPT_LIST-OPTIONS-NB,
OPT_LIST-OPTIONS-NE.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* NOINTERVLS: BT and NB not allowed
CLEAR OPT_LIST.
MOVE 'NOINTERVLS' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
OPT_LIST-OPTIONS-EQ,
OPT_LIST-OPTIONS-GE,
OPT_LIST-OPTIONS-GT,
OPT_LIST-OPTIONS-LE,
OPT_LIST-OPTIONS-LT,
OPT_LIST-OPTIONS-NE,
OPT_LIST-OPTIONS-NP.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* EQ_AND_CP: only EQ and CP allowed
CLEAR OPT_LIST.
MOVE 'EQ_AND_CP' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
OPT_LIST-OPTIONS-EQ.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* JUST_EQ: Only EQ allowed
CLEAR OPT_LIST.
MOVE 'JUST_EQ' TO OPT_LIST-NAME.
MOVE 'X' TO OPT_LIST-OPTIONS-EQ.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* Assign selection screen objects to option list and sign
* KIND = 'A': applies to all SELECT-OPTIONS
MOVE: 'A' TO ***-KIND,
'*' TO ***-SG_MAIN,
'NOPATTERN' TO ***-OP_MAIN,
'NOINTERVLS' TO ***-OP_ADDY.
APPEND *** TO RESTRICT-***_TAB.
* KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
* that is, SEL_0_0, SEL_0_1, SEL_0_2
CLEAR ***.
MOVE: 'B' TO ***-KIND,
'BLOCK_0' TO ***-NAME,
'I' TO ***-SG_MAIN,
'*' TO ***-SG_ADDY,
'NOINTERVLS' TO ***-OP_MAIN.
APPEND *** TO RESTRICT-***_TAB.
* KIND = 'S': applies to SELECT-OPTION SEL-0-2
CLEAR ***.
MOVE: 'S' TO ***-KIND,
'SEL_0_2' TO ***-NAME,
'I' TO ***-SG_MAIN,
'*' TO ***-SG_ADDY,
'EQ_AND_CP' TO ***-OP_MAIN,
'ALL' TO ***-OP_ADDY.
APPEND *** TO RESTRICT-***_TAB.
* KIND = 'S': Applies to SELECT-OPTION SEL_0_3
CLEAR ***.
MOVE: 'S' TO ***-KIND,
'SEL_0_3' TO ***-NAME,
'I' TO ***-SG_MAIN,
'N' TO ***-SG_ADDY,
'JUST_EQ' TO ***-OP_MAIN.
APPEND *** TO RESTRICT-***_TAB.
* Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = RESTRICT
* DB = ' '
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. -
Create a disabled Select Option in javascript
Hi
By now, I want to create a SELECT object with disabled options by using javascript.
I tried "selectObj.options[1].disabled = true", it can work in Netscape, but not in IE.
Does anyone can help?
Thanks
MichaelJust tried, but doesn't work to me. Here is the complete html source
<html>
<head>
<title>Test</title>
</head>
<script>
function check()
var selectObj = document.createElement("SELECT");
selectObj.options[0] = new Option("abc",1);
selectObj.options[1] = new Option("def",2);
selectObj.options[1].id = "def_id";
var d = document.getElementById("test");
d.appendChild(selectObj);
var opt = document.getElementById("def_id");
alert(opt);
opt.disabled = true;
</script>
<body>
<div id="test" name="test"></div>
check
</body>
</html> -
Need to disable one of the select-options in dynamic selection screen
Hi,
we have copied the Standard program: RFDOPR00 into Z, my requirement is to disable one of the select-options in dynamic selection screen for ex: Reason code(User shouldnot able to enter anything in it).
Can anyone please tell me the procedure to do it... I had tried using at selection-screen but it doesnt work as it in 'LOOP AT SCREEN', i am not able to capture the Parameter name(screen-name).
Thanks,
RaviHi,
Get inside your selection screen, by executing your program.
Now type /h in the field where you enter transaction code and press enter.
Now again press enter, this will take you debugger starting from your Selection screen.
You might be knowing this, still if you are not aware of this, this might be a valuable tip.
From here , you can trace your Parameter name. -
Disabling the Ranges option in Select options
Hi,
I have a requirement where I have to remove the possibility of entering the ranges for select-options on the selection screen (eg: FROM xyz TO xyz ).. For this I used SELECT OPTIONS NO INTERVALS.
Now the range option doesnt appear on the main selection screen. However, when I click on the Multiple Selection screen button next to this field.. here again I find an option to enter the ranges. Is there a way to disable this option on the Multiple Selection screen.
Could anyone please help me in this.
Regards,
Harshachk this program
REPORT TESTREP.
* 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 OPT_LIST TYPE SSCR_OPT_LIST.
DATA *** TYPE SSCR_***.
* Define the selection screen objects
* First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_0 WITH FRAME TITLE TEXT-BL0.
SELECT-OPTIONS SEL_0_0 FOR SY-TVAR0.
SELECT-OPTIONS SEL_0_1 FOR SY-TVAR1.
SELECT-OPTIONS SEL_0_2 FOR SY-TVAR2.
SELECT-OPTIONS SEL_0_3 FOR SY-TVAR3.
SELECTION-SCREEN END OF BLOCK BLOCK_0.
* Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_1 WITH FRAME TITLE TEXT-BL1.
SELECT-OPTIONS SEL_1_0 FOR SY-SUBRC.
SELECT-OPTIONS SEL_1_1 FOR SY-REPID.
SELECTION-SCREEN END OF BLOCK BLOCK_1.
INITIALIZATION.
* Define the option list
* ALL: All options allowed
MOVE 'ALL' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
OPT_LIST-OPTIONS-CP,
OPT_LIST-OPTIONS-EQ,
OPT_LIST-OPTIONS-GE,
OPT_LIST-OPTIONS-GT,
OPT_LIST-OPTIONS-LE,
OPT_LIST-OPTIONS-LT,
OPT_LIST-OPTIONS-NB,
OPT_LIST-OPTIONS-NE,
OPT_LIST-OPTIONS-NP.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* NOPATTERN: CP and NP not allowed
CLEAR OPT_LIST.
MOVE 'NOPATTERN' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
OPT_LIST-OPTIONS-EQ,
OPT_LIST-OPTIONS-GE,
OPT_LIST-OPTIONS-GT,
OPT_LIST-OPTIONS-LE,
OPT_LIST-OPTIONS-LT,
OPT_LIST-OPTIONS-NB,
OPT_LIST-OPTIONS-NE.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* NOINTERVLS: BT and NB not allowed
CLEAR OPT_LIST.
MOVE 'NOINTERVLS' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
OPT_LIST-OPTIONS-EQ,
OPT_LIST-OPTIONS-GE,
OPT_LIST-OPTIONS-GT,
OPT_LIST-OPTIONS-LE,
OPT_LIST-OPTIONS-LT,
OPT_LIST-OPTIONS-NE,
OPT_LIST-OPTIONS-NP.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* EQ_AND_CP: only EQ and CP allowed
CLEAR OPT_LIST.
MOVE 'EQ_AND_CP' TO OPT_LIST-NAME.
MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
OPT_LIST-OPTIONS-EQ.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* JUST_EQ: Only EQ allowed
CLEAR OPT_LIST.
MOVE 'JUST_EQ' TO OPT_LIST-NAME.
MOVE 'X' TO OPT_LIST-OPTIONS-EQ.
APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.
* Assign selection screen objects to option list and sign
* KIND = 'A': applies to all SELECT-OPTIONS
MOVE: 'A' TO ***-KIND,
'*' TO ***-SG_MAIN,
'NOPATTERN' TO ***-OP_MAIN,
'NOINTERVLS' TO ***-OP_ADDY.
APPEND *** TO RESTRICT-***_TAB.
* KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
* that is, SEL_0_0, SEL_0_1, SEL_0_2
CLEAR ***.
MOVE: 'B' TO ***-KIND,
'BLOCK_0' TO ***-NAME,
'I' TO ***-SG_MAIN,
'*' TO ***-SG_ADDY,
'NOINTERVLS' TO ***-OP_MAIN.
APPEND *** TO RESTRICT-***_TAB.
* KIND = 'S': applies to SELECT-OPTION SEL-0-2
CLEAR ***.
MOVE: 'S' TO ***-KIND,
'SEL_0_2' TO ***-NAME,
'I' TO ***-SG_MAIN,
'*' TO ***-SG_ADDY,
'EQ_AND_CP' TO ***-OP_MAIN,
'ALL' TO ***-OP_ADDY.
APPEND *** TO RESTRICT-***_TAB.
* KIND = 'S': Applies to SELECT-OPTION SEL_0_3
CLEAR ***.
MOVE: 'S' TO ***-KIND,
'SEL_0_3' TO ***-NAME,
'I' TO ***-SG_MAIN,
'N' TO ***-SG_ADDY,
'JUST_EQ' TO ***-OP_MAIN.
APPEND *** TO RESTRICT-***_TAB.
* Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = RESTRICT
* DB = ' '
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.
Message was edited by: Sekhar -
Disable the Select-options field in the viewcontainer
Hi,
I have two select option fields(Date,Number) in a viewcontainer .
Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
Thanks in Advance.
Regards,
bala.Hi,
I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
I just had one select-option on my scr...but it can be done with two too...
step1:
created three attributes at component level under the attribute tab ( as suggested by Thomas )
ENABLE_PRI_SELECTOPTION type WDY_BOOLEAN
M_HANDLER type ref to IF_WD_SELECT_OPTIONS
M_WD_SELECT_OPTIONS type ref to IWCI_WDR_SELECT_OPTIONS
Note: all are with public check box checked....so that all your views can see these attributes
I created a method at componenet controller leverl: create_select_option....in this method i have following code:
DATA:
lt_range_table TYPE REF TO data,
* rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
typename TYPE string.
DATA:
lr_componentcontroller TYPE REF TO ig_componentcontroller,
l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
* create the used component
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
* get a pointer to the interface controller of the select options
*component
wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
* init the select screen
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
* create a range table that consists of this new data element
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'PERSNO' ).
* add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'PERSNO'
I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
I_NO_INTERVALS = abap_true
it_result = lt_range_table
i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ). <-----pls see here how i am controlling the read only property
I assume you know this much...already....but i am just putting everything down....
step2:
in my view where i want to display the select-options....i added this code under my wddoinit method
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false. <--pls see initially we want this field to be open
lo_componentcontroller->create_select_option(
step3:
i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
under that button action method i added the following code:
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
"<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
"this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
"which produces dump from system....
lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
i_id = 'PERSNO' ).
"now call the same method which we created at component level to create the select_options...
lo_componentcontroller->create_select_option(
that is all....it works great for me.....let us know if still have any questions....
Thanks...
AS... -
Select options field disable mode
hi all .
i use select-options .
i want disable entries area(select options high ,low)
how can i do ?
Thanks.Hi
i'm talk about WDR_SELECT_OPTIONS .
im set variant in select-option so i want to mustn't change this value
i'm find this method UPD_SELECTION_FIELD but
i don't run it .
CALL METHOD LR_HELPER->UPD_SELECTION_FIELD
EXPORTING
I_ID = 'ZKVJID'
I_WITHIN_BLOCK = MC_ID_MAIN_BLOCK
I_DESCRIPTION =
I_IS_AUTO_DESCRIPTION = ABAP_TRUE
IT_RESULT =
I_OBLIGATORY = ABAP_FALSE
I_COMPLEX_RESTRICTIONS =
I_USE_COMPLEX_RESTRICTION = ABAP_FALSE
I_NO_COMPLEX_RESTRICTIONS = ABAP_FALSE
I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
I_VALUE_HELP_ID =
I_VALUE_HELP_MODE =
I_HELP_REQUEST_HANDLER =
I_LOWER_CASE =
I_MEMORY_ID =
I_NO_EXTENSION = ABAP_FALSE
I_NO_INTERVALS = ABAP_FALSE
I_AS_CHECKBOX = ABAP_FALSE
I_AS_DROPDOWN = ABAP_FALSE
IT_VALUE_SET =
I_READ_ONLY = ABAP_TRUE
I_EXPLANATION =
I_TOOLTIP = -
How to disable the select options button, while audio is playing in the question template in captivate 8?
Apologies for late reply.
I mean "On Question screens audio keeps on playing even after we have selected an option or options depending on the question type and clicked Submit. How do we stop the audio on selecting an option?" -
How to disable maintaining select option
Hello All,
I have select option in my selection screen. When i put some value in my select option and double click on it,one small window gets opened for maintaining select option.
I want to disable this window . Can any one help me out on this.
Thanks in advance.
SumanHi !
Options screen modifications can be done through the below mentioned path
IMG>Personnel Management>Personnel Administration>Customizing User Interfaces>Change Screen Modifications
Enter Module pool name( To know module name select the targeted screen > menu>go to > system >status
Screen Number (To know module name select the targeted screen > menu>go to > system >status )
after updating module pool & screen number , press enter and you will find all the fields that is available and select radio button hide to hide particular field .
Regards
Sheetal -
Disable the select-options dynamically based on value selected in listbox
Hi friends,
I have a peculiar problem in my program.
I have a list box with two values.
1) With Ref to Reservation No.
2) Production order.
I am doing the object for Transfer Posting ( Similar to MIGO).
The contents of the listbox here are acting as the label to my select-options.
I have two select-options in my program.
1) Reservation No (s_rsnum for rsnum)
2) Production Order (s_porder for aufnr)
In runtime, based on the label selected in the listbox, the corresponding select-option should be in visible mode.
for eg: if i select "With ref to Reservation No" S_rsnum should be enabled and vice-versa.Hi,
here an example with listbox:
TABLES: MARA.
PARAMETERS: P0 DEFAULT 'KAUF' LIKE MARA-MTART AS LISTBOX VISIBLE LENGTH 8 USER-COMMAND DUMMY.
SELECTION-SCREEN: SKIP 3.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR MODIF ID DI1.
SELECTION-SCREEN: SKIP 3.
SELECT-OPTIONS: S_MATKL FOR MARA-MATKL MODIF ID DI2.
AT SELECTION-SCREEN OUTPUT.
IF P0 = 'KAUF'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'DI1'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '1'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 EQ 'DI2'.
SCREEN-ACTIVE = '0'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
IF P0 <> 'KAUF'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 EQ 'DI1'.
SCREEN-ACTIVE = '0'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 EQ 'DI2'.
SCREEN-ACTIVE = '1'.
SCREEN-INPUT = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
use your own listbox in If-Clauses.
Regards, Dieter -
Can i have html code for date select options (SEARCH HELP)
Hi frinds,
I have a BSP Page with input as date.
Can i have html code for date select options (SEARCH HELP)
MoosaHi
Please find the sample code below.
FROM DATE
<htmlb:inputField id = "dd"
width = "45%"
type = "DATE"
showHelp = "X" <- Search help
alignment = "CENTER"
maxlength = "10"
disabled = "TRUE"
value = "<%= w_FROMDATE %>" />
TO DATE
<htmlb:inputField id = "dd"
width = "45%"
type = "DATE"
showHelp = "X"
alignment = "CENTER"
maxlength = "10"
disabled = "TRUE"
value = "<%= w_TODATE %>" />
Thanks
kalyan -
How to restrict more than one 1 range in select option on selection screen.
Hi all,
I have a requirement where I need to restrict user from giving more than 1 range for a date selct option ..other all features of multiple selection will be as usual...
for eg we can do this if we disable / hide other cells if the user clicks on multiple ranges tab.. If only 1 cell is available to give the range user will not be able to give more than 1 range....
I was thinking if I could use select_options_restrict but how do i fill its parameters...
Can anyone send me the sample code or the same to achieve this functionality...I have used select_options_restrict to hide multiple ranges itself ... But here user will be able to give range but only 1....
Thanks and Regards
SwetaHI,
Please try the below logic.
SELECT-OPTIONS: so_addr FOR ADR6-SMTP_ADDR NO INTERVALS.
***********remove_range_for_select_option******************* .
DATA: ls_restrict TYPE SSCR_RESTRICT, "The type for SELECT_OPTIONS_RESTRICT
ls_opt_list TYPE SSCR_OPT_LIST, "One list of options
ls_asn TYPE SSCR_***. "One line of table associating selection screen
"object with opt. list
CLEAR: ls_restrict,
ls_opt_list,
ls_asn.
*Only EQ valid, discrete values, Include & Exclude
ls_opt_list-name = 'EQ'.
ls_opt_list-options-eq = 'X'.
APPEND ls_opt_list TO ls_RESTRICT-OPT_LIST_TAB.
LS_ASN-KIND = 'S'.
LS_ASN-NAME = 'SO_ADDR'. "Select Option
LS_ASN-SG_MAIN = 'I'.
LS_ASN-SG_ADDY = '*'.
LS_ASN-OP_MAIN = 'EQ'.
LS_ASN-OP_ADDY = ' '.
APPEND LS_ASN TO LS_RESTRICT-***_TAB.
*Make use of SELECT-OPTIONS easier on the selection screen
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
RESTRICTION = LS_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: Rajasekhar Reddy P on Mar 16, 2009 2:03 PM -
SELECT OPTIONS IN WEB DYNPRO ABAP
Hello experts, im working with select options in a WEB Dynpro.
There are four buttons (cancel,check,reset,copy) that apears above my select option.
My question is: There is a way to hide that buttons?
THANKS!Sure, you can disable them using the SET_GLOBAL_OPTIONS methdo of the IF_WD_SELECT_OPTIONS class. Something like this:
wd_this->m_handler->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 ). -
Select-options in Selection Screen to show more rows for entering values
Hi all,
In my webdynpro abap I have added the SELECT-OPTIONS componenet and working fine.
User need in the Selection Screen for select options more rows to show entering values in single time.
THe Default Rows show only 5 .
user need to change to 10 or 15 Rows to show.
Pl help .
THanks in advance.
DevHi,
Here is the way which I just tested and found working.
This is the main code which needs to be written.
TYPES:
ty_r_vbeln TYPE RANGE OF vbeln,
ty_s_vbeln TYPE LINE OF ty_r_vbeln.
data ls_vbeln type ty_s_vbeln.
field-symbols <fs_range> TYPE INDEX TABLE.
ASSIGN lt_range->* TO <fs_range>.
do 10 times.
APPEND ls_vbeln TO <fs_range>.
enddo.
For further refinement, you can create a input field in view for number of lines to be shown as enabled.
The complete code is as below.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
lo_interfacecontroller = wd_this->wd_cpifc_select_options( ).
DATA lo_r_helper_class TYPE REF TO if_wd_select_options.
lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
Creating range table
DATA lt_range TYPE REF TO data.
CALL METHOD lo_r_helper_class->create_range_table
EXPORTING
i_typename = 'VBELN'
RECEIVING
rt_range_table = lt_range.
Disabling the global options
CALL METHOD lo_r_helper_class->set_global_options
EXPORTING
i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_true.
TYPES:
ty_r_vbeln TYPE RANGE OF vbeln,
ty_s_vbeln TYPE LINE OF ty_r_vbeln.
data ls_vbeln type ty_s_vbeln.
field-symbols <fs_range> TYPE INDEX TABLE.
ASSIGN lt_range->* TO <fs_range>.
do 10 times.
APPEND ls_vbeln TO <fs_range>.
enddo.
Adding the selection field
CALL METHOD lo_r_helper_class->add_selection_field
EXPORTING
i_id = 'VBELN'
I_OBLIGATORY = ABAP_TRUE
I_NO_EXTENSION = abap_false
i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
it_result = lt_range.
Edited by: Jayanthi Jayaraman on Dec 2, 2010 8:29 AM
Maybe you are looking for
-
Having start up issues - unsure if software or hardware
Hello. in February, I bought a reburbished 2014 MacBook Pro with Retina display. Starting from Sunday, it began delaying start up. Today was a lot longer than usual. So I knew there was an issue. I shut it down, and tried to access Safe Mode by holdi
-
ITunes 8.1.1 will not sync
Since iTunes 8.1.1 I just get; The iPod "Phillip's iPod" cannot be synced. An unknown error occurred (-48). The only option it gives you is (OK) and to close the error window. I'm having the exact same problem as of today with my iPod nano 3rd gen on
-
How to automate the schema export task
Hi, I take online backup by exporting the schema 3 times in a day. I want to automate this process. with the help of expdp and linux job schedule to repeate the job daily, how it is possible.... Regards Prabhaker
-
Is occasional awkward behavior acceptable when operating the iphone? I'm asking b/c I haven't had mine for too long and I've come across some strange actions from the phone. Such as: - Refusing to wake up. It goes to an empty grayish black screen whe
-
Enhancing 2LIS_04_P_ARBPL for STATUS of Operation
Hi, I need the status of the operations of the production orders. NOT the status of the production order head(Thats in the attributes of the 0PRODORDER) I thought on enhancing the Datasource 2LIS_04_P_ARBPL for the statusfields. As I see, the status