Kindly check the query
The following fields are to be taken from the tables as mentioned below:
Meter Reading Unit (MRU) (EANLH-ABLEINH)
MRU Description (TE422-TERMTEXT)
Meter Reading Center (TE422-ABL_Z)
Meter Reading Center Description (TE426T-TEXT40)
End Of Meter Reading Period (TE425-TERMERST)
Main Meter Reading Unit (TE422-ZUSMIT)
Number Of Installations Allocated (EANLH-ANLAGE)
These values as shown has to taken from the 4 tables
a. EANLH
b. TE422
c. TE426T
d. TE425
The query which I have written is
SELECT AABLEINH COUNT (AANLAGE) BTERMTEXT BABL_Z BZUSMIT CTEXT40 D~TERMERST
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM ( ( (EANLH AS A INNER JOIN TE422 AS B ON AABLEINH = BTERMSCHL )
INNER JOIN TE426 AS C ON CABL_Z = BABL_Z )
INNER JOIN TE425 AS D ON DABLEINH = AABLEINH)
WHERE A~ABLEINH = 'input MRU' AND
SY-DATUM > A~AB AND
SY-DATUM < A~BIS
GROUP BY A ~ ABLEINH
Is it correct ??? If not, kindly modify.
Thx..
Hi,
There is no restriction in using the Joins as the above reply. U can join 6 and more tables also. I have done teh same.
See this sample code
TABLES: SCUSTOM, SBOOK.
DATA: COUNT TYPE I.
SELECT SCUSTOM~NAME SCUSTOM~POSTCODE SCUSTOM~CITY
<b>COUNT( DISTINCT</b> SBOOK~LOCCURAM )
INTO (SCUSTOM-NAME, SCUSTOM-POSTCODE,
SCUSTOM-CITY, COUNT)
FROM SCUSTOM INNER JOIN SBOOK
ON SCUSTOM~ID = SBOOK~CUSTOMID
WHERE SBOOK~FLDATE BETWEEN '19950101'
AND '19951231' AND
SBOOK~CARRID = 'LH ' AND
SBOOK~CONNID = '0400'
<b>GROUP BY</b> SCUSTOM~NAME
SCUSTOM~POSTCODE SCUSTOM~CITY
<b>ORDER BY</b> SCUSTOM~NAME.
WRITE: / SCUSTOM-NAME,
SCUSTOM-POSTCODE,
SCUSTOM-CITY, COUNT.
ENDSELECT.
Message was edited by: Judith Jessie Selvi
Similar Messages
-
Server does not return metadata, check the query.
Hi,
I need your help in using report designer of Bex, The issue is when we try to open a query in the report designer we get a Error Server does not return metadata, check the query.
Thanks in Advance
Kind Regards
PhutaneHi,
All the yellow and red lights will have an effect on query performance or execution. Read up on them as there are too many to explain via this forum.
There is a document on SDN on query performance. Some useful links:
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9f4a452b-0301-0010-8ca6-ef25a095834a]
[http://help.sap.com/saphelp_nw70/helpdata/en/41/b987eb1443534ba78a793f4beed9d5/frameset.htm]
[http://help.sap.com/saphelp_nw70/helpdata/en/d9/31363dc992752de10000000a114084/frameset.htm]
[http://help.sap.com/saphelp_nw04/helpdata/en/2e/caceae8dd08e48a63c2da60c8ffa5e/frameset.htm]
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0501cb9-d51c-2a10-239c-c141a22c45a6]
Cheers... -
Server does not return query metadata check the query
hi,
i want know how to use bex query designer,
when i insert a data provider,the message is appear "server does not return query metadata check the query",
who can help me ?
thanks a lot !
addition: my current entironment is: gui710 with sp4,bi710 with sp2.Hi,
All the yellow and red lights will have an effect on query performance or execution. Read up on them as there are too many to explain via this forum.
There is a document on SDN on query performance. Some useful links:
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9f4a452b-0301-0010-8ca6-ef25a095834a]
[http://help.sap.com/saphelp_nw70/helpdata/en/41/b987eb1443534ba78a793f4beed9d5/frameset.htm]
[http://help.sap.com/saphelp_nw70/helpdata/en/d9/31363dc992752de10000000a114084/frameset.htm]
[http://help.sap.com/saphelp_nw04/helpdata/en/2e/caceae8dd08e48a63c2da60c8ffa5e/frameset.htm]
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0501cb9-d51c-2a10-239c-c141a22c45a6]
Cheers... -
How to check the query, which had run how many times in a year?
<Moderator Message: ok, subject is better now but you didn't search at all. Therefore thread is locked again>
Hi All,
I want to check the Query statistics like it had run how many times in a year?
Regards,
Kiran
Edited by: Siegfried Szameitat on Dec 9, 2008 11:55 AMHi Kiran,
please follow the below steps
1. Create a query for that purpose
2. Make use of BW Statistic InfoProvider 0BWTC_C02
3. in Col: Key Figure:0TCTNAVCTR
4. in Row: 0TCTQUERY (select a variable 0TCTQUYS)
5. in Filter: BW System( 0TCTSYSID) [give yr source system name whether its production/quality)
6. in Free char you can give calmonth/year or user if want to do so.
save and execute the query
you will be asked for input the query name
As output you will be getting count (as many times query is hit by all users since the time it was created)
if you give date and user name then it will display the count accordingly.
Hope it Clarifies you.
Thanks & Regards
Nagaraju.V -
Where to check when the query was last used.
Hi all,
Where can we check the information when a particuler query was last used. (date ). Any table.
Also how can we check the same from satistics queries.Hi..
run a query and you will immediately see a new record in table RSDDSTAT (SE16) with your user-ID.
Also check the Query statistics in Tcode ST03N.
Cheers. -
Date Customer Exit in the query is not reflecting in the workbook
Hello.
We have a BI 7.0 Query where we have a restriction for req del date and billing date to show the month of current date - 2.
We have written 2 customer exit variables and we have restricted the same. The query is working well.
For Broadcasting, we have created a workbook for this query and saved it under a role.
The workbook is fine running for the current month., But if the month changes to the next, the workbook is not reflecting the same.
Still only Old dates are available in the workbook.
Please let me know if i am doing any mistakeHi Karthik,
If the customer exit variable is of type i_step = 1, ie if it is a manual entry variable as well, then this will not get updated based on teh month of execution.
Kindly check the article below for info.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/enterprise-data-warehousing/how%20to%20update%20variable%20values%20in%20broadcast%20settings%20dynamically.pdf
Regards.
Shafi. -
Error at report designer while opening the query
Hi
in report designer i am trying to open query
i am getting error like
error while loading query meta data
check the query and portal settings
i am getting this error only this report only
Diagnosis
An error occurred in the BI components on the SAP J2EE Engine.
System Response
Procedure
Contact your system administrator to have the error analyzed in detail.
Procedure for System Administration
Start the Visual Administrator, log on to the SAP J2EE Engine and choose "<J2EE_SID>" ->"Server" -> "Services" -> "Log Viewer".
The file "defaultTrace.trc" includes detailed information about the error that occurred. In Windows, you can find this file in the Log Viewer under "Cluster <computer name>" -> "Server <server number>" -> "<drive>:\usr\sap\<SID>\JC<INSTANCE>\j2ee\cluster\server<NUMBER>\log". ". In Unix, the file is located under "/usr/sap/<SID>/JC<INSTANCE>/j2ee/cluster/server<NUMBER>/log".
If the file does not include enough detail about the error, you can increase the log level to obtain more information. To do this, choose "<J2EE_SID>" -> "Server" -> "Services" -> "Log Configurator". On the "Locations" tab page, choose "com" -> "sap" -> "ip" -> "bi" -> "webapplications". Using the selection list on the right side of the screen, you can increase the log level, whereby "DEBUG" represents the log level with the most information. You can save your settings by choosing the "Save" icon. The change to the log level is active immediately. Once you have successfully analyzed the error, you should set the log level back to its default value using the appropriate pushbutton; continuous writing to the log file negatively affects the overall performance of the system.Hi Suneel,
If you are using any JAVA based applications or objects in the Report designer this error is thrown.
It's better to install Java engine to correct this error.
You must contact Basis people in order to solve this issue.
With Regards,
Ravi Kanth -
Netweaver 04s - Use of two structures in the query craeted dump
I have used two structures in a query, The same query works fine in current BW 3.5 system but in BI 7.O sandbox (copy of prod), it dumps out.
When I check the query, it does give these message (same as in PROD, where it runs without a problem).
- Different hierarchies are used for characteristic Cons Group
- Number variable ZFV_HTES cannot be replaced.
- Fiscal year variant is to be specified for key figure Cumulative (YTD) Value in Group CurrencyHi Rakesh.
Did you get a satisfactory outcome to this problem? Does the current patch of Netweaver 04S cover it?
Would appreciate your reply, please.
Patrick -
Will the query run Oracle 10g?
Hi,
Below is the structure of the emp and dept table.There is a query based on this, please let me know if this query will work ?
Table EMP
=========
EMPID NUMBER PRIMARY KEY,
NAME
ADDRESS
Table DEPT
==========
DEPTNO NUMBER,
DEPTNAME
select * from emp where empid in ( select empid from dept where dept_no = 10 ) ;Nordik wrote:
Hi,
Below is the structure of the emp and dept table.There is a query based on this, please let me know if this query will work ?
Table EMP
=========
EMPID NUMBER PRIMARY KEY,
NAME
ADDRESS
Table DEPT
==========
DEPTNO NUMBER,
DEPTNAME
select * from emp where empid in ( select empid from dept where dept_no = 10 ) ;Yes, It will run.
Oracle will first check if column EMPID exists in DEPT table.
If it does not, then it checks for the Columns presence in Outer query.
And this happens, because you did not use Table Alias. Had an Alias been used, the column would have been checked only in the Aliased table.
Moreover, you would not lose anything but to check the query on a database, would you?
Easy enough to check this, right?
create table test_table (col1 number, col2 varchar2(5));
create table test_table2 (col1 number);
select *
from test_table t1
where col2 in (select col2 from test_table2 t2 where t1.col1 = t2.col1);
no rows returned -
Extra condition added in the query
Hi All,
I have created a report but its not showing all the results.When I checked the query I saw the extra filter (where ( D1.c7 = 1 )) .I have not added any such filter.Can someone please tell me how this filter has got added and how we can avoid OBIEE to add such filter for this report.Below is the query:
select T203238.ENTITY_TYPE as c1,
T203238.ENTITY_NAME as c2,
cast(T183904.DAY as DATE) as c3,
cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'hh24'), '99') as CHARACTER ( 30 ) ) as c4,
concat(concat(concat(concat(cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'hh24'), '99') as CHARACTER ( 30 ) ), ':'), cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'mi'), '99') as CHARACTER ( 30 ) )), ':'), cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'ss'), '99') as CHARACTER ( 30 ) )) as c5,
sum(T203256.USAGE_VALUE) as c6,
ROW_NUMBER() OVER (PARTITION BY T203238.ENTITY_NAME, T203238.ENTITY_TYPE, cast(T183904.DAY as DATE) ORDER BY T203238.ENTITY_NAME ASC, T203238.ENTITY_TYPE ASC, cast(T183904.DAY as DATE) ASC) as c7
from
(Select a.entity_pk_key entity_fk_key,a.Entity_Name Entity_Name,a.Entity_Description Entity_Description,d.meaning Entity_Type,c.plant_name Site_Name, b.System_Name System_Name,a.Production_Entity Production_Entity,a.Business_Function Business_Function,E.MEANING Status from
( SELECT EQUIPMENT_PK_KEY ENTITY_PK_KEY,EQUIPMENT_Name Entity_Name, EQUIPMENT_Description Entity_Description,'EQUIPMENT' Entity_Type, plant_fk_key, System_fk_key, PRODUCTION_EQUIPMENT Production_Entity ,
NULL Business_FUNCTION, STATUS FROM MTC_EQUIPMENTS_D)a
) T203238,
apps.MTC_HOUR_MV T183904 /* Dim_445_Period_Calendar_Hour */ ,
( SELECT e.ENTITY_FK_KEY,e.ENTITY_TYPE, Sum(e.USAGE_VALUE) USAGE_VALUE ,avg(e.N_EXT_ATTR1) N_EXT_ATTR1,avg(e.N_EXT_ATTR2) N_EXT_ATTR2, hour_fk_key FROM
(SELECT ENTITY_FK_KEY,B.MEANING ENTITY_TYPE, USAGE_VALUE ,NULL N_EXT_ATTR1,NULL N_EXT_ATTR2,hour_fk_key FROM MTH_ENTITY_SUSTAIN_ASPECT A,FND_LOOKUP_VALUES B
WHERE B.LOOKUP_TYPE IN ('MTH_USER_DEFINED_ENTITIES', 'MTH_OTHER_ENTITY_TYPE')
AND B.LANGUAGE = USERENV('LANG')
AND UPPER(A.ENTITY_TYPE)=UPPER(B.LOOKUP_CODE)
AND METER_CATEGORY ='PRIMARY'
AND SUSTAIN_ASPECT='ELECTRICITY'
AND entity_fk_key=1149
AND hour_fk_key IN(7283,7294,7300,7301,7302,7303,7304,7305,7306,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7295,7296,7297,7298,7299)
)e
GROUP BY entity_fk_key,entity_type ,hour_fk_key
) T203256
where ( T183904.HOUR_PK_KEY = T203256.HOUR_FK_KEY and T203238.ENTITY_FK_KEY = T203256.ENTITY_FK_KEY and T203238.ENTITY_TYPE = T203256.ENTITY_TYPE )
group by T203238.ENTITY_NAME, T203238.ENTITY_TYPE, cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'hh24'), '99') as CHARACTER ( 30 ) ), cast(T183904.DAY as DATE), concat(concat(concat(concat(cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'hh24'), '99') as CHARACTER ( 30 ) ), ':'), cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'mi'), '99') as CHARACTER ( 30 ) )), ':'), cast(TO_NUMBER(TO_CHAR(T183904.TO_TIME, 'ss'), '99') as CHARACTER ( 30 ) ))
) D1 )
where ( D1.c7 = 1 )
Thanks a lot in advanceNo,I am not having any topn or bottomn filters in my query .
1. I am having entity type and entity name in the report which comes form the view in rpd(view defn:SELECT EQUIPMENT_PK_KEY ENTITY_PK_KEY,EQUIPMENT_Name Entity_Name, EQUIPMENT_Description Entity_Description,'EQUIPMENT' Entity_Type, plant_fk_key, System_fk_key, PRODUCTION_EQUIPMENT Production_Entity ,
NULL Business_FUNCTION, STATUS FROM MTC_EQUIPMENTS_D) .I
2. want to see the data at hour level so the hour data comes from apps.MTC_HOUR_MV .
3. I want to see sum(usage_value) for a entity type,entity name and hour dimension .Sum(usage_value) comes from the view in rpd which has the definition:SELECT e.ENTITY_FK_KEY,e.ENTITY_TYPE, Sum(e.USAGE_VALUE) USAGE_VALUE ,avg(e.N_EXT_ATTR1) N_EXT_ATTR1,avg(e.N_EXT_ATTR2) N_EXT_ATTR2, hour_fk_key FROM
(SELECT ENTITY_FK_KEY,B.MEANING ENTITY_TYPE, USAGE_VALUE ,NULL N_EXT_ATTR1,NULL N_EXT_ATTR2,hour_fk_key FROM MTH_ENTITY_SUSTAIN_ASPECT A,FND_LOOKUP_VALUES B
WHERE B.LOOKUP_TYPE IN ('MTH_USER_DEFINED_ENTITIES', 'MTH_OTHER_ENTITY_TYPE')
AND B.LANGUAGE = USERENV('LANG')
AND UPPER(A.ENTITY_TYPE)=UPPER(B.LOOKUP_CODE)
AND METER_CATEGORY ='PRIMARY'
AND SUSTAIN_ASPECT='ELECTRICITY'
AND entity_fk_key=1149
AND hour_fk_key IN(7283,7294,7300,7301,7302,7303,7304,7305,7306,7284,7285,7286,7287,7288,7289,7290,7291,7292,7293,7295,7296,7297,7298,7299)
)e
GROUP BY entity_fk_key,entity_type ,hour_fk_key
this view entity_fk_key and entity_type joins with enity_fk_key and entity_type of entity diemnsion and hour_fk_key joins with hour_pk_key of MV definition.
I am having entity type,entity name,day,hour,sum(usage_value) in the report
Thanks a lot for your help -
Hi,
I created new query in development and saved it under one role.
I transported the query and workbook to production but didnt transfer the role with query.
When I checked the query in production it is not reflecting under the required role.
Do I need to transfer the role also with the new query? However it is present in the Info area trea of Queries.
now as I have alreday transported the query and workbook to production do need to again transport these with the Role OR I can transferring the role only will be sufficient?
Thanks
JeetuIt's enought to trasnport the role in production.
Hope it helps.
Regards -
Hi Experts,
I have a query which calculates the quantity for a particular date, the results are wrong in the query. i checked the data in the psa it matches with the data from the source system, the keyfigure is set to addition in update rules.can any one let me know why am i getting the wrong results.
Thank You,Hai Shetty,
Your question is very vague. Most of the times, overwriting or addition depends on the way the system is designed and the requirement. As far as I understood. You have data in a cube or ODS and your report values donot match with the values in PSA. If thats the case, I would go step by step.
1. Select some of the records that have eronous values.
2. For the same records(based on primary keys), I would check the data in PSA and the data in ods or cube. If you have any intermediate stages, check them too. then you can findout where its going wrong.
3. If the data in one target(PSA) donot match with the immediate target(ODS or Cube), then there is certainly problem with either start routine or mapping or the addition or over writing. It depends on the system you are working on.
4. If the data in ODS or cube doesnot match with report, then you can check the query logic.
Hope this helps. Let me know if you need more information.
Thanks. -
Hi,
When I check the query, there is an error message.
Node 0HIER_NODE isnot in the hierarchy for the infoobject 0account.
No changes were done in the hierarchy. But, I reactivated the hierarchy. Still, the issue exists.
What could be the reason?
Thanks.Could happen when you have hard coded some nodes of hierarchy which no longer exist. Try following
Remove the characteristic completely from the query and try adding it back in. Activate the hierarchy an see what happens.
Adding right variables would be another thing I would check for.
Edited by: Abhijit N on Apr 13, 2011 11:08 PM -
Hi Guru's,
I have a requirement to identify the Query usage. For eg: How many times the query is executed in the last month and the users who are executing the query. We do not have BI statistics installed in the system. So please help me to identify the tables which is storing this Query related data.
Regards
SaviYou check the query run times and other details in the work load analysis (ST03) or using the table RSDDSTAT .
inorder to check the information using the above two methods -make sure the Bi stats are maintained in your system
http://wiki.sdn.sap.com/wiki/display/MaxDB/WorkloadMonitor%28ST03orST03N%29 -
QD crash while saving the query
Hello colleagues,
I have created a query, which I doubt has some issues with the message server. I forcibly saved the query and then I'm receiving a dump - RSNSB VOID Erroneous FormVar.
I can regenerate the query. But, please advice me how to prevent such errors in future.
Regards,
ArifHi,
The error you have received is a resultant of an erroneous formula variable defined in your query.
In general, if you suspect an error in the query, it is better to check the query for errors before saving it.
This way you can prevent unwanted dumps.
Regards,
Bharath
Maybe you are looking for
-
Can I install OSX 10.5.8 on a new macbook pro which comes with Lion? I would like to clone my old hard drive onto the new mac without lion causing compatibility issues????
-
MacBook Pro won't boot from Superdrive
I have a MacBook Pro which is around 7 Months old, I wanted to run Disk Warrior on it but the Macbook Pro wouldn't boot from the disk, tried the MAC install disk same issue. Holding down the C key at boot time causes the drive to spin up it gets as f
-
Digital Performer 4, manual?
Have just installed DP4 'leant' by a friend. After installing OS 10.2 it actually works! It won't on tiger. Can anyone recommend a good manual to learn to use the software. I am an artist and want to use it for recording words and sounds on several t
-
Imported bookmarks from firefox
I have imported bookmarks from Firefox in to Safari that are not allowing Safari to function properly. They've given themselves folder names of "imported 2/7/07". Since I did this Safari is slow to open, it goes into not responding several times befo
-
I keep getting this Alert: "Fonts used in some text layers are not available for activation. You will need to replace these fonts before the layers can be used for vector based output." However i went through all my text layers (everything unlocked)