Multiple Selection
hi gurus,
i am urgent need of the FM used to call the multiple selection option....which we will be using in select-options.
i am using like this because i cant use select-options in my existing module pool program. I could use them only in another screen and not on the the same screen.
please help me out.
Points will be rewarded.
There are 2 ways to create select-option in module pool.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This call subscreen statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to
dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Regards,
Joy.
Similar Messages
-
I'm building a report based on a single table in APEX. The report requires the following.
select user, project, count(start date ), project, count(end date) where date between 01-jan-07 01-feb-07
(simplified to show the idea)
basicaly a count of projects that started between two dates and the ones that ended between the same two dates relating to the user.
I have writen the selects to do both parts and they work BUT is it posible to glue them together in a single statement?
I tried to searching the forum on "multiple selects" but never realy got anything close.
Is it possible to do this type of select? If so does it have a special name (so I can try a search on that name)
Thanks
BjornFirst of all, '11-MAY-06' and '19-MAY-06' are not dates, they are strings. This has some important disadvantages:
1) Oracle has to implicitly convert them to a date, when they are being compared to a date column
2) Your application will be NLS (National Language Support) dependent, so they might break when you change a setting
3) When compared to a varchar2 or other string column, the comparison will give incorrect results. For example: 12-MAY-06 will be between 06-JAN-06 and 18-JAN-06
Bottom line: convert those dates to real dates using the to_date function, or the date 'yyyy-mm-dd' variant.
Back to your question, apparently you don't want to count the number of occurences of CON_ACTUAL_START and CON_SIGN_OFF, but you only want to count them when this date is between the two boundary values. So use the following:
select mli_clo
, count(case when con_actual_start between date '2006-05-11' and date '2006-05-19' then 1 end)
, count(case when con_sign_off between date '2006-05-11' and date '2006-05-19' then 1 end)
...Regards,
Rob. -
How to get multiple selections from jsp page in my servlet
Hello Everyone,
I've a list that allows users to make multiple selections.
<select name=location multiple="multiple">
<option>
All
</option>
<option>
Hyd
</option>
<option>
Dub
</option>
<option>
Mtv
</option>
</select>I want to get the selections made by user in jsp page from my servlet, selections can be multiple too.
ArrayList locList = new ArrayList();
locList = request.getParameter("location");when I do so, I get compilation error as the request returns string type. How do I then get multiple selections made by the user.
Please let me know.For those kind of basic questions it would help a lot if you just gently consult the javadocs and tutorials.
HttpServletRequest API: [http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html]
Java EE tutorial part II: [http://java.sun.com/javaee/5/docs/tutorial/doc/]
Coreservlet tutorials: [http://courses.coreservlets.com/Course-Materials/] -
Get all the values from a multiple select in a multipart form
Hi there!
I am using a form with enctype="multipart/form-data" in order to upload files from the form.
I have read this page: http://commons.apache.org/fileupload/using.html and everything works well for my form.
The only problem is that I can't get all the values from a "multiple select" html object. I get only one value.
Using servlets I have used this method:
public java.lang.String[] getParameterValues(java.lang.String name) But now I have enctype="multipart/form-data" in my form and I can't use this way...
Is there a way to get all the values of a multi-valued parameter?
Thanks a lot!
StefanoHi
I have got solution for this problem so, I am listing here logic
assume tag name of html
<select name="moption" multiple="multiple">
iterate it in as
String moption="";
boolean cnt=true;
while(itr.hasNext())
FileItem fi=(FileItem)itr.next();
if(fi.isFormField())
if(fi.getFieldName().equals("moption"))
if(cnt==true)
moption=fi.getString();
cnt=false;
else
moption=moption+","+fi.getString();
If wants more help then mail me your problem
at [email protected]
Thanks!
Anand Shankar
Edited by: AnandShankar on 6 Nov, 2009 12:54 PM -
All values from multiple select LOV
Hi.
Ik have a customize screen for a chart where a can select days. That works. But i want the standard value to be 'all days', so the user does not have to click all seven days. When i have combobox i use in the where clause:
"and (fieldname = :variable or :variable = '%')"
For a mutiple select i use IN:
"and fieldname IN :variable"
That would make:
"and (fieldname IN :variable or :variable = '%')"
This does not work for a multiple select LOV.
Anu ID how i can make it work???Try the following:
(:variable = '%' or
:variable <> '%' and fieldname in :variable) -
Struts: getting multiple selected values from a select element
Hi Friends,
I am a total newbie with struts,I have manage to run a simple login script,
Now I was wonderingif there is a select box and user has the ability to select multiple values from it how do I get those values in the *Form class
my select tag looks like this
<html:select property="listboxValue" mulitple="mulitple">
...options--
</html:select>
in the ****Form extends ActionForm{....I have setter and getters for getting the value from select box as below
public void setListboxValue(String value){
this.listboxValue = value;
and the getter is
public String getListboxValue(){
return this.listboxValue ;
please never mind the missing brackets and such.
What I was hoping to get to work was something like this
public void setListboxValue(String[] value){
this.listboxValue = value;
but that does not work...If I have the an array being passed,it seems like this method is no even envoked
Please guide me
ThanksI'm having trouble to get in the ActionForm all the selected values in my multiple select. I select all the values by setting to true the selected attribute of all the options in a javascript function. In the ActionForm the variable is String[]. I'm not getting any ClassCastException, but I only receive the first value selected (String array with just one element).
Select definition:
<html:select name="detalleConsultaForm" property="destinatarios" multiple="true" size="8" >
Javascript function:
function validalistarelacion(campo)
{ if (campo.length < 1)
alert("Campo sin valores");
campo.select();
return false;
for (var i = 0; i < campo.length; i++)
campo.options.selected = true;
return true;
ActionForm:
String[] destinatarios;
public String[] getDestinatarios() {
return destinatarios;
public void setDestinatarios(String[] destinatarios) {
this.destinatarios = destinatarios;
What I get:
2006-03-30 12:54:19,899 [ExecuteThread: '10' for queue: 'weblogic.kernel.Default'] DEBUG BeanUtils - setProperty(es.tme.apl.mante
nimientosPlanificados.form.DetalleConsultaForm@59def5, destinatarios, [2320])
2006-03-30 12:54:19,899 [ExecuteThread: '10' for queue: 'weblogic.kernel.Default'] DEBUG ConvertUtils - Convert String[1] to class
'java.lang.String[]'
Thnx -
RE: Getting multiple values from more than one multiple select popup window
I have a button on a JSP of mine that when clicked creates a popup window (right now it is called popup.html) with a multiple select menu.
My question is how do I get all the values selected from the menu into my JSP (sample.jsp) so that I can set each of the values for my bean.
The other problem is that I have more than one select multiple menu.
Please help if you can. Any advice or suggestions here would be greatly appreciated!
Thank you!I realize that I can use request.getParameterValues to get the values selected from my html because I am passing them to the hidden inputs I have and then using the request.getParameterValues to get each of the values.
MY PROBLEM IS WHAT IF I HAVE 4 MULTIPLE SELECTS??? How can I use the same html popup menu to get the values from the 4 different multiple selects????
I look forward to your response.
This code is from my JSP:
<INPUT TYPE="TEXT" NAME="Field1" SIZE="15">
<INPUT TYPE="hidden" name="F1Rad1">
<INPUT TYPE="hidden" name="Permission">
<input type=button name=choice onClick="window.open('optionPicker.html','popuppage','width=250,height=100');" value="Options"></TD>
Here is my optionPicker.html code for the pop up menu:
<html>
<head>
<script language="JavaScript">
function sendValue(s)
var boxSize= s.options[0].value;
var restrict = s.options[1].value;
window.opener.document.addNewForm.F1Rad1.value = boxSize;
window.opener.document.addNewForm.Permission.value = restrict;
window.close();
</script>
</head>
<body>
<center>
<form name=selectform>
<select multiple name=selectmenu size="2">
<option value="large">Large Text Input Area
<option value="restrict">Restricted Access
</select>
<p></p>
<input type=button value="Select Option(s) For Field" onClick="sendValue(this.form.selectmenu);">
</form>
</center>
</body>
</html> -
Problem getting all parameters from multiple select
I have a multiple select option box that's properly displaying all the values. I'm using getParameterValues() to retrieve all of the selections but it returns the string[] with only the first selection made.
JSP:
<select name="selectList" multiple="true" size="2">
<option value="value1"> Select 1
</option>
<option value="value2"> Select 2
</option>
</select>Servlet:
String[] subset = request.getParameterValues("selectList");I think all my code above is fine. Anything else that would cause getParameterValues() to only return the top selected item?
Thanks!The HTML cod is written in incorrect syntax, the browser nor the Server will understand.
If you write it in XHTML then the proper syntax is:
<select name="selectList" multiple="multiple" >
If you write it in plain old HTML then the proper syntax is:
<select name="selectList" MULTIPLE >
(I'm not sure about this HTML syntax, but definitely the XHTML syntax shown above is correct) -
How to perform multiple selection from dropdown list
Hi,
I have developed one application in which i have taken one dropdownbyindex and entered some values in it, now i need to have multiple selection of entries, can any one please suggest how to do these
Regards,
PrasannaA drop-down list is by definition a 1-from-many selector.
Armin -
How to get multiple selected fields in list
Hello all,
I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
Thankx..i want to put the selected fields of list in an array through AS3....
actually......i figured it out how to do that...........
Its simple......use
list.selectedItems[index]
and to get the number of items selected......
list.selectedItems.length
simple..... -
hi
I want to display a report with Multiple Select List like
http://apex.oracle.com/pls/apex/f?p=267:16:
Thanks
Edited by: 805629 on Jan 6, 2011 9:28 PMDid you ever get this answered???
This is exactly what I am looking for! -
Get Selections From ALV on Multiple Selection Mode
Hi,
How can i get values of selected rows from ALV that has selection '0..n' (multiple selection) ?
Can somebody help me pls?
Thanks.Hi Nurullah,
Steps to make multiple rows selectable in ALV:
1) Create the selection property of the node that you are binding to the DATA node as o..n
2) Un-check the, "Initialization Lead Selection" checkbox for the node which you are using to bind to the DATA node
3) In the WDDOINIT method specify the ALV's selection mode as MULTI_NO_LEAD. It is important that you set the selection mode to MULTI_NO_LEAD or else in the end you would be capturing 1 row lesser than the total number of rows the user has selected. This is because 1 of the rows would have the LeadSelection property & our logic wouldnt be reading the data for that row. Check the example code fragment as shown below:
DATA lo_value TYPE REF TO cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model( ).
CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
EXPORTING
value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.
Steps to get the multiple rows selected by the user
In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it. Check the example code fragment below:
METHOD get_selected_rows .
DATA: temp TYPE string.
DATA: lr_node TYPE REF TO if_wd_context_node,
wa_temp TYPE REF TO if_wd_context_element,
ls_node1 TYPE wd_this->element_node_flighttab,
lt_node1 TYPE wd_this->elements_node_flighttab.
lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
" This would now contain the references of all the selected rows
lt_temp = lr_node->get_selected_elements( ).
LOOP AT lt_temp INTO wa_temp.
" Use the references to get the exact row data
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1.
APPEND ls_node1 TO lt_node1.
CLEAR ls_node1.
ENDLOOP.
ENDMETHOD.
Hope this helps resolve your problem.
Regards,
Uday -
Passing multiple select value from BI publisher to PL/SQL functions
Hi - I have designed a report which pass parameters (Multi select) into a function to get the output result. When a single parameter value is passed to the function, report is being displayed. When multi select value is passed to the function it is returning the error `wrong number or types of arguments in call to 'F_PROCESS_WAVE_DATA'. When i checked the parameters passed to the function, i can see each multi select value is treated as different value and is assigned to different parameter in the function.
Any help on passing the multi select parameter into function will be helpful.
Regards,
Vikram.All - Issue was resolved. I followed the following steps to resolve the issue
1. Create a PL/SQL table type variable as VARCHAR2 in the database - Say as Larray
2. Create PL/SQL type record and table for the record in database. Lrec, Ltable
3. In BI report pass multiple select LOV variable as Larray(variable).
4. In DB function, Parameter should be defined as LARRAY.
5. Return PL/SQL table type Ltable from the function.
Regards,
Vikram. -
Multiple select options in 1 drop down box?
Hi,
I have created a form that works perfectly except for the fact that I need to provide multiple select options in the 1 drop down box; for example, I'm asking what product the customer is interested in and his answer could be multiple items such as Soap, Sanitizer, Hand Towels, Face Cloths etc...
At the moment, the customer can only select 1 item not multiple.
Is this possible?
Thanks in advance for the help!Hi,
It is not possible to allow the user to select multiple items in a dropdown list.
You could use a list box, which does allow multiple selections.
Good luck,
Niall
Assure Dynamics -
[Help] Multiple Selection at Select Options.
People, I've coded following Select Options:
DATA: g_created TYPE zapomatxref-erdat,
g_modif TYPE zapomatxref-aedat,
g_matnr TYPE zapomatxref-pr1_material.
SELECT-OPTIONS: s_creat FOR g_created,
s_modif FOR g_modif,
s_matnr FOR g_matnr OBLIGATORY.
Thing is, when I execute the program and hit the Multiple Selection, an error pops up saying "Fill in all required fields".
I know it goes through PBO validating that OBLIGATORY so I can't enter the multiple selection screen.. But is there a way to enter the multiple selection screen without changing the OBLIGATORY adition ?
Thanks in advance.
PS: This is an executable program, not module pool. Also I want to enter Mutliple Selection screen without filling s_matnr.Guys, solved the problem. You have to remove the OBLIGATORY addition and set the following code.
("Percentage symbol" below is the traditional percentage centessimal symbol we know, the mozilla wont let me insert it...)
TOP Include:
CONSTANTS: c_per002 TYPE c VALUE '(percentage symbol)002'.
MAIN PROGRAM:
AT SELECTION-SCREEN ON s_matnr.
IF sy-ucomm NE c_per002.
IF s_matnr[] IS INITIAL.
MESSAGE e025(ycapo).
ENDIF.
ENDIF.
START-OF-SELECTION.
PS: c_per002 comes to be the sy-ucomm value when hitting Multiple Selection Button at Selection Screen.. As any action validates the whole screen, you just set a clause when you don't want to validate if sy-ucomm not equals (different from) c_per002. -
SELECT-OPTIONS Multiple selection
Hello
I have the following line of code:
SELECT-OPTIONS: p_matnr FOR mara-matnr.
The users would like to use the multiple selection button to paste/upload from the clip board but unable until at least one entry is entered before the multiple selection will work. Is there a way for the multiple selection to work without entering a material?
THANKSHi Gary, Clicking the button shown below bring up the multiple selection screen without requiring a value. Do not add the obligatory keyword on the select-options statement as pointed out by Ramon.
see below:
Maybe you are looking for
-
Hi, I recently had to get a new hard drive for my Mac, and everything had to be put back onto my computer from an external hard drive. Apparently, due to the bad state of my old laptop hard drive, each file/photo had to be manually put onto the exter
-
Pl explain me the transfer of requirement???
-
when i am connecting ipod with laptop, an error is coming that "this ipod cannot be used because the apple mobile device services is not started??? please revert.
-
Any help
-
2009 MacBook Pro on Snow Leopard crashes when operating on battery only. Works fine when plugged in. The battery holds a charge as indicated by the battery monitor in the menu bar and the green lights on the side. Is this a hardware issue/battery i