Bulk select with varying values ?
How do we implement bulk collect when the where condition varies ?
Here is a sample code...
I've problems with get_values procedure..
declare
type col1_type is table of number;
type col2_type is table of varchar2(30);
v_col1 col1_type;
v_col2 col2_type;
procedure get_values( p_col1 col1_type, p_col2 in out col2_type ) is
begin
forall j in p_col1.first .. p_col1.last
select col2
into p_col2
from temp2
where col1 = p_col1(j);
end;
begin
select col1, col2 bulk collect into v_col1, v_col2 from temp1;
for i in v_col1.first .. v_col1.last loop
dbms_output.put_line( v_col1(i) || ' ' || v_col2(i));
end loop;
get_values(v_col1, v_col2);
for i in v_col1.first .. v_col1.last loop
dbms_output.put_line( v_col1(i) || ' ' || v_col2(i));
end loop;
end;
But my question was How can we pass an variable which hold multiple values( as shown in the example which is bold) and fetch the return values for all the values in the variable using FORALL OR RETURNING OR BULK COLLECT.
declare
type col1_type is table of number;
type col2_type is table of varchar2(30);
v_col1 col1_type;
v_col2 col2_type;
procedure get_values( p_col1 col1_type, p_col2 in out col2_type ) is
begin
/* How can we implement this using bulk without looping through each element of the variagle p_col1. I know it can done using for j in p_col1.first .. p_col1.last
loop ............ end loop; */
forall j in p_col1.first .. p_col1.last
select col2
into p_col2
from temp2
where col1 = p_col1(j);
end;
begin
select col1, col2 bulk collect
into v_col1, v_col2
from temp1;
for i in v_col1.first .. v_col1.last loop
dbms_output.put_line( v_col1(i) || ' ' || v_col2(i));
end loop;
get_values(v_col1, v_col2);
for i in v_col1.first .. v_col1.last loop
dbms_output.put_line( v_col1(i) || ' ' || v_col2(i));
end loop;
end;
Similar Messages
-
Replacing the same value in a string with varying values
If I have a string:
"%s is the %s I am referring to"
and - I want to replace the %s occurrences with DIFFERENT values... what's the best way to do this.
I was thinking parsing it into seperate strings using substr and instr but, I'm not sure if that's overkill or not.
Replace is ideal but - it replaces every occurrence so - you can state just replace the first occurrence with one value and the second with another (i.e. if the desired result after replacing the above string was supposed to be "This is the string I am referring to"
Any help is appreciated.
ThanksHi,
wtlshiers wrote:
If I have a string:
"%s is the %s I am referring to"
and - I want to replace the %s occurrences with DIFFERENT values... what's the best way to do this.Whenever you have a question, please post CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data.
Explain how you get those results from that data.
Always say which version of Oracle you're using (e.g. 11.2.0.3.0).
See the forum FAQ {message:id=9360002}
I was thinking parsing it into seperate strings using substr and instr but, I'm not sure if that's overkill or not.Depending on your requirements, you might need to do that.
Replace is ideal but - it replaces every occurrence so - you can state just replace the first occurrence with one value and the second with another (i.e. if the desired result after replacing the above string was supposed to be "This is the string I am referring to"As you said, REPLACE changes all occurrences. There's no way to tell it (for example) to change only the first one.
REGEXP_REPLACE, is a lot more flexible. It does have an option for giving a specific occurrence, but you may not even need that feature. You might just want something like
REGEXP_REPLACE ( '%s is the %s I am referring to'
, '(.*)%s(.*)%s(.*)'
, '\1This\2string\3'
)It all depends on your data and your requirements.
Are the new values (such as 'This' and 'string') fixed, or can they change from row to row?
Will you always have 2 (or some known number) of '%s's in the original string?
Does '%' always signal something that is to be replaced? If not, how can you tell when it does and when it doesn't?
Does 's' always come right after '%'? If not, what are the possibilites, and what do the different characters signify? -
SAP BI & ABAP: Select with multi values
Hi all experts,
I'm pretty new in this forums, and i have a variable with customer exit, multiple values. This variable return several closing date (MM.YYYY) for a input plant. Below my sample code:
WHEN 'VARIABLE_NAME'.
CHECK i_step = 2.
*a plant
CLEAR w_plant.
*a project
CLEAR w_project.
*a version
CLEAR wt_version.
*a closing period for a budget
CLEAR w_cloper.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'plant_input'.
w_plant = loc_var_range-low.
w_project = loc_var_range-low(7).
ENDLOOP.
CALL FUNCTION 'CONVERSION_EXIT_PROJ_INPUT'
EXPORTING
input = w_project
IMPORTING
output = w_project.
SELECT * INTO TABLE w_version_table
FROM version_table
WHERE project = w_project. --> in this step i have multi value in my internal table.
If sy-subrc = 0.
LOOP AT w_version_table INTO wt_version_table.
CLEAR l_s_range.
l_s_range-low = wt_version_table-o_cloper.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range. --> in this step i get single value, last value in the internal table.
ENDLOOP.
ENDIF.
My code work it, but my variable return a single value. Which part of code i changed it to get all values.
Best regards.
DaousHi Daous,
if this is a BI question, would you mind posting it in one of the forums for BI & Analytics?
This here is really about search...
Best, Karsten -
Hi All,
I have custom table with field that contains the * (star) values . ie
ABC*123
AB*1234
A*12345
A%12345
a&12345
I need to get values of all * entries using a select statement.
I don't need to select all and loop thru and filter it out
Any suggestions ?
Thanks
aRsHi,
You can build a wildcard ranges and please try something like this.
r_wildcard-sign = 'I'.
r_wildcard-option = 'CP'.
r_wildcard-low = 'B*'.
append r_wildcard.
r_wildcard-sign = 'I'.
r_wildcard-option = 'CP'.
r_wildcard-low = '*B*'.
append r_wildcard.
select * from mara
into table gt_mara_b
where mtart = 'YSAB'
and matnr in r_wildcard.
Regards,
Ferry Lianto -
Hi,
I want to use SELECT....INTO TABLE statement but using a fixed value in one column, is that possible???
I'm trying to do something like this:
SELECT matnr "sy-datum" quantity FROM ztable INTO TABLE it_table.
The it_table has got 3 columns: matnr, date and quantity but in the ztable there isn't a date and I want to insert into the table with a variable or something...
ThanksHi,
you can do like this.
Suppose your internal table structure is like that,
data:begin of itab occurs 0,
matnr type mara-matnr,
datum type sy-datum,
quant type menge,
end of itab.
SELECT matnr quant FROM ztable INTO corresponding fields of TABLE it_table.
loop at itab .
itab-datum = sy-datum.
modify itab index sy-tabix.
endloop.
If you do like this then your column of itab-datum will have sy-datum .
I hope this will help you.
Help children of U.N World Food Program by rewarding them and encourage others to answer your queries -
How to convert MM:SS into Seconds with varying values of Minutes length.
I have one table in Oracle where there is one Column "Duration" and it is having entries like
59:00,
30:00,
59:05
30
120:45
etc.
These entries are in Minutes and Seconds with MM:SS Format.Where MM:SS stands for Minute and SS is seconds only.
Minutes can be of Length 1 (i.e. 01:00) of Length 2 (18:00) of Length 3 (i.e. 200:00) of Length 4 (i.e. 1440:00).
I need to convert these Minutes (MM:SS) only into Seconds and want seconds as it is using SQL Query.
Note:-Here Duration will be in MM:SS format like 65:06,100:00,1200:30
Minutes or it can be in seconds also 50,30 etc.
DURATION column is VARCHAR2 and database is Oracle.
Please suggest SQL Query and help me to convert it as it is needed badly.
Thanks in Advance for Help and Inputs.Looking forward for all kind of Help.What yaar..
I fforgot to multiply with 60
sql>
select duration,nvl(to_number(substr(duration,1,instr(duration,':')-1)),0)*60 mts_to_sec,
nvl(to_number(substr(duration,1,instr(duration,':')-1)),0)*60+
to_number(substr(duration,decode(instr(duration,':'),0,1,instr(duration,':')+1))) tot_sec
from t;
DURATION MTS_TO_SEC TOT_SEC
1:30 60 90
10:30 600 630
100:00 6000 6000
5512 0 5512
08:30 480 510
1440:00 86400 86400
Message was edited by:
jeneesh -
How to loop with varying values depending on where you are in the loop
Hi,
I have need of loops / nested loops that pick different figures depending on where you are in the loop.
The whole function needs to run through 'ml' times. 'ml' is a dynamic figure.
Loop 1 = While the loop is within the first 12 iterations, 'exconemp' must equal 100. For iterations 13 - 24, 'exconemp' must equal 102.5, for 25 - 36 it will be 105.06, for 37 - 48 it will be 107.69. This needs to change every 12th iteration until it has reached 'ml'. The calculation takes the value of the previous 'exconemp' and then multiplies that by 0.025.
Loop 2 = While the loop is within the first 120 iterations, 'abc' must equal 0.015 and any further iterations must use 0.01. This must also work in a way to figure out whether 'ml' is higher or lower than 120 and work accordingly.
My main issue is this - how do I get the loops to run through as this:
While the iteration is < 12, do this, THEN take the final figure (12th iteration) and start on 13 - 24, do this THEN etc etc.
How do I produce a THEN statement? I can get the code to pick up the final values, but not change along the way.
I think that I may be better creating an array for Loop 1, but I am not entirely convinced of this. I also think it would be better/tidier if I can get 'month 1 total' and 'month 2 total' into the loops, but am not sure on how to do this.
The values that I need to produce are (only first 36 shown):
1 - 12 = 125.55, 251.65, 378.31, 505.52, 633.29, 761.63, 890.53, 1019.99, 1150.03, 1280.63, 1411.81, 1543.57
13 - 24 = 1679.05, 1815.12, 1951.79, 2089.06, 2226.93, 2365.41, 2504.50, 2644.20, 2784.52, 2925.45, 3067.00, 3209.18
25 - 36 = 3355.19, 3501.85, 3649.15, 3797.11, 3945.71, 4094.96, 4244.87, 4395.44, 4546.68, 4698.57, 4851.14, 5004.38
var ml = 240 // dynamic figure, multiple of 12 up to 780
var exconemp;
var exconem = 100;
var inf = 0.025;
var tree;
var tec;
var power;
var fvis;
var abc;
var fvee;
var tfv;
function myfunction() {
//Loop 1
//while (ml <= 12) {
exconemp = exconem;
//while (ml > 12) {
// exconemp = exconem*inf;
//end Loop 1
trace("exconemp=", exconemp); // employees contribution
tree = exconemp/(1-0.2)-exconemp;
tec = exconemp + tree;
trace("tree", tree);
trace("tec", tec);
power = Math.pow(1+0.07, 1/12);
//Loop 2
//while (ml <= 120) {
abc = 0.015;
//while {
//abc = 0.01;
//end Loop 2
fvis = power*(1-abc/12);
trace("fvis=", fvis);
fvee = tec*fvis;
trace("fvee=", fvee); // month 1 total
tfv = (tec+fvee)*fvis;
trace("tfv=", tfv); // month 2 total
for (var i:Number = 0; i < ml; i++)
tfv = (tec+tfv)*fvis;
trace("tfvloop=", tfv);
I hope that I have explained this well enough.
Many thanks in advance.I think this will do it although I am not quite getting the numbers you posted.
stop();
var ml = 48; // dynamic figure, multiple of 12 up to 780
var exconemp;
var exconem = 100;
var inf = 0.025;
var tree;
var tec;
var power;
var fvis;
var abc = 0.15;
var fvee;
var tfv;
myfunction();
function myfunction()
exconemp = exconem;
for(var index:uint = 1; index <= ml; index++)
trace(index + "--------------------------------");
tree = exconemp/(1-0.2)-exconemp;
tec = exconemp + tree;
power = Math.pow(1+0.07, 1/12);
fvis = power*(1-abc/12);
fvee = tec*fvis;
if(index == 1)
trace("month 1 total=", fvee);
else if(index == 2)
tfv = (tec+fvee)*fvis;
trace("month 2 total=", tfv); // month 2 total
else
tfv = (tec+tfv)*fvis; //now that we are here the tfv self perpetuates on itself
trace("month " + index + " total=", tfv); // month n total
if(index % 12 == 0)
exconemp = exconemp*(1+inf);
trace("changed exconemp to: " + exconemp);
if(index % 120 == 0)
abc = .01;
trace("changed abc to: " + abc); -
Not printing do_sum value in output while selecting layout variant
Hi experts,
I had created layout variant for selection screen . if i dont put layout variant it show proper output with do_sum value(TOTAL), but when i save screen layout variant as both default and user-specific , it gives output but the field having do_sum value in fieldcatlog is not showing do_sum vaule(TOTAL), it show all record but not there total. So please tell me what should be done to show the do_sum value(Total).
Thanks In Advance,
AshishHi Anish,
Try using gs_layout-no_totline = ' '.
Thanks,
Regards
Kiran -
Dynamic variant for select option High value
Hi ,
Please help me in creating dynamic variable for a select option date field high value.
II tried the following method:
1. Enter the values in the selection screen
2. Save the variant using the SAVE button
3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
5. Click on the down arrow button and select the option 'Current Date'.
5. Save the variant.
But it is saving the date value in Field LOW of select option( From value).
I need it in TO field( High value).
Please help.
regards,
SheebaHi Sheeba
we can do it other way .. Select the same steps as you have done but after the assigning the value current date to low ..click on the selection option push button at the application bar and choose the 'less than or equal to' option to your select option value and try the same ....
I guess this would throw you same results as that of the value in the high value button
Cheers,
Jacks. -
Call program using submit with variant that changing value
Hi All,
I need to call a report with variant and abstract the data back to my current program.
so far,
i use following method
SUBMIT RFITEMAR USING SELECTION-SET 'XXX'
EXPORTING LIST TO MEMORY
AND RETURN.
DATA list_tab TYPE TABLE OF abaplist.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
DATA: L_ABAPLIST LIKE ABAPLIST OCCURS 0.
DATA: BEGIN OF L_ASCITAB OCCURS 0,
LINE(2048),
END OF L_ASCITAB.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = L_ASCITAB
LISTOBJECT = list_tab
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
However, the problem is that i need to get some value from variant 'XXX' and keep changing it.
I have try function module "RS_VARIANT_VALUES_TECH_DATA" to get the variant details.
But, it just doesn't get me back all the details of the variants.
Are there any way i could read the variants in detail? i even try to read LRAW data from table vari. but there are no function module to convert the LRAW to either char or STRING.
Thanks.
Edited by: simplekx on Jun 20, 2011 4:43 PMYou can use the FM "RS_CHANGE_CREATED_VARIANT" to change the variant values for already created variant and the FM "RS_VARIANT_CONTENTS" to get the variant values. Instead of changing the variant values and then passing to the Submit, you can directly pass the values to the Submit through..WITH SELECTION-TABLE seltab or ... WITH p IN sel variant of the Submit.
-
When we execute transcation selection-screen should come with some values
hi gurus,
My requirement is whenever user executes a particular transaction,
selection screen should appear with some values by default.
can you suggest me in solving this problem.
its urgent.
thanks,
Bhanu.RHi,
for that do like:
A transaction with a variant can have its own transaction code, which you can then use to execute the transaction with the appropriate variant.
To create a variant transaction, proceed as follows:
Choose Goto ® Create vari. trans. from the initial transaction variant maintenance screen.
Enter a transaction name and corresponding short text. Transaction type Variant transaction is already set. The following screen already contains default values for the name of the calling transaction, the variant name, and the client-specific or cross-client variant checkbox.
Save your entries.
Example:
Variant ABC has been defined for transaction Z000. We now want to create the variant transaction ZVAR.
Name of the new transaction: ZVAR
Name of the calling transaction: Z000
Name of the variant: ABC
Transaction ZVAR starts transaction Z000 with variant ABC.
If the variant specified for a variant transaction does not exist (in the current client), then the calling transaction will be started without variant.
Regards,
Renjith Michael. -
Variants -- with changing value!!!
Hi,
I want to run a program by using the SUBMIT keyword and passing a variant using USING SELECTION-SET <variant name>
And the variant changes its values for each execution of the SUBMIT statement.
According to the replies to a similar question posted in this forum, I found that we can have constant input values in a VARIANT and pass the changing values using the WITH keyword.
is there any other way to achieve this other than the above solution..........
any help wud greatly be appreciated.!!!!!Hmm, you could set up multiple variants and change which variant you call the program with each time you SUBMIT. Example:
SUBMIT program_name USING SELECTION-SET variant1 AND RETURN.
SUBMIT program_name USING SELECTION-SET variant2 AND RETURN.
(and so on).
Another way to do it is to specify the fields separately, like this:
SUBMIT program_name WITH parameter1 = w_field1 AND parameter2 = w_field2
AND RETURN.
You can use this same statement multiple times, changing the values of w_field1 and w_field2 between calls (for instance, by putting the submit statement inside a LOOP, ENDLOOP). I hope this helps.
- April King -
Creating F4 help with customized values in selection screen
Hi Dear friends
In my report i have two input flds at selection screen i.e. sales order no and date description.Now based on sales order no the F4 help in the fld date description should change dynamically.eg. if there are two sales document number 001 and 002 and the corresponding date description for 001 are 123 and 234 and for 002 are 987 and 876 .Then if i select 001 the F4 help in date description should contain 123,234 and for 002 it should contain 987,876 before pressing the execute button.How to achieve this. Plz help me. i tried to use AT-SELECTION SCREEN ON VALUE REQUEST event but its not giving any out put as in the SELECT query i putted a WHERE condition where sales document of the database table equals to the sales order inserted in the selection screen. But when i debugg the input sales order parameter shows blank.Try this way
REPORT ZVENKAT_F4_FOR_PARAMETERS MESSAGE-ID zmsg .
TYPES:
BEGIN OF t_t001w,
werks TYPE t001w-werks,
name1 TYPE t001w-name1,
END OF t_t001w,
t_return_tab TYPE ddshretval.
DATA:
w_t001w TYPE t_t001w,
w_return_tab TYPE t_return_tab.
DATA:
i_t001w TYPE STANDARD TABLE OF t_t001w,
i_return_tab TYPE STANDARD TABLE OF t_return_tab.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS :p_werks TYPE t001w-werks,
p_name1 TYPE t001w-name1.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
PERFORM f4_help_for_palant.
*& Form f4_help_for_palant
FORM f4_help_for_palant.
DATA:
w_dynpfields TYPE dynpread,
i_dynpfields LIKE STANDARD TABLE OF dynpread.
IF i_t001w[] IS INITIAL.
SELECT werks name1
FROM t001w
INTO TABLE i_t001w.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_WERKS'
value_org = 'S'
TABLES
value_tab = i_t001w
return_tab = i_return_tab.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE i_return_tab INTO w_return_tab INDEX 1.
p_werks = w_return_tab-fieldval.
READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
IF sy-subrc = 0.
w_dynpfields-fieldname = 'P_NAME1'.
w_dynpfields-fieldvalue = w_t001w-name1.
APPEND w_dynpfields TO i_dynpfields.
CLEAR w_dynpfields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = i_dynpfields.
ENDIF.
ENDFORM. " f4_help_for_palant
Thanks
Venkat.O -
Select Query with minimum values
Table name: employess_inout
Column name: employee_code number(data type)
IN_Time date(data type)
Out_time date(data type)
i want to select only in_time coloumn data with min intime as in one date A employee have more then 2 times in_time entry
example
employee_code in_time out_time
1 18-mar-12 08:15:21 18-mar-12 13:02:01
1 18-mar-12 14:07:46 18-mar-12 18:01:32
1 19-mar-12 09:15:11 19-mar-12 12:58:54
1 19-mar-12 14:10:01 19-mar-12 16:21:57
1 19-mar-12 16:53:37 19-mar-12 18:15:33
In above example I only want to select in_time column values which is minimum as 18-mar-12(08:15:21) like wise in date 19-mar-12 minimum value is 09:15:11.
Please write the script.
thanks in advanceDear Frank Kulash
the Script is
Select ei.emp_code,p.ename, d.department_name, ds.designation_name,
to_char(ei.intime, 'dd') "IN_Date",
to_char (ei.intime,'hh24:mi') "IN_Time" /*here i used "min" but not solved*/
FROM einout ei, personnel p,departments d, designations ds
where ei.emp_code = '470'
and intime between to_date ('01/03/2012 08:10', 'dd/mm/YYYY hh24:mi')
and to_date ('21/03/2012 10:00','dd/mm/YYYY hh24:mi')
and ei.emp_code = p.emp_code
AND p.dept_code = d.dept_code
and p.desig_code = ds.desig_code
group by ei.emp_code,p.ename, d.department_name, ei.intime,ds.designation_name --, ei.outtime
order by ei.intime, ei.emp_code asc;
Out Put
EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
*470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 08:58*
*470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 14:04*
*470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 15:11*
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
*470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 19:39* 470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 08 12:16
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 09:26
*470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 09 14:08*
I want to take out put
like that
EMP_CODE ENAME DEPARTMENT_NAME DESIGNATION_NAME IN_Date IN_Time
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 01 09:15
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 02 08:58
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 03 09:06
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 05 17:07
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 06 09:47
470 GHULAM YASSEN INFORMATION TECHNOLOGY OFFICER 07 09:36
I only need min time (value) once of A date.
[Bold rows are no need in output]
please tell how it will be possible -
Populating select list in a JSP with enumeration values
I'm working on a JSP in which I need to populate a select list with enumeration values.
Everytime I'm trying to insert these values (using enum.nextElement()) in a select box only the first enumerated value gets inserted correctly, the rest of the values shows up outside the select list. I would appreciated any help...thanks!!!I'm not exactly sure how your generating your list to begin with, however the following code will work:
<form>
<select>
<%
java.util.Vector v = new java.util.Vector();
for(int i=0;i<12;i++){
v.addElement(new Integer(i));
java.util.Enumeration enum = v.elements();
while(enum.hasMoreElements()){
Object obj = enum.nextElement();
out.println("<option name='"+obj+"'>"+obj+"</option>");
%>
</select>
</form>Anthony
BTW does anyone know why the greater than symbol never renders properly in these forums when text is encapsulated in the code tag?
pre:
>code:
>
Maybe you are looking for
-
How can I see spouse, child and assistant names on my iphone
When I sync my address book all the contacts sync fine but the children and spouse fields don't sync with my iphone. This kind of odd since they show up fine in my address book. I look inside my iphone contacts and spouse or children isn't even field
-
Can view thumbnails - but can't open photos
I have iPhoto 5 & OS 10.3.9 (I don't know if 5 came with my iBook G4 or if it was an Apple download upgrade from an earlier version.) In 3 years I've rarely used iPhoto, since I normally use the software that came with the camera (Canon). However, th
-
I am running Windows 7 . It happened without any changes being made. I downloaded the install file several different times and even turned off my Kaspersky A/V when I installed.
-
I have say 2 classes - A and B which has the method doSomething() I have an array of objects - Object[] obj wihch has both A and B. How can i invoke doSomethin() of the respective class without any hard coding or typechecking inside the loop.
-
How to set the focus to the tabbed pane title?
Dear Friends, I'm using tabbed pane (JTabbedPane) in my application. I have 2 tabbed panes and each contain some text fields and buttons. In first tabbed, I have 2 text fields, OK and Cancel buttons. I have to set the focus to the title of the tabbed