How to get all values in the range of select option into internal table?
Hi,
I need to capture all entries coming in the range of select option into one internal table.
How to do get that?
For E.g
select-options: matnr for mara-matnr.(select option)
IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
Regards,
Mrunal
Hello Mrunal Mhaskar ,
What i understand you can do one thing go in debug mode
Try this code : -
LOOP AT s_matnr_ex.
IF s_matnr_ex-low IS NOT INITIAL.
i_matnr-matnr = s_matnr_ex-low.
i_matnr-option = s_matnr_ex-option.
APPEND i_matnr.
CLEAR : i_matnr.
ENDIF.
ENDLOOP.
LOOP AT s_matnr_ex.
IF s_matnr_ex-high IS NOT INITIAL.
i_matnr-matnr = s_matnr_ex-high.
i_matnr-option = s_matnr_ex-option.
APPEND i_matnr.
CLEAR : i_matnr.
ENDIF.
ENDLOOP.
In the i_matnr table high and low values are there.
Regards,
Vandana.
Similar Messages
-
Move the data in select options to internal table
I have the code as in the fillowing
SELECT-OPTION:S_MATNR FOR MARA-MATNR.
DATA:BEGIN OF IT_MATNTR OCCURS 0,
MATNR LIKE MARA-MATNR,
END OF IT-MATNR.
NOW HOW CAN I ADD THE MATNER VALUES IN THE SELECT-OPTIONS IN INTERNAL TABLEHi Vamsikrishna,
Yes. You can move the values from S_MATNR to IT_MATNR.
you can try either it_matnr[] = s_matnr[].
if not then you can loop in to the select-options as follows.
Define LS_MATNR as a structure type of s_matnr.
Define LS_IT_MATNR as a structure type of it_matnr.
LOOP S_MATNR INTO LS_MATNR.
MOVE LS_MATNR to LS_IT_MATNR.
APPEND LS_IT_MATNR to IT_MATNR.
CLEAR: LS_MATNR, LS_IT_MATNR.
ENDLOOP.
<b>Reward points for helpful answers.</b>
Best Regards,
Ram. -
How to get all values from an interval using select statement
Hi,
Is it possible to write a select statement that returns all values from an interval? Interval boundaries are variable.
something like this:
select (for x in 1,1024 loop x end loop) from dual
(this, of course, doesn't work)
The result in this example should be 1024 rows of numbers from 1 to 1024. These numbers are parameters, so it is not possible to create a table with predefined values.
Thanks in advance for your help,
Mia.For your simple case, with a lower boundary of 1, you can use:
SELECT rownum
FROM all_objects
WHERE rownum <= 1024For a set of number between say 50 - 100, you can use something like:
SELECT rownum + (50 - 1)
FROM all_objects
WHERE rownum <= (100 - 50 + 1)Note, that all_objects was used only because it generally has a lot of rows. Any table with at least the number of rows in your range will work.
TTFN
John -
How to get multiple values from the db using select
hi all,
i am using oracle 9i database
i created a procedure
create or replace procedure sample_proce
as
to_i varchar2(50)
begin
select to_id into to_i from sample where flag in('y');
dbms_output.put_line('hai'|| to_i);
end;
when i executed this procedure the following error occurred.
error at line 5 fetching too many rows.
but when i execute the select query alone i can able to view all the rows.
how to resolve iti used the following procedure
create or replace procedure sample_proc
as
begin
for s in(select to_id from sample where flag='y')
loop
dbms_output.put_line(s.to_id);
end loop.
end;
it is executed fine. i can able to fetch all the rows.
how to pass all these values into the another procedure.
we usually pass only one value into another procedure, i do no how to pass all the values . please help me.
Thank u. -
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to check if all values from a dataset has come to an internal table
How to check if all values from a dataset has come to an internal table ?
Hi,
After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
For e.g.
OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
WRITE :/ 'No such input file' .
EXIT.
ELSE.
READ DATASET p_inpfile INTO loc_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
CLEAR loc2.
*Spliting fields in the file-
REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
SPLIT wa_string AT const INTO loc2-pernr
loc2-werks
loc2-persk
loc2-vdsk1.
Hope you get some idea.
Thanks,
Sakthi C -
How can i get all values from jtable with out selecting?
i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
thanks in advance.
rajaYou could set the table's data model to be the same:
output2.setModel( output1.getModel() ); -
How to get a value from the previous element (XSLT/XPATH gurus ahoy!)
Hi All,
I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
Here's a simplified data example to illustrate the problem.
<ROW>
<START_DATE>01-01-1980</START_DATE>
<END_DATE>01-01-1988</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-1988</START_DATE>
<END_DATE>01-01-1990</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-2000</START_DATE>
<END_DATE>01-01-2005</END_DATE>
</ROW>
With the data above, I should print two lines:
01-01-1980 - 01-01-1990
01-01-2000 - 01-01-2005
I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
Thanks & Regards, Matildause this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
How to get all values in an object?
Hi there,
I have some object with values in it. Then i pushed all these
values in an Array.
But how can i go through all the values in the array?
I tried this:
for each (var something:* in allTypes) {
trace(something);
and
for (var key:String in allTypes) {
trace(allTypes[key]);
But i don't get to see the file extensions.
I want to write some code that if a file extention does not
match any of the extensions
in the array then do something.
Can someone help me out please?
var imageTypes:FileFilter = new FileFilter("Images (*.jpg,
*.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
var textTypes:FileFilter = new FileFilter("Text Files (*.txt,
*.rtf)", "*.txt; *.rtf");
var vidTypes:FileFilter = new FileFilter("Video Files
(*.flv)","*.flv");
var allTypes:Array = new Array(imageTypes, textTypes,
vidTypes);Hello Mrunal Mhaskar ,
What i understand you can do one thing go in debug mode
Try this code : -
LOOP AT s_matnr_ex.
IF s_matnr_ex-low IS NOT INITIAL.
i_matnr-matnr = s_matnr_ex-low.
i_matnr-option = s_matnr_ex-option.
APPEND i_matnr.
CLEAR : i_matnr.
ENDIF.
ENDLOOP.
LOOP AT s_matnr_ex.
IF s_matnr_ex-high IS NOT INITIAL.
i_matnr-matnr = s_matnr_ex-high.
i_matnr-option = s_matnr_ex-option.
APPEND i_matnr.
CLEAR : i_matnr.
ENDIF.
ENDLOOP.
In the i_matnr table high and low values are there.
Regards,
Vandana. -
UDF: how to get a value in the previous record when lopping over records?
Hello
I have this challenge:
Source message:
<row>
<ID>111</ID>
<Score>200</Score>
<Date>2010-01-01</Date>
</row>
<row>
<ID>111</ID>
<Score>230</Score>
<Date>2010-01-02</Date>
</row>
<row>
<ID>112</ID>
<Score>230</Score>
<Date>2010-01-03</Date>
</row>
etc...
Now the case is, that IF the value of ID of the current record (row) is equal to the value of the ID of the previous record AND the Score value of the current record is bigger than the Score value of the previous record THEN a record in the target message must be created with these values:
Target Message:
<row>
<ID_target> value of source ID </ID_target>
<Score_yesterday> Score value of previous record (day) </Score_yesterday>
<Score_current_date> Score value of current record </Score_current_date>
<Date_current> Date of current record </Date_current>
</row>
I am thinking of using GlobalContainer to store the previous values but am note sure how to maintain these previous values. In addition, I am thinking about using a UDF on the target row record, which will just create the row, if conditions are met (result.addValue("");) and then just make a simple mapping of the ID_target, Score_current_date and Date_current fields and make an other UDF for the Score_yesterday field where I get the Score for the previous record using the GlobalContainer value, that I stored in the other UDF.
BUT:
Should I use "All values of context" or "All values of Queues" in the UDF used on the row record and how do I make sure, that the Score_yesterday global container value is maintained correctly? I am planning of setting it in the UDF used on the Target row record but will it then be in sync with the consuming UDF of the Score_yesterday field?
Java code to go into the UDF would be very much appreciated
Mikaelint tmp1;
int tmp2;
int len = ID.length;
for(int i =0;i< len;i++)
if( i!= len-1)
tmp1 = Integer.parseInt(Score<i>);
tmp2 = Integer.parseInt(Score[i+1]);
if(tmp2 >tmp1)
if (TARGET[0].equals("ROW"))
result.addValue("");
else if (TARGET[0].equals("ID_TARGET"))
result.addValue(ID[0]);
else if (TARGET[0].equals("SCORE_YDAY"))
result.addValue(Score<i>);
else if (TARGET[0].equals("SCORE_CDAY"))
result.addValue(Score[i+1]);
else
result.addValue(DT[i+1]);
I got the following results for the set of data that you provided.
Target-XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TestingTGT xmlns:ns0="http://monsanto.com/CIC">
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1000</SCORE_YDAY>
<SCORE_CDAY>1010</SCORE_CDAY>
<CURRENT_DATE>2010-03-02 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1000</SCORE_YDAY>
<SCORE_CDAY>1050</SCORE_CDAY>
<CURRENT_DATE>2010-03-04 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1050</SCORE_YDAY>
<SCORE_CDAY>1080</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502108</ID_TARGET>
<SCORE_YDAY>2000</SCORE_YDAY>
<SCORE_CDAY>2040</SCORE_CDAY>
<CURRENT_DATE>2010-03-03 05:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502108</ID_TARGET>
<SCORE_YDAY>2000</SCORE_YDAY>
<SCORE_CDAY>2040</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 05:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310302203</ID_TARGET>
<SCORE_YDAY>3000</SCORE_YDAY>
<SCORE_CDAY>3020</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 00:00</CURRENT_DATE>
</Row>
</ns0:MT_TestingTGT> -
How to get actionOverride value in the URL in page Flow
Hi All,
I have main page Flow , under main page flow there are 2 sub folders.When i navigate
between the page flow the URL I can see is like http://localhost:7501/myWEB/actportal.portal?_nfpb=true&portlet_2_1_actionOverride=/content/account/getAccount
Can any body tell me how to get the value 'portlet_2_1' that we see in the URL.
What is the API to get this value.
Thanks & Regards,
Hitesh C.u can try in JSP:
DesktopPresentationContext dpCtx = DesktopPresentationContext.getDesktopPresentationContext(request);
BookPresentationContext bpCtx= dpCtx.getBookPresentationContext();
ArrayList al = bpCtx.getPagePresentationContexts();
for(int i=o; i<al.size(); i++) {
PagePresentationContext ppCtx = (PagePresentationContext )al.get(i);
List windowCtxList = ppCtx.getWindowPresentationContexts();
for(int j=0; j<windowCtxList.size(); j++) {
WindowPresentationContext wpCtx = (WindowPresentationContext)windowCtxList.get(j);
wpCtx.getLabel();
"Hitesh" <[email protected]> wrote:
>
Joe,
Thx a lot .
I got the instance ID for the current portlet with API
com.bea.netuix.servlets.controls.portlet.PortletPresentationContext.getPortletPresentationContext(request).getInstanceLabel();
But how to get instance label for other Portlet ? any idea..........
Thanks ,
Hitesh
"Joe" <[email protected]> wrote:
It is a portlet's instance name. You can see it in the .portal screen
as a property.
This is added for portlet scoping. The instance name you might get from
a
backing (did not find it yet) or soeme fancy request attribute eventually.
"Hitesh" <[email protected]> wrote:
Hi All,
I have main page Flow , under main page flow there are 2 sub folders.When
i navigate
between the page flow the URL I can see is like http://localhost:7501/myWEB/actportal.portal?_nfpb=true&portlet_2_1_actionOverride=/content/account/getAccount
Can any body tell me how to get the value 'portlet_2_1' that we see
in the URL.
What is the API to get this value.
Thanks & Regards,
Hitesh C. -
Checkbox item: How to get all values checked?
See http://htmldb.oracle.com/pls/otn/f?p=24317:46
The report query is simply
select
'One' one,
'Two' two,
'Three' three,
'Four' four
from dualThe checkbox item is a named static LOV with STATIC2:ONE,TWO,THREE,FOUR and a Source value of ONE:TWO:THREE:FOUR so that all boxes appear checked when the page is first rendered.
All the 4 columns have a column condition like
instr(':'||:P46_COLS||':',':ONE:') > 0to ensure that column is rendered only if the corresponding checkbox is checked.
The report has Dynamic column headings with the following PL/SQL function body
return 'ONE:TWO:THREE:FOUR';To my (pleasant) surprise, this works very nicely. When column TWO is conditionally not rendered, its corresponding column heading is also skipped with no effort on my part. Nice.
Question:
Instead of "hard-coding" that string ONE:TWO:THREE:FOUR in the 2 places I mentioned above (checkbox item source and report heading), is there a way to access the "all values checked" version of that LOV item so that it will dynamically pick up the latest LOV changes? The way I have done it currently, if I change the named LOV, I need to also change those 2 places where I have hardcoded the values.
Any ideas? ThanksScott:
I thought about that but the LOV has dozens of values, each with a verbose display value and a return value of the column name (upto 30 characters) and the display values are still being "worked on" by the users.
So, the "all columns" string would be a big, unweildy string that would be hard to edit.
It is much easier to edit, resequence and generally work with a Shared Component LOV defined as a Static LOV because you get that nice page (4000:4111) where you can read everything nicely formatted instead of a STATIC2:<big long string>!
Can I have my cake and eat it too?!
Thanks -
How to get ALL values as default for a drop down box in JSF
Hi,
I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
Could any body help me? Any help must be appreciated.
Thanks,
AseetThanks Nikhil. But I am fetching the values from the LOVCache.java.
I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
I mean to say can I write
unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
where LOVCache.entityTypeSelectionList is used to populate the drop down box.
Regards,
Aseet -
How to get all users from the server....?
Hi all,
in my application i want to get all possible users present in the PORTAL-EP Server
and set them into the drop down.
is there need to login in the portal as a admin or other user to get the all users present in the Server.
Regards,
DeepakHi! Deepak,
you can use UME API to get all the users of EP in WebDynpro appl.
Herewith i am giving you the UME API link --
<a href="http://help.sap.com/javadocs/NW04/current/um/index.html">http://help.sap.com/javadocs/NW04/current/um/index.html</a>
i am giving the code also to get all the users from LDAP.
IPublic<ComponentName>.IUserIDElement userIDNodeElement = null;
IUserAccountFactory accountFact = UMFactory.getUserAccountFactory();
MessageManager msgMgr = (MessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();
try {
IUserAccountSearchFilter accountSearchFilter = accountFact.getUserAccountSearchFilter();
accountSearchFilter.setLogonUid("*",ISearchAttribute.LIKE_OPERATOR,false);
ISearchResult srchRslt = accountFact.search(accountSearchFilter);
while(srchRslt.hasNext()) {
userIDNodeElement = wdContext.createUserIDElement(); String uniqueID = (String)srchRslt.next();
IUserAccount userAccount = accountFact.getUserAccount(uniqueID);
String LogonUid = userAccount.getLogonUid();
userIDNodeElement.setCtx_UserID(LogonUid);
wdContext.nodeUserID().addElement(userIDNodeElement);
} catch(Exception exc) {
msgMgr.reportWarning(umException.toString());
regards,
Mithilehwar
Maybe you are looking for
-
It was working fine from march onward when I bought it but when I tried to sign in today it's saying all my products are just trial version and when i go to activate it, it asks for a serial code which wasn't give to me in my emails or anything? I ha
-
Urgent !!! How to change Accounting document using Billing document number
Hi experts, I have one requirement where I have to modify the accounting document using report. User will enter billing document no and I have to find out respective accounting document and I have to change header data.. I am very new to these module
-
Here's my situation, I want to export my song list and I have songs with Chinese words in them. I could do it before, it appeared as if iTunes saved the .txt files in Unicode, but now I can't get it to work. All that shows up are question marks where
-
Which version of Safari adds the feature "Smart Search Field"?
The so called version of Safari's "Smart Search Field" will include function that automatically give suggestion based on what you type in the search field, just like this Which version of Safari add this function?
-
Newbie Questions - Interlacing, Formats and exporting to iDVD
Sorry everybody, but I've got some issues. I'm new to Final Cut Express but I have a decent knowledge of digital video formats and resolutions, etc. I'm going to try to give as much information as possible so as to make your jobs easier. I'm putting