Data Display Query
Hello, I have a question. I have data in my DSO like this:
Customer Calmonth ZCalmonth Quantity
101 201411 201406 10
101 201410 201406 20
101 201407 201406 30
101 201406 201406 8
101 201404 201406 9
102 201411 201409 10
102 201410 201409 12
102 201409 201409 20
102 201407 201409 6
102 201406 201409 9
102 201404 201409 10
My requirement is to add up the quantity based off of the value in ZCALMONTH, so for example: for customer 101, i want to show a record from beginning till 2014006 period which should be like this:
Customer Quantity
101 17 which is a made of 8+9
102 45 which is a made of 20+6+9+10
How can i do this at the query level please? Back-end can also be an option if this is not do able at query level.
Thanks.
Phani, this will be easier if i had 0calmonth and zcalmonth in my query but i don't want to break down like that. i only want to display the aggregated result. as you may see that i only have
0customer and quantity
in my query output, which is user requirement because user doesnot want to see the break down of each month but they only want to see all the months quatities aggregates into one record until what is specified in ZCALMONTH and the only way to gather it by aggregating it.
thanks.
Similar Messages
-
Pb with language logon and data display Query designer
Hello,
I do the translations (FR => EN) via RSA1 and SE63 of my variables of my Query for the query designer.
It works I have no technical name that appears in the query designer.
But when I run my query using the query designer, the query is displayed in French while I am logged in English.
I want the query is displayed in english when I'm logged into English.
How can I do?
Thank you pour votre aide.
Edited by: KhalidTaibi on Jul 6, 2010 6:31 PMHello,
Per I can understand, you are executing the query from Query Designer.
So, if you are using Query designer 7.0, you are calling the Enterprise Portal.
Even with English on Query Designer, you have to logon as english on the
Portal, as well.
Try to check your Browser configuration.
On Internet Explorer:
Tools
Internet Option
Language
Check if English is configured as the first language.
Also, ensure the query1s objects exists on english version.
Best regards,
Edward John -
How to display current date in query header?
Hi,
How to display current date in query header?
I use Query Designer for development.
Thanks,
Arun KKHi Arun,
You can define fixed header lines and footer lines so that when you generate the query list, they can receive current values of certain fields. When you define a header line or a footer line, you must specify a character string of the type &field, where field is the short name of a field.
This function allows you (for example) to place a sort criterion in the header line.
You can include the following fields as variables in the headers directly:
%NAME
Name of the user processing the query
%DATE
Current date
%TIME
Current time
%PAGE
Current page number (6 characters)
%P
Current page number (3 characters)
These fields can be used in the short forms N,D,T and P. If you want to use these letters as short names for query fields, the field values from the query are used.
You can also see the link
[http://help.sap.com/saphelp_nw70/helpdata/EN/6e/dd68721faf11d6b1d500508b6b8b11/frameset.htm]
Regards,
NR -
Large number of attributes reduces data display in Query (PLS HELP).
Dear Guru's
We have newly upgraded our system to 7.0, Currently i have a Query based on master data info object(0 equipment) which contain several attributes, due to huge number of attributes, i cannot see data for few attributes( Ex:-0service descrip), but data exists for these atrrib, when i check in RSA1. my client want to use heavy number of 0Euipment numbers(nearly 10000) in selection screen. thats the reason for data not to be seen.
WE are under SP 16 also(Note 562162 - Additional selection of attribute reduces query result set is allready exists), and did not found any proper note.
So guru's can any one please tell me how i can get the data in Query for these attribute by keeping the same selection option for Equipment numbers (10000).
Dude's give me some good suggestion please...client is waiting from 1 week
Thanks in adv
Dev
Edited by: Srinivas dev on Jun 10, 2008 11:52 AMDear Yogesh,
Thanks a lot dude...
I assigned points for your kindly help....
Got any idea about by initial post Large number of attributes reduces data display in Query
Thanks and Regards
Dev -
No Data displayed in the query
Hi All,
I have created a query on master data.
Data is available in Master data, but I am not able to view any data in query.
Any suggestion?
Thanks
VandanaHi,
Have you activated the data?
regards,
raju -
Date based Resultset and Date display
Hi
I have two jsp pages. In first page user selects a Date and name, based on that 2nd jsp display a resultset in a table. I want to Display Selected name and Date on 2nd Page. I done it for name and unable to show the Date and query is also to be modified.
Here is code for my two jsp pages:
first.jsp
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ include file="DataSource.jsp" %>
<html>
<head>
<title>abcd</title>
<script type="text/javascript" language="javascript">
function HTML(p){
if(!p){
/*default*/
p='A action align alt B background Base bgcolor BIG BLINK BODY border bordercolor bordercolordark bordercolorlight Br cellpadding cellspacing checked color cols colspan compact content dir DIV enctype face FONT FORM H1 H2 H3 H4 H5 H6 HEAD height Hr href hspace HTML I id Img Input lang language leftmargin LI marginheight marginwidth maxlength Meta method name NOSCRIPT noshade nowrap OL onblur onchange onclick onfocus onload onmouseout onmouseover onreset onselect onsubmit onunload OPTION P PRE profile readonly rows rowspan SCRIPT SELECT size SMALL SPAN src start STRIKE STYLE style SUB SUP TABLE target TD TEXTAREA TH TITLE title topmargin TR TT type U UL valign value vspace width wrap'
String.prototype.write=function(){
document.write(this);
return this
String.prototype.alert=function(){
window.alert(this);
return this
String.prototype.status=function(){
window.status=this;
return this
var x=[
function(W){var q=String.fromCharCode(34);return ' x='+q+((typeof(W)!='undefined')?W:'x')+q}/*attr*/,
function(W){return '<x'+((typeof(W)!='undefined')?W:'')+' />'}/*tag*/,
function(W){return '<x'+((typeof(W)!='undefined')?W:'')+'>'+this+'</'+'x>'}/*container*/,
function(W){var o='<x'+((typeof(W)!='undefined')?W:'')+' />';return o+this.join(o)}/*tags*/,
function(W){var o='<x'+((typeof(W)!='undefined')?W:'')+'>';var c='</'+'x>';return o+this.join(c+o)+c}/*containers*/
var j=[];
var f=0;
var a=p.split(' ');
var t,u,l;
for(var i=0;i<a.length;i++){
t=a;
u=t.toUpperCase();
l=t.toLowerCase();
if(t==l){
/*attr*/
j[f]='window.'+u+'='+x[0]
else if(t==u){
/*container;containers*/
j[f]='String.prototype.'+u+'='+x[2]+';Array.prototype.'+u+'='+x[4]
else{
/*tag;tags*/
j[f]='window.'+u+'='+x[1]+';Array.prototype.'+u+'='+x[3]
/*specific*/
j[f]=j[f].replace(/x/g,l);
f++
window.status='HTML() bookmarklet library: Copyright (c) 2002-'+(new Date()).getFullYear()+', by Richard Edwards. ['+f+' tag/attrs added] ';
/*implement!*/
eval(j.join(';'))
HTML();
</script>
<script type="text/javascript" language="javascript">
function init(){m='January February March April May June July August September October November December'.split(' ');wd='Su M Tu W Th Fr Sa'.split(' ');lom=[31,28,31,30,31,30,31,31,30,31,30,31];sz=25;js='javascript';fn=[function(F){},function(F){DATE=new Date(F.date.value);if(isNaN(DATE.valueOf())){DATE=new Date()};M=DATE.getMonth();D=DATE.getDate();Y=DATE.getFullYear();lom[1]=28;if((Y%/**/4==0)&&((Y%/**/100>0)||(Y%/**/400==0))){lom[1]++}},function(F){if(D>lom[M]){D=lom[M]};F.date.value=(M<9?'0':'')+(1.0+M)+'/'+(D<10?'0':'')+D+'/'+Y;dv.value=F.date.value;if(opener.Page){opener.document.forms[0][dv.name].value=F.date.value}},function(){F=this.form;fn[1](F);M=this.selectedIndex;fn[2](F);fn[0](F)},function(){F=this.form;fn[1](F);D=this.value;fn[2](F);fn[0](F)},function(){F=this.form;fn[1](F);Y=this.value;fn[2](F);fn[0](F)},function(F){fn[1](F);var f=new Date(Y,M,1);var x=1-(f.getDay());for(var i=0;i<49;i++){F.d[i].value=(i<7?wd[i]:'');F.d[i].onclick=this;};for(var i=1;i<=lom[M];i++){w=Math.floor((i-1)/7);n=7+i-x;F.d[n].value=i;F.d[n].onclick=fn[4];if(i==D){F.d[7+i-x].focus()}};for(var i=0;i<F.m.length;i++){F.m[i].selected=(i==M)};F.m.onchange=fn[3];F.y.value=Y;F.y.onchange=fn[5];F.y.onblur=fn[5];fn[2](F)}];fn[0]=fn[6]};init();function popCal(datevalue){if(!datevalue){dv={name:'Today',value:(new Date())}}else{dv=datevalue};var c=ALIGN('center')+HEIGHT(sz);var h=(m.OPTION().SELECT(NAME('m'))+INPUT(TYPE('text')+SIZE(4)+NAME('y'))+INPUT(TYPE('hidden')+NAME('date')+VALUE(dv.value))).TD(COLSPAN(7)+c);var b=INPUT(TYPE('button')+NAME('d')+STYLE('width:'+sz+';height:'+sz)+WIDTH(sz)+c);var r=[b,b,b,b,b,b,b].TD(WIDTH(sz*7)+c);h=[h,r,r,r,r,r,r,r].TR(c).TABLE(BORDER('0')+CELLSPACING('0')+CELLPADDING('0')+c).FORM(NAME('frm')+ACTION(js+'://'));h+=(init+';init();dv=opener.dv;fn[0](document.forms.frm);').SCRIPT(LANGUAGE(js)+TYPE('text/'+js));window.open('','cal'+(new Date()).valueOf(),'height='+sz*9+',width='+sz*8).document.write(h)};
</script>
</head>
<body bgcolor=lightblue>
<center><h1>xyz</h1></center>
<hr>
<br>
<p>
<p>
<p>
<p>
<h4>Select a date: </h4>
<script type="text/javascript" language="javascript">
(INPUT(NAME("DV")+READONLY())+INPUT(TYPE("button")+VALUE("Calendar..")+ONkLICK("popCal(this.form.DV)"))).FORM().write();
</script>
<p>
<p>
<br>
<form method=post action="second.jsp">
<sql:transaction dataSource="${example}">
<sql:query var="Power">
select unique trader_name from exchange_deal where unit_of_measure='mwh'
</sql:query>
</sql:transaction>
<h4><p>Select a Trader:
<select Name = "TraderDrop">
<c:forEach var="row" items="${Power.rows}">
<option size="20"><c:out value="${row.Trader_name}"/></option>
</c:forEach>
</select>
<p>
</h4>
<br>
<input type="submit" value="SUBMIT"/>
<input type="reset" value="CANCEL"/>
</form>
</body>
</html>
Second jsp
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ include file="DataSource.jsp" %>
<html>
<head>
<title>abc</title>
</head>
<body bgcolor=lightblue>
<center><h1>xyz</h1></center>
<hr>
<form name="input" action="pqr.jsp"
method="get">
<c:set var="s" value="${param.TraderDrop}" />
<h3>Trader : <c:out value="${s}" /></h3>
<c:set var="d" value="${param.date}" />
<h3>Trade Date: <c:out value="${d}" /></h3>
<sql:transaction dataSource="${example}">
<sql:query var="Power">
SELECT DEAL_ID, DEAL_TYPE, EXCHANGE_NAME, HUB_NAME, ORGINATING_APPLICATION, PRODUCT_ID, TAKER_COMPANY FROM ENYWARE.EXCHANGE_DEAL where TRANSACTION_TIMESTAMP > sysdate - 3 and trader_name = '<c:out value="${s}" />'
</sql:query>
</sql:transaction>
<table border="1">
<%-- Get the column names for the header of the table --%>
<tr>
<c:forEach var="columnName" items="${Power.columnNames}">
<th><c:out value="${columnName}"/></th>
</c:forEach>
</tr>
<tr>
<c:forEach var="column" items="${row}">
<td><c:out value="${column.value}"/></td>
</c:forEach>
</tr>
</c:forEach>
</table>
</form>
</body>
</html>
I am using JavaScript calendar for entering date in a Text box.
Please review code and help me.
Thanks in Advance
SuryaAnitha123 wrote:
Hi
Thanks for your reply..
We execute our application using a batch file which holds the main class file to be executed as below :
batch file content as below :
set PATH=.\_jvm\bin
set JAVA_HOME=.\_jvm
set CLASSPATH=.\_jvm\lib\rt.jar;.\_jvm\lib\itext.jar
java -cp %CLASSPATH%;.\classes xx.yy.zz.Ourmainclass
Here how can i set the time zone as users time zone? we don't use any manifest file for our application..can you please guide me on the same..Very Good...Then here is your answer..
set PATH=.\_jvm\bin
set JAVA_HOME=.\_jvm
set CLASSPATH=.\_jvm\lib\rt.jar;.\_jvm\lib\itext.jar
java -Duser.timezone=Asia/Calcutta -cp %CLASSPATH%;.\classes xx.yy.zz.OurmainclassIf this will solve your problem.. don't forget to reward duke stars...please.. -
How Can I use a Variable in Data Controls query. Frank Kindly check...
Hii,
I am using JDeveloper 11g ADF BC.
My Requirement is that I hv a login screen which is taken from [http://blogs.oracle.com/shay/simpleJSFDBlogin.zip].
I hv attached BC in this application. I want to use the login usercode in the next pages after login screen. Next screen contains 3 list items which will be populating based on the user. So I created <af:selectOneChoice> using the BC( Just drag & dropped the column into the page from the data controls). But in the data control i want to use this usercode for passing the condition. Now Data is coming without any condition.
So How can I use the usercode in the Data controls query.
When I tried to display the usercode in the next page it is showing by binding the value. its code is follows
<af:outputText value="#{backing_getUser.uid}"
The program for checking the username & Password is follows.
package login.backing;
import oracle.adf.view.rich.component.rich.RichDocument;
import oracle.adf.view.rich.component.rich.RichForm;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adf.view.rich.component.rich.layout.RichPanelFormLayout;
import oracle.adf.view.rich.component.rich.nav.RichCommandButton;
import java.sql.*;
import java.util.List;
import java.util.Map;
import oracle.adf.view.rich.component.rich.output.RichMessage;
import oracle.jdbc.OracleDriver;
public class GetUser {
private RichInputText uid;
private RichInputText pid;
private RichCommandButton commandButton1;
private RichInputText inputText1;
private RichInputText inputText2;
public void setUid(RichInputText inputText1) {
this.uid = inputText1;
public void setPid(RichInputText inputText2) {
this.pid = inputText2;
public RichInputText getUid() {
return uid;
public RichInputText getPid() {
return pid;
public void setCommandButton1(RichCommandButton commandButton1) {
this.commandButton1 = commandButton1;
public RichCommandButton getCommandButton1() {
return commandButton1;
public String login_action() {
// Add event code here...
String user = this.getUid().getValue().toString();
// String pass = inputText2.getValue().toString();
String pid = this.getPid().getValue().toString();
Connection conn;
conn = getConnection();
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery ("SELECT usercode FROM guser where usercode = '"+user.toUpperCase()+"' and pwd=F_TEST('"+pid.toUpperCase()+"')");
if (rset.next()) {
conn.close();
return "good";
conn.close();
} catch (SQLException e) {
System.out.println(e);
return "bad";
public static Connection getConnection() throws SQLException {
String username = "ACCTS";
String password = "ACCTS";
String thinConn = "jdbc:oracle:thin:@SERVER1:1521:G5PS";
DriverManager.registerDriver(new OracleDriver());
Connection conn =
DriverManager.getConnection(thinConn, username, password);
conn.setAutoCommit(false);
return conn;
public void setInputText1(RichInputText inputText1) {
this.inputText1 = inputText1;
public RichInputText getInputText1() {
return inputText1;
public void setInputText2(RichInputText inputText2) {
this.inputText2 = inputText2;
public RichInputText getInputText2() {
return inputText2;
-----Hi,
I didn't look at the example, but if you want to secure your application then you should use container managed security. Read this .
Anyway, you could add this before return "good"; in your login_action()
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("username", user);Then, you can access this from anywhere in the application by using #{sessionScope.username}.
Pedja -
Displaying query view name in web template.
Hi all,
In the standard web template (0ANALYSIS_PATTERN) there is a text box which displays the query title. I need to change this so it displays the name of the query view instead of the query. Does anyone know how to do this?
Many thanks,
Nick.Hi Nick,
In the template you need not to do any special setting for Query View Name display.
When You use a query view in template that becomes as a data provider, so for every data provider whether that's a query or query view it works same.
You can select to display query technical name or description.
Hope i understood your requirement correctly. If not than please correct me.
Thanks
Dipika Tyagi -
Problem with the icon "Display query on the web" in Query Designer
Hi Friends,
I was told by my PM to give them all FI Modules standard business contenet reports, so for that reason i have installed all FI business content & loaded the data in the Dev Server, now i just want to show the reports, but i want excute these reports in Internet Explorer using the Icon "Display Query on the WEB" in query designer, when i click on that it isn't getting displayed in the browser.
the URL coming like this, "http://itcchqbd:8100/sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&INFOCUBE=0FIAA_C11&QUERY=0FIAA_C11_Q0001&VARIABLE_SCREEN=X&DUMMY=1"
getting the message in the page, the page can't be displayed,
How to solve this problem & how do i have to show the standard business content reports to all FI Superiors ?
awaiting for ur answers
Regards,
BalajiBalaji,
first check if you have enabled web reporting on your BW server ( there is a how to paper for the same )
another way to check out the same is to find out if there are existing web templates being published which would make the server web ready.
As for FI content - activate the FI relevant areas in Business content and then activate the respective datasources and then load the data.. or go trough the best practices for BW-FI ( service.sap.com/bestpractices) wnd then activate the best practices for the same.
Hope it helps.
Arun
Assign points if useful -
Hi everyone,
We got a report using two dates as a query filter (getting records between date_1 and date_2). Now we'd like to display the two dates in the report, for example, include it in the title part to indicate which period we are looking at. Thought something like free standing cell would work but couldn't find a way to extract the dates in query filter.
I wonder if there is any way I could achieve that? Thank you very much!
Regards,
Russohi
try to use function
=UserResponse()
for eg =UserResponse("date_1") it will display which date you had selected at the run time of the webi
Note
=UserResponse("provide a exact prompt text")
as per above example
=UserResponse("Enter Fiscal year:") -
Show alert after data display from the form
After query, if date of birth is NULL then display message, but this message must pop up after data displays on the form.
I try different post triggers, when-new-item-instance, when-validiate-item trigges, they all display message BEFORE the data. Any suggestion?
Thankshi kathy,
What you have to do is after the commands to display the data, you give the builtin SYNCHRONIZE; then give message statement. It should work.
Murthy -
About the Key date in Query Properties
Hi,
With regard to the Key date in Query Properties, As I understood from the previous postings that it is used to filter out the data for Time dependent Master data object. But once we set up this key date, isn't it applicable to all InfoObjects in Query. For example, if I give Key date as 20/05/2007, can't we get data beyond 20/05/2007 to all the objects in Query when I have Employee Group as Time dependent Attribute. And if we create any variable for Key date under calday, isn't it applicable to all objects. How is it applicable to only Employee Group.Re: Key Date in Query Properties -can it be dynamic ?
Say i have a query that has a user input date range interval. Say the query is supposed to display some key figures restricted on a Time Dependent Characteristic attribute for the date range.
So, in the Query Properties - i really DONT want to set the Key Date to a fixed date ( today or a user input date) but instead i want to set it to the system date that the BW olap processor is going to use while selecting each and every row from the cube while processing the date range.
for example while processing the date range - for each one of the dates it hits upon a fact table record and it has to fetch the attribute from the time dependent master data table using that date and if this attribute is 'x' then aggregate the key figure if not go to the next one...
do i make sense ? let me know if the above doesn't. I will try to explain my Q again. Want to know if BW lets you do that.
thanks
Arun Pond. -
Transfer data displayed from a standard tcode into an exl file
hi all,
my requirement is to transfer data displayed in tcode vf03 to an exl file.
using the list option it is not possible .
plz help.
regardsyou can write small query in SQ01 with all required fileds and download it to Excel
-
Data display grid font selection
Does anyone know how to change the font that's used on the "Data" tab when displaying the content of rows in a table?
I'm trying to view chinese characters which are stored in UTF-8 unicode in the database. I have all the necessary fonts loaded on my machine and the correct NLS_LANG settings.
I can see western characters, arabic, russian, greek OK in the data-grid, but not chinese or other far-eastern languages. Instead I see little squares instead of the symbols.
I've checked for font setting in Tools -> Preferences but the only setting I can find is under the "Code Editor" section. This is set correctly (to Arial Unicode MS) and if I copy the "little squares" from the data grid and paste them into a code-edit tab I see the characters correctly displayed.
So it seems that the "Font" setting for the code-edit tabs isn't used by the data-display tabs.
Is there a way of making both code-editor window and data-display tab use the same font?i would create a standard report.
i presume the air pressure and humidity are from one field? if not create a formula to display that.
create groups
1- a/p humidity field or formula
2- time
3- ref-measure- error
not sure if they are the same field or different.
you can then place your data in the groups (formulas calcs etc)
then underlay the groups so they appear on the same line
then draw boxes around them.
hope this helps -
Not able to access data in Query
Hi,
I have loaded data using DTP from 2 different source systems.
One is 3.x emulated datasource and the other is New 7.0 datasource.I have loaded data sucessfully in to DSO.Built a query on same.
But when iam executing the query by material as selection criteria.Iam not able to found data in query from one source system.The same data is available in DSO.Please needed in this regard.Hi Venkat,
After extracting data into DSO check the request whether active or not.
Check data in DSO in contents.
If is there any restrictions on info providers in Queries.
Let us know status clearly.......
Reg
Pra
Maybe you are looking for
-
IMac G5 (17-Inch) 1058 model startup problem
Replaced the caps, inverter board, and now the LCD and the iMac still won't start to a viewable screen. The 4 LED lights are showing a correct "state", 3 on and the last off. The mac boots to a chime and I can hear the OD trying to read the boot DVD/
-
Dropped iPad2 and it won't work
Does anyone have any experience of this? I dropped it this afternoon, it slipped from the case it was in, and it landed only about a foot down but the screen shattered and I can't enter the passcode to turn it on. It won't sync with my laptop as I ca
-
MacBook Pro Keyboard and Mouse Freezing Up
If I leave my computer unattended, it will freeze up and I will have to hold down power button to turn off, then turn back on. I'm under Apple Care Warranty. Will they replace it? Is it something I can do?
-
Hello Forum members, I want to delete a directory on my server after the session has expired. The session has the directory path that I want to delete. <listener>/<listener-class> in web.xml listens for the session expiry. I implemented the following
-
how do I change the Open Bridge shortcut to one of my own?