How to get all the values in the Select-option.
Hi,
I got the select-option field so_week, for eg. If I give 200923 to 200926 (year and week) in the selection screen and then I need to pass this value (200923) to the FM 'ZWEEK_GET_FIRST_DAY' to get the first day of the week.
My question is how can i get all the values from the select option, (i.e) i need to get 200923, 200924,200925, 200926.
Regards,
Anbu.
Hello,
I will prefer Max's solution. But just for the sake of this req.
i need to get 200923, 200924,200925, 200926
i am proposing my soln:
DATA: V_WEEK TYPE RSCALWEEK.
SELECT-OPTIONS: S_WEEK FOR V_WEEK NO-EXTENSION OBLIGATORY.
AT SELECTION-SCREEN.
DATA:
V_COUNT TYPE I,
V_ADD TYPE I,
RT_WEEK TYPE RANGE OF RSCALWEEK,
RS_WEEK LIKE LINE OF RT_WEEK.
V_COUNT = ( S_WEEK-HIGH - S_WEEK-LOW ) + 1.
DO V_COUNT TIMES.
RS_WEEK-SIGN = 'I'.
RS_WEEK-OPTION = 'EQ'.
RS_WEEK-LOW = S_WEEK-LOW + V_ADD.
APPEND RS_WEEK TO RT_WEEK. "RT_WEEK--> Will contain the week values
CLEAR RS_WEEK.
V_ADD = V_ADD + 1.
ENDDO.
@Max: I was stupid enough not to think of your solution. Need to leave office
Cheers,
Suhas
Similar Messages
-
How to get all video clips to the organize at the same time
Hi,
I am a new user and I wonder how to get all video clips to the organize via Get Media or ?? at the same time. Now I have got it one after another and it is very slow.My meaning is to get the clips from hard disk folder. No one after another but all the same time.
-
How to get calender in f4 help for select options in module pool (URGENT)
Hi All,
how to get calender in f4 help for select options in module pool
Please help .
Thanx in advance,
amrutaHi Amruta,
First of all, you can not create select-options directly in module pool.
For creating <b>select-option is dialog prog</b> follow these steps:
1. create your selection screen model as subscreen by:
SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
PARAMETRS: P_MATNR LIKE MARA-MATNR.
SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
SELECTION-SCREEN END OF SCREEN 2000.
2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
3. write this bit of code in PBO and PAI of the screen 100;
CALL SUBSCREEN SUBSCREEN_2000.
4. include this code in PBO:
INCLUDING SY-REPID '2000'
6. write user_command of PAI, call screen which is going to executable after selection-screen.
5. create a transcation for this dialog module pool with screen 100.
6. execute this transaction and you can see it's behaving like cool with select-options.
After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
Hope it will solve the problem.
Regards
Krishnendu -
How to get dynamic paramete value in the context node?
Hi, experts,
There are some attributes in the node context(ee_node) that contained the attribute named "ANSSA" in the view(test_view) in the WDA for abap. In the method WDDOMODIFYVIEW of the view(test_view), there is dynamically string , ex."ANSSA". How can I get the value of the "ANSSA" from the node(ee_node)?
I try to use the following code to get the value in the method WDDOMODIFYVIEW of the view(test_view):
Method wddomodifyview.
*importing para type string.
data:
Node_Ee_Address type ref to If_Wd_Context_Node,
Elem_Ee_Address type ref to If_Wd_Context_Element.
navigate from <CONTEXT> to <EE_ADDRESS> via lead selection
Node_Ee_Address = wd_Context->get_Child_Node( Name = IF_ADDR_AUTO_DISP_VIEW=>wdctx_Ee_Address ).
get element via lead selection
Elem_Ee_Address = Node_Ee_Address->get_Element( ).
get single attribute
Elem_Ee_Address->get_Attribute(
exporting
Name = para
importing
Value = ??? ).
But I don't know how to replace the "???" .
endmethod
I don't know how to replace the "???" in the method wddomodifyview? Do you give me some hint for it?
You can reply back to me via e-mail if you think we should discuss this internally at [email protected] or [email protected]
Thanks.
Best regards,
taoHello Neha,
Thank you for your help in advance.
I am very sorry that the above method name ought to be "modifyview", not "wddomodifyview"(I write the error word in the question so that I am very sorry.). I am very sorry the error method name occuring your misunderstand.
The "para" is the transfered parameter that it is supposed to represent the name of "ANSSA". Actually, the "para" may represent other attribute in the node context, ex. "ENDDA"(date type) attribute.
I don't write such code in the method modifyview: lv_anssa like ls_ee_node-anssa. Because I am not sure that the "para" represent the name of "ANSSA", and the "para" may represent other attribute in the node context, ex. "ENDDA"(date type) attribute. The "para" is only the transfered parameter from other method for representing the name of attribute.
Method modifyview.
*importing para type string.
DATA:
lo_nd_ee_node type ref to if_wd_context_node,
lo_el_ee_node type ref to if_wd_context_element,
ls_ee_node type wd_this->element_ee_node.
I cann't write such code. Because I am not sure that the para represent the name of "ANSSA"******************
data lv_anssa like ls_ee_node-anssa.
lo_nd_ee_node = wd_context->get_child_node( name = wd_this->wdctx_ee_node ).
lo_el_ee_node = lo_nd_ee_node->get_element( ).
lo_el_ee_node->get_attribute(
exporting
name = para
importing
value = ??? ).
endmethod.
I don't know how to replace the "???". Do you give me more hints?
Thanks a million.
Regards,
Neha -
How to get all checked values from a chaeck box
Hello
In my app i have a checkbox called P10_CID with static lov like
STATIC2:one;1,two;2,three;3,four;4,six;6
my question is when i check more than one option
i can not get that value.
How is it possible to see all the values of the check box that are checked ?
Regards
ArisHi Aris,
Do you have to have checkboxes? Can you use a multiselect list instead?
If you can, then the following excerpt from the user guide may help you:
Using HTMLDB_UTIL.STRING_TO_TABLE to Convert Selected Values
Suppose you had a report on the EMP and DEPT tables that is limited by the
departments selected from a Department multiple select list. First, you create the
multiple select item, P1_DEPTNO, using the following query:
SELECT dname, deptno
FROM dept
Second, you return only those employees within the selected departments as follows:
SELECT ename, job, sal, comm, dname
FROM emp e, dept d
WHERE d.deptno = e.deptno
AND instr(':'||:P1_DEPTNO||':',':'||e.deptno||':') > 0
Regards
Andy -
How to get a field value in the report
hi all :-
i need to get the field value in the formate trigger inside a specified field in the report?please post your request in the report category forum
-
How to get all possible values of a property
I have a single-valued restricted property which has a number of predefined values.
I want to be able to get all of these values to use to populate a drop down list in my portlet.
Does anyone know how I can do this?Hello Angela,
Here is an example portlet that I wrote for WLPS 2.0. It should work for WLPS 3.1 also, but it
didn't verify it on 3.1 yet. The key is that you have to use the SchemaManager to get a Schema
which will allow you to get get PropertyMetaData. See the javadoc for more information.
Here you go:
<%-- This JSP page lists the restricted values for a multiple restricted property --%>
<%@ page import="java.util.*" %>
<%@ page import="com.beasys.commerce.axiom.util.helper.JNDIHelper,
com.beasys.commerce.foundation.property.SchemaManagerHome,
com.beasys.commerce.foundation.property.SchemaManager,
com.beasys.commerce.foundation.property.Schema,
com.beasys.commerce.foundation.property.SchemaManagerConstants,
com.beasys.commerce.foundation.property.PropertyMetaData,
com.beasys.commerce.axiom.util.ToolkitException,
java.rmi.RemoteException,
javax.ejb.CreateException" %>
<%@ page extends="com.beasys.commerce.axiom.jsp.JspBase" %>
<%
I used the admin tool to create a "test" property set with
a multiple, restricted text property called "restrictedWords". The
allowable values are "how", "now", "brown", "cow". I selected one
default value ("brown").
SchemaManagerHome smh = null;
try
smh = (SchemaManagerHome) JNDIHelper.getHome("com.beasys.commerce.foundation.property.SchemaManager");
catch (ToolkitException e)
e.printStackTrace();
PropertyMetaData metaData = null;
try
SchemaManager sm = smh.create();
// Get the schema for the user/group property set called "test"
Schema schema = sm.getSchema("test", SchemaManagerConstants.USER_TYPE);
// Get the meta data for the "restrictedWords" property
metaData = schema.getPropertyMetaData("restrictedWords");
catch (CreateException e)
e.printStackTrace();
catch (RemoteException e)
e.printStackTrace();
Collection restrictedValues = metaData.getRestrictedValues();
Iterator restrictedIter = restrictedValues.iterator();
while (restrictedIter.hasNext())
out.println("<br>restricted value is: " + restrictedIter.next());
%>
Ture Hoefner
BEA Systems, Inc.
2590 Pearl St.
Suite 110
Boulder, CO 80302
www.bea.com
[att1.html] -
How to get all tree node parents upon select
I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node.
So if I have this XML:
<products>
<item>
<sku>1001</sku>
<quantity value="100" />
</item>
<item>
<sku>2001</sku>
<quantity value="250" />
</item>
<item>
<sku>3001</sku>
<quantity value="300" />
</item>
</products>
If user clicks on the 1001 sku, I want to get something like this:
<products><item><sku>
Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value="100", I want to get this:
<products><item><sku><quantity>
I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields.
The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say <sku> elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
Thanks very much!var path:Array=[]
var parent:XML = xxxx.selectedItem.parent()
while(parent){
path.push(parent.localName())
parent = parent.parent()
Or, i didn't get your question and xxxx.selectedItem is "detached" XML snippet ? -
How to get all minimum values for a table of unique records?
I need to get the list of minimum value records for a table which has the below structure and data
create table emp (name varchar2(50),org varchar2(50),desig varchar2(50),salary number(10),year number(10));
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',3000,2005);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',4000,2007);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2007);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2008);
insert into emp (name,org,desig,salary,year) values ('emp1','org1','mgr',7000,2010);
commit;
SELECT e.name,e.org,e.desig,min(e.year) FROM emp e,(
SELECT e1.name,e1.org,e1.desig,e1.salary FROM emp e1
GROUP BY (e1.name,e1.org,e1.desig,e1.salary)
HAVING COUNT(*) >1) min_query
WHERE min_query.name = e.name AND min_query.org = e.org AND min_query.desig =e.desig
AND min_query.salary = e.salary
group by (e.name,e.org,e.desig);With the above query i can get the least value year where the emp has maximum salary. It will return only one record. But i want to all the records which are minimum compare to the max year value
Required output
emp1 org1 mgr 7000 2008
emp1 org1 mgr 7000 2007Please help me with this..Frank,
Can I write the query like this in case of duplicates?
Definitely there would have been a better way than the query I've written.
WITH got_analytics AS
SELECT name, org, desig, salary, year
, MAX (SALARY) OVER ( PARTITION BY NAME, ORG, DESIG) AS MAX_SALARY
, ROW_NUMBER () OVER ( PARTITION BY NAME, ORG, DESIG, SALARY
ORDER BY year DESC
) AS YEAR_NUM
FROM (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
SELECT name, org, desig, salary, year
FROM got_analytics
WHERE salary = max_salary
AND YEAR_NUM > 1
Result:
emp1 org1 mgr 7000 2010
emp1 org1 mgr 7000 2008
emp1 org1 mgr 7000 2007
emp1 org1 mgr 7000 2007
WITH got_analytics AS
SELECT name, org, desig, salary, year
, MAX (SALARY) OVER ( PARTITION BY NAME, ORG, DESIG) AS MAX_SALARY
, ROW_NUMBER () OVER ( PARTITION BY NAME, ORG, DESIG, SALARY
ORDER BY year DESC
) AS YEAR_NUM
, ROW_NUMBER () OVER ( PARTITION BY NAME, ORG, DESIG, SALARY, Year
ORDER BY YEAR DESC
) AS year_num2
FROM (SELECT 'emp1' AS NAME, 'org1' AS ORG, 'mgr' AS DESIG, 3000 AS SALARY, 2005 AS YEAR FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',4000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2007 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2008 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL UNION ALL
SELECT 'emp1','org1','mgr',7000,2010 FROM DUAL)
SELECT name, org, desig, salary, year
FROM got_analytics
WHERE salary = max_salary
AND YEAR_NUM > 1
AND YEAR_NUM2 < 2
Result:
emp1 org1 mgr 7000 2008
emp1 org1 mgr 7000 2007 -
How to get all the values from the dropdown menu
How to get all the values from the dropdown menu
I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
How do I get number of item is selection dropdown?
How do I extract a ?name? for each value, one by one?
How do I change a selection by referring to particular index of the item in a dropdown menu?
Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
Message was edited by: testtestThe findElement method allows various attributes to be used to search. Take the following two examples for the element below:
<Select Name=ProdType ID=testProd>
</Select>
I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
If I want to search by id I could do the following:
Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
You can use the FindElement to grab links, text boxes, etc.
The next example grabs from a link on a page
Home
Set x = RSWApp.om.FindElement("Home","A","innerText")
I hope this helps clear it up. -
How to get procedure paramater value dynamicly ?
How to get procedure paramater value if the parameter name is stored in a text variable?
example:
create or replace circle_area(p_par1 varchar2, p_par2 varchar2) IS
begin
for v_col in (select * from USER_ARGUMENTS where OBJECT_NAME = $$plsql_unit order by position) loop
DBMS_OUTPUT.PUT_LINE('column_name : ' || v_col.ARGUMENT_NAME);
--v_col.ARGUMENT_NAME contains the parameter name.
Q1: how to get value of the parameter dynamicly?
Q2: how to get value of procedure parameter which name is stored in a text variable?
end loop;
end;
thanks for help
CecakLet me explain it again what I need using different words.
I need to write an universal code which will be able to identify name and value of parameters of called procedure/function.
It means I do not want to hardcode the list of all procedure/function parameters into one command DBMS_OUTPUT.PUT_LINE('p_par1 is '||p_par1||', p_par2 is '||p_par2.....) placed as first statement of a monitored procedure/function.
If a new verison of the same procedure/function having one additional parameter is compiled I would not need to modify the first command of the procedure/function to show name and value of the additional parameter because it would be done dynamicly.
SQL> create or replace procedure procedure1(p_par1 varchar2, p_par2 varchar2) IS
2 begin
3 for v_col in (select * from USER_ARGUMENTS where OBJECT_NAME = $$plsql_unit order by position)
loop
4 DBMS_OUTPUT.PUT_LINE('column_name : ' || v_col.ARGUMENT_NAME);
5 end loop;
6 end;
7 /
Procedure created.
SQL> set serveroutput on size 10000
SQL> begin
2 procedure1('par1','par2');
3 end;
4 /
column_name : P_PAR1
column_name : P_PAR2
PL/SQL procedure successfully completed.
How can I get value of the procedure parameters if the parameter's names are stored in a text variable?
My DB version is:
SQL> select * from v$version;
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Thanks
Cecak -
How to get all the values in one column of a JTable
How to get all the values in one column of a JTable as a Collection of String.
I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column.I don;t want to write a for loop to say getValueAt(row, 1) eg for 2nd column. You could always write a custom TableModel that stores the data in the format you want it. It would probably be about 50 lines of code. Or you could write a loop in 3 lines of code. I'll let you decide which approach you want to take.
-
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,
MrunalHello 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. -
How to get all the values from a HashMap? thanks
hi
can anyone tell me how to get all the keys and their values contained in a HashMap? thanksthanks to u all for ur response, i gues if i need to get both keys and values, i need to use keySet() to get a set of keys first and then using each key to get value. is there any other faster way to get both of them (key and value)? thanks again
-
How to get all the values of a variable with F4 with checkboxes to select
Dear Experts,
After Executing a query by giving let 3 values(Out of 10 Values) to a variable.
To give 2 more input values to the same variable(i.e.,total I wanted to give 5 inputs this time ),after refreshing the query,for that variable if I click F4, I am seeing the historical values(i.e.,3) and remaining 7 values also But with out any Check Boxes besides them to select the 2 inputs.
In the same F4 Screen, If I click all values(an Icon at The bottom),then also Im seeing but no check Box.
I hve tried by deleting the Delete Personalization also,but no use.
Please tell me How to get all the values with F4 with check boxes to select ,whatever I want??
Thanks in advanceTake a look at the InfoObject and go to the Business Explorer tab. If the 'Query Def. Filter Value Selection' is set to 'Only Values in InfoProvider', you're only going to get the values in F4 that exist in the InfoProvider, not everything in the Master Data. This would need to be changed to the value of 'Values in Master Data Table' if you want it to show everything possible when F4 is chosen.
Likewise, you're going to need to look at the query and go to the Advanced tab for the InfoObject. Make sure that the radio button for 'Values in Master Data Table' is selected. If not, then you should change that selection.
Maybe you are looking for
-
Hi, how can I suppress in Forms duplicates! I mean if I have in my Table two same job's then it should be suppress. In SQL can we do it with DISTINCT! How in Forms?
-
Needing to point the cms repository from one oracle database located on server1 to another oracle database located on server 2. We are using Business Objects XI R2 in a UNIX environment. Located the following document as a reference and am wonderin
-
Is there known maximum to quantity of images displayed in photos?
Have iPad with approx 35,000 images to display. Is there a ceiling or maximum to quantity which can be managed through iTunes photo sync and displayed on iPad?
-
Google Adwords compatible flash banners for n00bs.
A small guide to a miserable evening of trying to make a google-adwords compatible banner in Flash CC by a miserable designer who is _not_ an actionscript pro. Or actionscript anything, really. Probably could be done smarter, but that's how I did it
-
Call me stupid but somehow the "recently added" file was deleted somehow from my itunes.I just cant figure out how to reinstall it??Any help is greatly appreciated. Thanks Jay