Can we use 2 Conditions as Selection Variables in a Query?
Hi Gurus,
According to the requirement in our report , we need to have selection variables on 2 Key figures Target Quantity and Consumption.
So ,we have used Conditions to have Variables in the Selection screen.
The Conditions (the Selection screen variables) are not working properly.
Can you please give some pointers on the Conditions to be used in the reports.
Thanks,
Sravani
I did not understand whats the issue is...., is it with the condition? or the variable.
If with the Condition please provide some more details about the condition.
If it is a variable, as the other person said, how did you create the variable on the Keyfigure? because as per i know we cannot create any variable for the Keyfigure, but if is possible please let me know, and i can dig in to that, and let you know how to fix the issue.
Regards,
Ram
Edited by: Ram Pawan on Aug 14, 2008 4:06 PM
Similar Messages
-
SSRS 2008, can I use exec sp and Select combo in dataset query pane for DataSet
Hi, I'm trying to use this combo for my dataset: i.e. call sp and then use table resulting from this sp, and it give me an error
<procedure or function has too many arguments specified> while generating report on Preview, but runs OK from query designer, I'm totaly lost.
Can it be done??
create table #temp (c1....c2)
insert #temp
exec sp_1000_Get_Mir
select c1, c2 from #tempYou need to use it like below if you want to select subset of columns from sp output
http://beyondrelational.com/modules/2/blogs/70/posts/10812/select-columns-from-exec-procedurename-is-this-possible.aspx
But I would still recommend using a wrapper procedure inside it create a temp table with structure some as your sp output and then select required columns from it
ie like below
CREATE PROC WrapperProc
AS
create table #temp (c1....c2)
insert #temp
exec sp_1000_Get_Mir
select c1, c2 from #temp
go
Then call the WrapperProc from your report
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How can i use SUM aggregate in select query?
HI,
GURUS,
How can i use SUM function in Select Query and i want to store that value into itab.
for ex:
TABLES: vbap.
types: begin of ty_vbap,
incluse type vbap,
sum type string,
end of ty_vbap.
data: i_vbap type TABLE OF ty_vbap,
w_vbap type ty_vbap.
SELECT sum(posnr) FROM vbap into table i_vbap up to 5 rows.
(or)
SELECT sum(posnr) FROM vbap into table i_vbap group by vbeln.
loop at i_vbap into w_vbap
" which variable have to use to display summed value.
endloop.
if above code is not understandable pleas give ome sample code on above query.
Thank u,
shabeer ahmed.Hi,
Check this sample code.
TABLES SBOOK.
DATA: COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
DATA: CONNID LIKE SBOOK-CONNID.
SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
INTO (CONNID, COUNT, SUM, AVG)
FROM SBOOK
WHERE
CARRID = 'LH ' AND
FLDATE = '19950228'
GROUP BY CONNID.
WRITE: / CONNID, COUNT, SUM, AVG.
ENDSELECT.
Regards,
Sravanthi -
How can I use a where in Select clause?
How can I use a where in select clasue when the other part of the where I do not not.
I mean that
Select *
from mara
where MATNR = MT*
That means it can have MTA, MTB, MTC....and so on
I can I write this code.
Regards,
Subhasishhiii
you can use following query
SELECT * FORM mara WHERE matnr CONTAINING 'MT'
or use following
select * from mara WHERE matnr = 'MT%'
reward if useful
thx
twinkal -
Can we use OFFSETs in Hierarchy Node Variable in BEx ???
Hi all,
I have the need of using the OFFSETs in Hierarchy Node Variables. Can we use OFFSETs in Hierarchy Node Variable, PLEASE ???
Thanks in advance.
Regards,
Venkat.I havent had such scenario - but I dont think you can do a offset on a hierarchy variable.
-
How can we use list box on selection screen
hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.
thanks in advance
rajuUse the VRM_SET_VALUES function module.
DATA: list TYPE vrm_values,
value LIKE LINE OF list.
AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
name = 'P_OBJECT'.
CLEAR list.
REFRESH list.
CLEAR value.
value-key = '1'.
value-text = 'Development Class'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'Program'.
APPEND value TO list.
CLEAR value.
value-key = '3'.
value-text = 'Function Module'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'Database Table'.
APPEND value TO list.
CLEAR value.
value-key = '5'.
value-text = 'Structure'.
APPEND value TO list.
CLEAR value.
value-key = '6'.
value-text = 'View'.
APPEND value TO list.
CLEAR value.
value-key = '7'.
value-text = 'Data Element'.
APPEND value TO list.
CLEAR value.
value-key = '8'.
value-text = 'Table Type'.
APPEND value TO list.
CLEAR value.
value-key = '9'.
value-text = 'Class / Interface'.
APPEND value TO list.
CLEAR value.
value-key = '10'.
value-text = 'Type Group'.
APPEND value TO list.
CLEAR value.
value-key = '11'.
value-text = 'Domain'.
APPEND value TO list.
CLEAR value.
value-key = '12'.
value-text = 'Search Help'.
APPEND value TO list.
CLEAR value.
value-key = '13'.
value-text = 'Lock Object'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Can we use formula column in lexical parameter in sql query ...
hi
can we use formula column in lexical parameter in sql query ...
as example
i want to give
select * from & c_table
forumula
function c_table
if :p_sort = 1 then
return 'dept'
else
return 'emp'
end;
c_table formula column
is this possible ...
i have such example in oracle apps reports
if i try in ordinary report usinf emp table it show error ..
how we can give formula column...
please help me in this regard...
Edited by: 797525 on Feb 20, 2012 9:31 PMthanks sir,
iam not exactly saying select * from &c_table but some thing that like columns in select stmt also will be populated in user_parameters ,there are lot of table select.......from mtl_demand md, mtl_system_items msi, mtl_txn_source_types mtst, mtl_item_locations loc &C_source_from &C_from_cat
&c_source_from and &c_from_cat formula column and there are defined at report level only ......
pl/sql code &c_source_from is
function C_source_fromFormula return VARCHAR2 is
begin
if :P_source_type_id = 2 then return(',MTL_SALES_ORDERS mkts');
else if :P_source_type_id = 3 then return(',GL_CODE_COMBINATIONS gl');
else if :P_source_type_id = 6 then return(',MTL_GENERIC_DISPOSITIONS mdsp');
else if :P_source_type_id = 5 then
if :C_source_where is null then
return NULL;
else
return(',WIP_ENTITIES wip');
end if;
else if :P_source_type_id = 8 then return(',MTL_SALES_ORDERS mkts');
else if :P_source_type_id is null then
return(',MTL_SALES_ORDERS mkts,
MTL_GENERIC_DISPOSITIONS mdsp,
GL_CODE_COMBINATIONS gl ');
else null;
end if; end if; end if; end if; end if; end if;
RETURN NULL; end;
this is forumula column i hope that you understand what iam saying
please help me in this regard....
thanking you... -
Sample XML format that can be used to write a SELECT query
Hello,
I want to use and XML file in the scenario FILE to JDBC where i use the operation as SELECT in which i want to embbed an sql statemnet which is equivalent to
SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO>1
as in the form of XML format like,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SELECT">
<TABLE>EMPTEST</TABLE>
<ACCESS>
<EMPNO></EMPNO>
<NAME></NAME>
</ACCESS>
<KEY>
<EMPNO compareOperation="GT">1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
Can i do like this?
PLease help me out in using various conditions in the XML file formats like the above.
Thanks,
Soorya.Hello raj,
I would like to write the query in that format where i mentioned as,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SELECT">
<TABLE>EMPTEST</TABLE>
<ACCESS>
<EMPNO></EMPNO>
<NAME></NAME>
</ACCESS>
<KEY>
<EMPNO compareOperation="GT">1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
without giving clear SQL statement as you mentioned here like,
<ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
<STATEMENT>
<TABLENAME ACTION="SQL_QUERY">
<ACCESS>SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO > '$EMPNO$</ACCESS>
<KEY>
<EMPNO>1</EMPNO>
</KEY>
</TABLENAME>
</STATEMENT>
</ns0:MT_JDBC_SELECT_JDBC_REQ>
Thanks,
Soorya -
Can I use C++ objects as Host variables in Pro*C++
Hi,
I have a C++ object in my Pro*C++ program. The objects has
members representing all the fields of a oracle table record.
e.g. For a table TEST_PRODUCT ( product_id, name),
the C++ class is :
class prd
public:
int id;
char name[50];
Can I use the Object of this class as a Host Variable ? In SQL
select query , I want to directly fetch record into this object.
When I declare this object within EXEC SQL BEGIN DECLARE SECTION
and END DECLARE SECTION , it gives me compilation error.
Is that supported by Pro*C++ ? If yes, how to do it?
Pls help.
ThanksI find it easier to decalre a local variable in the EXEC SQL
block and then assign that to your class variable at the end of
the statement. It makes it easy to check for nulls and db
errors without affecting the C++ object.
PT -
Can we use If condition in so10?
Hi Experts,
I want to have different text descriptions for different release code in PR workflow
can I dynamically change the task description keepin the task as same .
can we put if condition in task description ?
Thanks & Regards
Dharmesh SharmaUse this syntax in Task Description it will work. If you are using Include Text and maintaining the condition in include text bring that text to Task Description.
Syntax:
/: IF &BUS2015.RelCode; = 'HD'
Head of Department
/: ENDIF
/: IF &BUS2015.RelCode; = 'DR'
Director
/: ENDIF
Regards,
Ramu N. -
Can we use 0INFOPROV as a selection in Load from Data Stream
Hi,
We have implemented BW-SEM BPS and BCS (SEM-BW - 602 and BI 7 ) in our company.
We have two BPS cubes for Cost Center and Revenue Planning and we have Actuals Data staging cube, we use 0SEM_BCS_10 to load actuals.
We created a MultiProvider on BPS cubes and Staging cube as a Source Data Basis for BCS.
Issue:
When loading plan data or Actuals data into BCS (0BCS_C11) cube using Load from Data Stream method, we have performance issue, We automated load process in a Process Chain. Some times it take about 20 hrs for only Plan data load for 3 group currencies and then elimination tasks.
What I noticed is, (for example/) when loading Plan data, system is also reading Actuals Cube which is not required, there is no selection available in Mapping or selection tab where I can restrict data load from a particular cube.
I tried to add 0INFOPROV into databasis but then it doen't show up as selection option in the data collection tasks.
Is there a way where I can restrict data load into BCS using this load option and able to restrict on cube I will be reading data from ?
I know that there is a filter Badi available, but not sure how it works.
Thanks !!
Naveen Rao KattelaThanks Eugene,
We do have other characteristics like Value Type (10 = Actual and 20 = Plan) and Version (100 = USD Actual and 200 = USD Plan), but when I am loading data into BCS using Load from Data Stream method, the request goes to all the underlying cubes, which in my case are Planning cubes and Actual Cube, but I don't want request to goto Actual Cube when I am running only Plan load. I think its causing some performance issue.
For this reason I am thinking if I can use 0INFOPROV as we use in Bex queries to filter the InfoProvider so that the data load performance will improve.
I was able to to bring in 0INFOPROV into DataBasis by adding 0INFOPROV in the characteristics folder used by the Data Basis.
I am able to see this InfoObject Data Stream Fileds tab. I checked marked it to use it in the selection and regenerated the databasis.
I was expecting that now this field would be available for selection in data collection method, but its not.
So If its confirmed that there is no way we can use 0INFOPROV as a selection then I would suggest my client for a redesign of the DataBasis it self.
Thanks,
Naveen Rao Kattela -
How can i use param in my select query ( see code)
Hi ,
I need to use the param instead of hardcoding the value in the select query , when i did that it is working .
I think the limit of args is only till the end of main and my select query is in a method called Load() .
How can i use the param in my select query .
public static void main(String[] args){
name = args[0];
class= args[1];
new Load();
}//end of main
public Load()
try {
Class.forName(JDBC_DRIVER);
connection = DriverManager.getConnection(DATABASE_URL,"username","pw");
statement = connection.createStatement();
//First Query : pin and ticket number
ResultSet resultSet = statement.executeQuery("SELECT pin , ticketnumber from airport ,year where "+ "year.year_name= Here i need to use the param (instead of hardcoding) and year.class_year= Here too i need to use param");
}// end of method Load()Edited by: 1sai on Sep 24, 2008 7:34 AM
Edited by: 1sai on Sep 24, 2008 7:35 AMMight I suggest you change the structure of your program to the following:
public class Load {
private Connection conn;
private PreparedStatement statement;
public Load(String sql) {
init(sql);
protected void init(String sql) throws Exception {
Class.forName(JDBC_DRIVER);
conn = DriverManager.getConnection(DATABASE_URL, "username", "pw");
statement = conn.prepareStatement(sql);
public ResultSet execute(String p1, String p2) throws Exception {
statement.setString(1, p1);
statement.setString(2, p2);
return statement.executeQuery();
public void close() throws Exception {
if (statement != null)
statement.close();
statement = null;
if (conn != null)
conn.close();
conn = null;
public static void main(String[] args) throws Exception {
String sql = args[0];
String param1 = args[1];
String param2 = args[2];
Load load = new Load(sql);
ResultSet rs = load.execute(param1, param2);
while (rs.next())
System.out.println(rs.get(0));
rs.close();
load.close();
}This allows you to use the same "Load" object for multiple queries with different parameters.
I do not recommend you actually use the code above in any sort of production application. You should really take a look at Spring Framework along with an ORM tool like Hibernate or Ibatis to simplify your DAO layer.
Hope this helps,
David -
Can i use id on html:select syntax...
Hi,
i am using the following code to take data from the database directly to a dropdown box.
<html:select property="lddate" style = "width:160">
<html:option value="--SELECT--">SELECT</html:option>
<html:options collection="loadDateList" name="almRecordsNotProcessedBO" property="lddate"
labelProperty="lddate"/>
</html:select>
then after selecting the load-date from the drop-down box & clkng on submit button page is wrkng fine but in the dropdown it not showing the selected date.it is showing the default 1st entry in the drop-down box.
Now i using a javascript for showing the selected date::::
<script type="text/javascript">
function getText(){
var x=document.getElementById("aSelectControl")
alert(x.options[x.selectedIndex].text)
</script>
But here i needed an id . In my Drop-down select code where i shuld use this id..i dont understand..i have checked for syntax of html:select but there is no id tag attribute of html:select.can anyone suggest me any other idea how to show that.
can any one help me ..its very very urngent. i got stuck..plzzzz
I have checked in the internet there is a select syntax where i can make use that id..
Select the load date:
<select id="aSelectControl">
<option>25-12-2011</option>
<option>26-11-2011</option>
<option>27-11-2011</option>
</select>
But here the problem is i have to write the dates in a jsp page..but its not poss for my case...i have to take the date from databse. can any one tell me if i using the above query how to take data from the database.
plzzzz help me..can anyone say where i am wrong in follwing syntax..
function changeText2(val){
var index = document.getElementById('prodlvl0').selectedIndex;
alert("value="+document.getElementById('prodlvl0').value);
alert("text="+document.getElementById('prodlvl0').options[index].text);
<td class = "almtdheight" width="37%">
<html:select property="lddate" style = "width:160" styleId="prodlvl0" onclick="changeText2(this.value)">
<html:option value="--SELECT--">SELECT</html:option>
<html:options collection="loadDateList" name="almRecordsNotProcessedBO" property="lddate" labelProperty="lddate"/>
</html:select>
</td>
its not wrkng... -
Can we use the value of a variable in an alert message
I have a variable in forms6i. I want to use the value of this variable in an alert message. How is this possible?
Gul wrote:
I have a variable in forms6i. I want to use the value of this variable in an alert message. How is this possible?Try
DECLARE err_txt VARCHAR2(200) t;
al_id ALERT;
al_button Number;
BEGIN
al_id := FIND_ALERT('My_Error_Alert');
SET_ALERT_PROPERTY(al_id, alert_message_text, 'Hello how are you mr. variable '||:variable_name );
al_button := SHOW_ALERT( al_id );
END; Hope it works..
Hamid -
Using plsql tables in select statement of report query
Hi
Anyone have experience to use plsql table to select statement to create a report. In otherwords, How to run report using flat file (xx.txt) information like 10 records in flat files and use this 10 records to the report and run pdf files.
thanks in advance
sureshhi,
u can use the utl_file package to do that using a ref cursor query in the data model and u can have this code to read data from a flat file
declare
ur_file utl_file.file_type;
my_result varchar2(250);
begin
ur_file := UTL_FILE.FOPEN ('&directory', '&filename', 'r') ;
utl_file.get_line(ur_file, my_result);
dbms_output.put_line(my_result);
utl_file.fclose(ur_file);
end;
make sure u have an entry in ur init.ora saying that your
utl_file_dir = '\your directory where ur files reside'
cheers!
[email protected]
Maybe you are looking for
-
I took a lot of pictures and video on my recent trip to Ireland. Now I am trying to download the photos and videos from my iphone to my mac - iphoto. I have tried 3 times and each time (at a different point) I get a message telling me that there wa
-
US iPhone 3G with Movistar/Spain SIM?
I purchased an iPhone 3G from a US Apple store. I am about to travel to Spain for 6 months and don't want to spend a lot of money roaming. Is it possible to remove the AT&T SIM and buy a Movistar (iPhone carrier in Spain) SIM/package. Will the US bou
-
Exchange rate difference posting in parallel currencies
Hello experts,, We are on ECC 6. When we enter an invoice with MIRO and the current exchange rate differs from that in the PO, the exchange rate differences in local currency and in parallel currency (group currency) post to different accounts. Is th
-
Can I use data entered in PDF form's field(s) to auto-populate Save As file name?
Hello, I want to automate, as much as possible, the "Save As" process by using some of the data that the user entered in the fillable PDF form. For example, I want to include the user's First Name and Last Name that they entered in the form to be par
-
How to start RMI Server Jar on server?
Im using RMI, I have two jar files. One Server Jar which contains rmi server, registry start code and all methods which performs action on database . I put this jar file on tomcat web-apps directory. Another jar is containing User Interface code, whi