Webi base on BW query based on Infoset comes back with wrong values
Hello:
I have a Webi report on an OLAP Universe, on Bex Query.
The bex query is based on 1 INFOSET.
When I run the webi report the values that comes back a totally wrong values.
The correct results are not brought back.
When I do a test with crystal reports to the infoset, I can see the correct values. (I'm aware crystal uses different drivers).
The test is BW query designer, and crystal brings back proper values from Infoset based BW query.
Webi on Infoset based BW Query comes back with wrong data.
query is simple.
Pull in 3 attributes, 3 key figures, where componentkey = "111"
I get 36 rows in Crystal and 36 rows in Bex Analyzer, 36 rows in BW query designer (web analyzer).
I get many rows in webi (almost like a CARTENSIAN product).
I search a round this forum but still did not see a conclusive answer to this problem.
But I see another thread that several others faced this same issue without a resolution.
My environment.
BOE XI 3.1 SP2
No fix packs
SAP IK 3.1 SP2
HPUX-IA64
Thanks in advance for any help.
Dwayne
Was this problem ever solved?
I am having a similar problem with an infoset based query.
I have created the BW infoset, and confirmed that the correct data is returned from the underlying infoproviders. A simple BW query on that infoset yields the same results.
Create the universe, and then the WEBI, and WEBI now shows hundreds of records where I expect 10. Data is being returned in WEBI that definitely shouldn't be there. It's almost like the restrictions applied in the characteristic restriction area of my BW query are being ignored, even if I include them in the WEBI query.
Cheers,
Andrew
Similar Messages
-
How to access query based view object in backing bean
Hi
I am using JDev11.1.2.1.0
I want to use the query result of query based view object in backing bean.
How can i do the same
Please Solve this
ThanksHi,
Assuming ADF is in the picture
1. Create a PageDef file for the page (right mouse click "Go to Page Definition")
2. In the Executable section, create an iterator for the View Object
3. In the managed bean:
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("name of Iterator");
iter.execute();
// ... navigate the iterator rows ...//
Frank -
Search on key or text in query (based on infoset)
Hi all,
I've build an infoset based on the masterdata 0employee and an ODS. After that I build a query on the infoset with in the rows the object 0employee. On this object I created a user-entry variable. By executing the query, the variable screen will be available. When I click on the search button (or F4) I only see the key values. I want to display also the TEXTvalues, is this possible...and what is my action to do?
I hope my question is understandable
Regards,
PieterThat is strange. I havent seen that happen.
Sometimes infoobjects have too many attributes and you may have to scroll a long way to get to the texts.
or does it just show the keys and nothing else ?
Did you check what the default description is set for this infoobject on the BEX tab page in infoobject maintenance. Are you filling up the text in the default (short Text) or are you filling up some other length.
Check the filter display box on this tab as well to see if you have the appropriate selection. Try changin it to see what happens.
Message was edited by:
A S -
How to increase performanceof query based on Infoset?
How to increase the performance of a query based on a Infoset?
As per designing of query, all the necessary fields are placed where they are required.Hi Akshara ,
To improve performanceof query try to remove unnecessary characteristics, attributes, or key figures ,Superfluous conditions or variables .Large InfoCubes and Complex hierarchies .Variables populated by user exits
For characteristics specify either variables or restrictions .
You can create indexes on DSO and Aggregates on cubes (if any).
Please go through the links :
http://help.sap.com/saphelp_crm40/helpdata/en/77/4a213cc534f20ae10000000a11402f/content.htm
Re: Performance of query built on infoset
Query performance issue - Infoset query
Hope you will find this helpful.
Regards,
Jaya -
Variables in the query based on infoset
Dear all,
I defined a variable on an infoObject in the query designer. However, when this infoObject was used in the infoSet, the variable I defined could not be seen. So in the infoset how can I use the variable I defined in other query not based on infoset? Please advise. Thanks.
Jin MingI have the same problem:
I created an Infoset where I am using an Infoobjet that is used in a Cube.
I have defined variables on this Infoobjet but one of them cannot be used in the new Infoset even if in the new Infoset the links between infoobjets are the same as in the Cube.
Thank you for any help.
Stanislas -
Query Based VO Can insert record (With out EO)
I have question.
I have Query Based VO (Not belongs to any EO).
I need insert record using that.
Is it possible?
Hope quick response.No.
-
Keyfigure values are incorrect in BEx Query based on infoset
Hi Experts,
I have created a infoset using 3 DSO's . 1 main DSO( from which i rquire all the data) is linked with other 2 DSO's using left outer join. DSO is linked with other 2 DSO's with a field return GUID .
Now when i am executing a query , key figure values are coming incorrectly because suppose if there is 1 record related to
RETURN GUID in main DSO and there are 4 reords in 2nd DSO with the same RETURN GUID then in infoset data 4 rows are getting created with the replication of all the fields from first DSO against those 4 rows. So in query result amount field is getting 4 times of its original value because of aggregation of all those 4 rows.
I don't have set of key fields by which i can link the all the DSO's to get unique linking of records.
How can i get the amount only one time in query result?
Hope i am clear.
Please help. I need to create report urgently.
Regards,
AjayHi Ajay:
Please take a look at the blog series provided by Sunmit Bhandari.
Infoset Keyfigure multiplicity Part 1
/people/sunmit.bhandari/blog/2009/04/14/infoset-keyfigure-multiplicity-part-1
Infoset Keyfigure multiplicity Part 2
/people/sunmit.bhandari/blog/2009/04/14/infoset-keyfigure-multiplicity-part-2
Infoset Keyfigure multiplicity Part 3
/people/sunmit.bhandari/blog/2009/04/14/infoset-keyfigure-multiplicity-part-3
Regards,
Francisco Milán. -
SAP ABAP query based on Infosets
Hi All,
We have requirement where in we will be joining 7 tables in Infoset . Dataset1
We have another 3 tables to be joined separately . Dataset2.
We need to compare the dataset 1 with dataset 2 and show the final data in output .
How can we achieve this in SAP query . If anyone has worked on this type of requirement .
Let me know ,
Thanks in Advance,
USRI believe that you can only use one infoset per query. To do any comparison, you'd need to build two separate queries and then compare the results in Excel, for example. 7 tables seems rather extreme to me though...
-
Querying the schema for table name with column value!
In my schema i have 500+ tables and other objects.
i have a column with the name BO_PRODUCT_CODE.
I wants to know in what tables the value of BO_PRODUCT_CODE='FX03'.
i have query the user_tab_columns which gives me the result with 90 tables having the column BO_PRODUCT_CODE.
What is query which will give me the exact number/name of the table whose column value is FX03. ie, BO_PRODUCT_CODE='FX03'.Hi you can use this approach:
BEGIN
v_str VARCHAR2(250);
v_count NUMBER :=0;
DECLARE
FOR loop_tbl IN ( SELECT DISTINCT table_name FROM USER_TAB_COLUMNS
WHERE column_name ='BO_PRODUCT_CODE' )
LOOP
v_str := 'SELECT COUNT(*) FROM ' || loop_tbl.table_name || ' WHERE BO_PRODUCT_CODE=||'''' ||'FX03' || '''' '
EXECUTE IMMEDIATE v_str INTO v_count ;
IF v_count > 0 THEN
DBMS_OUTPUT.PUT_LINE ('Table Name :'|| loop_tbl.table_name || ' Count :'||v_count);
END IF;
v_count :=0;
END LOOP;
EXCEPTION
WHEN others THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
Please remove if any syntax error.
Regards -
IF logic in bex Query, only want to calculate keyfiugre with all values.
Hi !
I have a pushasing flow with folowing key figur. But Im missing the invoice value but have the difference beetween them.
_____________Invoice Quantiy | PO value (Good issue) | Invoice value | PO vs Inv diff |
example one________2________________10 eur__________(10+1)_____________ 1_________this case ok
exemple 2 ________blank_____________10 eur___________(10+blank) _________blank______havent recived any invoice yet invoce value should not be calculated
My problem is that the invoice value should only shown then I have a Invoice Quantity.
I think its best to look at quatity because there mayby hard to differs on blank and 0 in the logic.
Do any one now a good solution on this, missing the IF statsments in BEX, its a 3.5 BW installation.
How should the logic look like ?
regards
Nicke
Edited by: Nicklas Åslund on Oct 16, 2008 8:28 AM
Edited by: Nicklas Åslund on Oct 16, 2008 8:31 AMIf then else statement in bex
this helped me
(( 'Cumulative Value GC' > 0 ) * 'Dummy Key Figure') + (( 'Cumulative Value GC' <= 0 ) * 15)
If 'Cumulative Value GC' > 0.
rslt = 'Dummy Key Figure'.
else.
rslt = 15.
endif.
this help me to writ the logic -
Date difference based on the conditions is giving wrong values
Hi,
In creating the formula for conditional date difference calculation,
i.e.,
if (sto date is 0) then (act date - mat rel date) else (sto date is not equal to 0) then (sto date - mat rel date)
So I tried with,
(sto date == 0) * (act date - mat rel date) + (sto date <> 0) * (sto date - mat rel date)
But I am getting a wrong value even with decimals as days can't be in decimals. Please suggest where I am going wrong in calculation.
Thanks,
Best Regards,
Darshan MSHi Darshan,
First of all, were the dates converted already to keyfigure?
If not, please check:
Convert a Characteristic into a Key Figure (BEx)
If they were already converted, try this:
(sto date == 0) * (act date - mat rel date) + (sto date - mat rel date)
Regards,
Loed -
Error while connecting executing a webi report from Bex query.
hi all,
i need to create one webi report fron Bex query based on sab BW.
But when I execute the query its shows "Unspecified error invoking method or accessing property "on change DocID"".
i didnt get this msg.
please helpHi Mohit Gupta,
Degrade the java version to java 7 update 45 and also degrade the java security level to low from medium. Also delete the java temporary files and also clear your IE browser cache as well.
This solved the issue for me.
Thanks,
Chaitanya Krishna -
HI Gurus,
I created Query based on infoset.
later, i added some fields in ODS then adjusted Infoset at T-Code RSISET.
i can see that new field here and values also coming on it.
but when i am editing Query, i am not able to see that new field.
Plz provide your inputs.SSMS,
after you change the infoset - log off and log into BeX again -... also refresh the Infoprovider window - using the refresh button at the top...
Arun -
Issue in query created on infoset - characterstic values are not displayed
Hi,
We have created a query based on an infoset(customized). In this query, values of only one object(sold-to-party) is not displayed. Where as for the same object, values are displayed in the other query created based on the respective ODS.
note : Query based on infoset is alone not coming.
This is the description of the error -
System error in program CL_RSMD_RS and IF_RSMD_RS-READ_META_DATA-02. and it is showing (No entries found).
And apart from that, the values of their respective attributes are also not displayed in the report.
I even verified the object in RSA1 where data is available for that.
Need Help to solve ....
Regards,
Chandru..Can any one answer for Issue-2. Even I am also facing the same.
Thanks in Advance. -
Sql query is hung, doesn't comes back
Hello Every one,
Two node Rac on Linux 5 64-bit, 11.2.0.1.0
In our data ware housing environment, i have a sql query which doesn't comes back at all, when i run, it is just hung for a long time with no output. I did following basic testing
1. All the indexes are valid and stats are up to date(count(*) matches num rows)
2. There is a union clause in the query, i divided the query in two parts - the first part prior to union and second part after union, then i ran those two parts separately - the first part comes back quickly with no rows selected but the second part has a main problem(its just hung).
Please note that one table in the query has a partitioned table. following is the query and the tables involved in it.
Please let me know if you need any further information, it will be of great help if i get through this. Thanks in advance.
OWNER TABLE_NAME STATUS LAST_ANAL NUM_ROWS
MAINTENANCE_DM D_VEHICLE VALID 21-NOV-12 752590
PTL_HOLD R_COMP_CODES VALID 21-NOV-12 108
PTL_HOLD USER_GEO VALID 20-DEC-12 300
PTL_EDW D_CUSTOMER VALID 20-DEC-12 219498
PTL_EDW D_LOCN VALID 20-DEC-12 19456
PTL_EDW D_VEHICLE VALID 20-DEC-12 3973271
PTL_EDW F_VEH_LOCN VALID 20-DEC-12 3131138
PTL_EDW F_RO_DETL VALID 21-NOV-12 29234052
8 rows selected.
SELECT
'../../opendoc/',
'&hideSave=true&hideEdit=true&hideRefresh=true&hideUserPromptInput=true',
'Data As Of:',
'Run Date:',
ptl_hold.get_stgextr_time('FACT_FPNA_RO'),
'RO Date',
PTL_EDW.F_RO_DETL.RO_TYP,
PTL_EDW.D_CUSTOMER.CUST_NUM,
(PTL_EDW.D_CUSTOMER.CUST_NUM )||' - '||( PTL_EDW.D_CUSTOMER.CUST_PRIME_NM),
PTL_EDW.D_CUSTOMER.BILL_GRP,
CASE WHEN PTL_EDW.D_LOCN.CORP_CD='HPTL' THEN 'US' ELSE CASE WHEN PTL_EDW.D_LOCN.CORP_CD='2000' THEN 'CANADA' ELSE 'UNKNOWN' END END,
PTL_EDW.D_LOCN.REGN_NUM,
PTL_EDW.D_LOCN.REGN_NUM ||' - '||PTL_EDW.D_LOCN.REGN_NM,
PTL_EDW.D_LOCN.AREA_NUM,
PTL_EDW.D_LOCN.AREA_NUM||' - '||PTL_EDW.D_LOCN.AREA_NM,
PTL_EDW.D_LOCN.RDIST_NUM,
PTL_EDW.D_LOCN.RDIST_NUM||' - '||PTL_EDW.D_LOCN.RDIST_NM,
PTL_EDW.D_LOCN.DIST_NUM,
PTL_EDW.D_LOCN.DIST_NUM||' - '||PTL_EDW.D_LOCN.DIST_NM,
CASE WHEN TRIM(PTL_EDW.D_VEHICLE.VEH_CAP_STAT) IN ('ACTIVE','ACCRUED') THEN 'Active' ELSE 'Inactive' END,
DECODE(PTL_EDW.D_VEHICLE.CONTR_GRP, 'X' ,'NON-CONTRACT',PTL_EDW.D_VEHICLE.VEH_CAT),
PTL_EDW.D_VEHICLE.VEH_UNIT_TYP,
PTL_EDW.D_VEHICLE.VEH_MODL_YR,
PTL_EDW.D_VEHICLE.VEH_MAKE,
PTL_EDW.D_VEHICLE.VEH_MODEL,
CASE WHEN ( PTL_HOLD.R_COMP_CODES.COMP_CD ) IN ('057','061') THEN 'Accident/Incident' ELSE 'Non-Accident/Incident' END,
PTL_HOLD.R_COMP_CODES.COMP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EY )
AND ( PTL_EDW.D_VEHICLE.VEH_KEY=PTL_EDW.F_RO_DETL.VEH_KEY )
AND ( PTL_EDW_D_RO_LOCN.LOCN_KEY=PTL_EDW.F_RO_DETL.RO_LOCN_KEY )
AND ( PTL_EDW.F_RO_DETL.CHRG_LOCN_KEY=PTL_EDW_D_CHRG_LOCN.LOCN_KEY )
AND ( CURRENT_VEH_LOCN.LOCN_KEY=PTL_EDW.F_VEH_LOCN.LOCN_KEY )
AND ( CURRENT_VEH.SCD_FLG='A' )
AND ( CURRENT_VEH.CONTR_GRP='P' )
AND ( CURRENT_VEH.CORP_CD=PTL_EDW.D_VEHICLE.CORP_CD and CURRENT_VEH.UNIT_NUM=PTL_EDW.D_VEHICLE.UNIT_NUM )
AND ( CURRENT_VEH.VEH_KEY=PTL_EDW.F_VEH_LOCN.VEH_KEY )
AND ( PTL_HOLD.R_COMP_CODES.COMP_CD=PTL_EDW.F_RO_DETL.COMP_CD )
AND
( 'Accounting Month' = 'RO Date' )
AND
( '2500' = 'NO-MIN'
OR EXISTS(SELECT RO_TOTAL_COST.RO_LOCN_KEY, RO_TOTAL_COST.ORIGINAL_RO_NUM
FROM PTL_EDW.F_RO_DETL RO_TOTAL_COST,
PTL_EDW.D_TIME DTIME
WHERE
('I' = 'I'
OR ('I' = 'E'
AND RO_TOTAL_COST.RO_TYP <> 'W'))
AND RO_TOTAL_COST.RO_LOCN_KEY = PTL_EDW.F_RO_DETL.RO_LOCN_KEY
AND RO_TOTAL_COST.ORIGINAL_RO_NUM = PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
AND RO_TOTAL_COST.RO_TIME_KEY = DTIME.TIME_KEY
AND DTIME.CALENDAR_DT BETWEEN to_date('2011-JAN-01') AND to_date('2012-SEP-24')
GROUP BY
RO_TOTAL_COST.RO_LOCN_KEY,
RO_TOTAL_COST.ORIGINAL_RO_NUM
HAVING
Sum(RO_TOTAL_COST.RO_COST) >= TO_NUMBER(translate('2500','NO-MIN',' ')))
AND
PTL_EDW_D_CHRG_LOCN.DIST_NUM_SUFX IN ('014810')
AND
( PTL_EDW.D_TIME.CALENDAR_DT BETWEEN to_date('2011-JAN-01') AND to_date('2012-SEP-24') )
AND
( 'I' = 'I'
OR
( 'I' = 'E'
And ( ( PTL_EDW.F_RO_DETL.RO_TYP ) <> 'W'
AND
( EXISTS(SELECT * FROM PTL_HOLD.USER_GEO WHERE USERID='600125729' AND PTL_HOLD.USER_GEO.GEO IN (CURRENT_VEH_LOCN.CORP_CD, CURRENT_VEH_LOCN.REGN_NUM, CURRENT_VEH_LOCN.AREA_NUM, CURRENT_VEH_LOCN.RDIST_NUM, CURRENT_VEH_LOCN.DIST_NUM)) )
UNION
SELECT
'../../opendoc/',
'&hideSave=true&hideEdit=true&hideRefresh=true&hideUserPromptInput=true',
'Data As Of:',
'Run Date:',
ptl_hold.get_stgextr_time('FACT_FPNA_RO'),
'Accounting Month',
PTL_EDW.F_RO_DETL.RO_TYP,
PTL_EDW.D_CUSTOMER.CUST_NUM,
(PTL_EDW.D_CUSTOMER.CUST_NUM )||' - '||( PTL_EDW.D_CUSTOMER.CUST_PRIME_NM),
PTL_EDW.D_CUSTOMER.BILL_GRP,
CASE WHEN PTL_EDW.D_LOCN.CORP_CD='HPTL' THEN 'US' ELSE CASE WHEN PTL_EDW.D_LOCN.CORP_CD='2000' THEN 'CANADA' ELSE 'UNKNOWN' END END,
PTL_EDW.D_LOCN.REGN_NUM,
PTL_EDW.D_LOCN.REGN_NUM ||' - '||PTL_EDW.D_LOCN.REGN_NM,
PTL_EDW.D_LOCN.AREA_NUM,
PTL_EDW.D_LOCN.AREA_NUM||' - '||PTL_EDW.D_LOCN.AREA_NM,
PTL_EDW.D_LOCN.RDIST_NUM,
PTL_EDW.D_LOCN.RDIST_NUM||' - '||PTL_EDW.D_LOCN.RDIST_NM,
PTL_EDW.D_LOCN.DIST_NUM,
PTL_EDW.D_LOCN.DIST_NUM||' - '||PTL_EDW.D_LOCN.DIST_NM,
CASE WHEN TRIM(PTL_EDW.D_VEHICLE.VEH_CAP_STAT) IN ('ACTIVE','ACCRUED') THEN 'Active' ELSE 'Inactive' END,
DECODE(PTL_EDW.D_VEHICLE.CONTR_GRP, 'X' ,'NON-CONTRACT',PTL_EDW.D_VEHICLE.VEH_CAT),
PTL_EDW.D_VEHICLE.VEH_UNIT_TYP,
PTL_EDW.D_VEHICLE.VEH_MODL_YR,
PTL_EDW.D_VEHICLE.VEH_MAKE,
PTL_EDW.D_VEHICLE.VEH_MODEL,
CASE WHEN ( PTL_HOLD.R_COMP_CODES.COMP_CD ) IN ('057','061') THEN 'Accident/Incident' ELSE 'Non-Accident/Incident' END,
PTL_HOLD.R_COMP_CODES.COMP_CD,
PTL_HOLD.R_COMP_CODES.COMP_DESC,
PTL_HOLD.R_COMP_CODES.COMP_CD||' - '||PTL_HOLD.R_COMP_CODES.COMP_DESC,
PTL_EDW.D_VEHICLE.UNIT_NUM,
PTL_EDW_D_RO_LOCN.DIST_NUM || PTL_EDW_D_RO_LOCN.DIST_SUFX || PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM,
PTL_EDW_D_RO_LOCN.DIST_NUM || PTL_EDW_D_RO_LOCN.DIST_SUFX || PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM || PTL_EDW.F_RO_DETL.RO_SEQ_NUM
PTL_EDW.F_RO_DETL.RO_SRC,
PTL_EDW.F_RO_DETL.TOTAL_LABOR_HRS,
PTL_EDW.F_RO_DETL.TOTAL_LABOR_COST,
PTL_EDW.F_RO_DETL.OUT_COST,
PTL_EDW.F_RO_DETL.PARTS_COST,
PTL_EDW.F_RO_DETL.RO_COST,
TO_CHAR(PTL_EDW_D_RO_LOCN.LOCN_KEY),
PTL_EDW.F_RO_DETL.RO_NUM,
PTL_EDW.F_RO_DETL.RO_SEQ_NUM,
PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
FROM
PTL_EDW.F_RO_DETL,
PTL_EDW.D_CUSTOMER,
PTL_EDW.D_LOCN,
PTL_EDW.D_VEHICLE,
PTL_HOLD.R_COMP_CODES,
PTL_EDW.D_LOCN PTL_EDW_D_RO_LOCN,
PTL_EDW.D_LOCN PTL_EDW_D_CHRG_LOCN,
PTL_EDW.D_LOCN CURRENT_VEH_LOCN,
PTL_EDW.F_VEH_LOCN,
PTL_EDW.D_VEHICLE CURRENT_VEH
WHERE
( PTL_EDW.F_RO_DETL.CUST_KEY=PTL_EDW.D_CUSTOMER.CUST_KEY )
AND ( PTL_EDW.F_RO_DETL.LOCN_KEY=PTL_EDW.D_LOCN.LOCN_KEY )
AND ( PTL_EDW.D_VEHICLE.VEH_KEY=PTL_EDW.F_RO_DETL.VEH_KEY )
AND ( PTL_EDW_D_RO_LOCN.LOCN_KEY=PTL_EDW.F_RO_DETL.RO_LOCN_KEY )
AND ( PTL_EDW.F_RO_DETL.CHRG_LOCN_KEY=PTL_EDW_D_CHRG_LOCN.LOCN_KEY )
AND ( CURRENT_VEH_LOCN.LOCN_KEY=PTL_EDW.F_VEH_LOCN.LOCN_KEY )
AND ( CURRENT_VEH.SCD_FLG='A' )
AND ( CURRENT_VEH.CONTR_GRP='P' )
AND ( CURRENT_VEH.CORP_CD=PTL_EDW.D_VEHICLE.CORP_CD and CURRENT_VEH.UNIT_NUM=PTL_EDW.D_VEHICLE.UNIT_NUM )
AND ( CURRENT_VEH.VEH_KEY=PTL_EDW.F_VEH_LOCN.VEH_KEY )
AND ( PTL_HOLD.R_COMP_CODES.COMP_CD=PTL_EDW.F_RO_DETL.COMP_CD )
AND
( 'Accounting Month' = 'Accounting Month' )
AND
( '2500' = 'NO-MIN'
OR EXISTS(SELECT RO_TOTAL_COST.RO_LOCN_KEY, RO_TOTAL_COST.ORIGINAL_RO_NUM
FROM PTL_EDW.F_RO_DETL RO_TOTAL_COST
WHERE
('I' = 'I'
OR ('I' = 'E'
AND RO_TOTAL_COST.RO_TYP <> 'W'))
AND RO_TOTAL_COST.RO_LOCN_KEY = PTL_EDW.F_RO_DETL.RO_LOCN_KEY
AND RO_TOTAL_COST.ORIGINAL_RO_NUM = PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
AND RO_TOTAL_COST.PARTITION_KEY BETWEEN
to_number(to_char(to_date('2011-JAN-01','YYYY-MON-DD'),'yyyymm'))
AND to_number(to_char(to_date('2012-SEP-24','YYYY-MON-DD'),'yyyymm'))
GROUP BY
RO_TOTAL_COST.RO_LOCN_KEY,
RO_TOTAL_COST.ORIGINAL_RO_NUM
HAVING
Sum(RO_TOTAL_COST.RO_COST) >= TO_NUMBER(translate('2500','NO-MIN',' '))) )
AND
PTL_EDW_D_CHRG_LOCN.DIST_NUM_SUFX IN ('014810')
AND
( (PTL_EDW.F_RO_DETL.PARTITION_KEY BETWEEN
to_number(to_char(to_date('2011-JAN-01','YYYY-MON-DD'),'yyyymm'))
AND to_number(to_char(to_date('2012-SEP-24','YYYY-MON-DD'),'yyyymm'))
AND
( 'I' = 'I'
OR
( 'I' = 'E'
And ( ( PTL_EDW.F_RO_DETL.RO_TYP ) <> 'W'
AND
( EXISTS(SELECT * FROM PTL_HOLD.USER_GEO WHERE USERID='600125729' AND PTL_HOLD.USER_GEO.GEO IN (CURRENT_VEH_LOCN.CORP_CD, CURRENT_VEH_LOCN.REGN_NUM, CURRENT_VEH_LOCN.AREA_NUM, CURRENT_VEH_LOCN.RDIST_NUM, CURRENT_VEH_LOCN.DIST_NUM)) )
);Thank you.For your own sanity, you should learn to format your code. For the sake of the forum members, you should preserve the formatting by using the \ tags.
I've done that for you here, and some other questions popped right out. Look for my embedded comments near the bottomSELECT
'../../opendoc/',
'&hideSave=true&hideEdit=true&hideRefresh=true&hideUserPromptInput=true'
'Data As Of:' ,
'Run Date:' ,
ptl_hold.get_stgextr_time('FACT_FPNA_RO'),
'RO Date' ,
PTL_EDW.F_RO_DETL.RO_TYP ,
PTL_EDW.D_CUSTOMER.CUST_NUM ,
(PTL_EDW.D_CUSTOMER.CUST_NUM )
||' - '
||( PTL_EDW.D_CUSTOMER.CUST_PRIME_NM),
PTL_EDW.D_CUSTOMER.BILL_GRP ,
CASE
WHEN PTL_EDW.D_LOCN.CORP_CD='HPTL'
THEN 'US'
ELSE
CASE
WHEN PTL_EDW.D_LOCN.CORP_CD='2000'
THEN 'CANADA'
ELSE 'UNKNOWN'
END
END ,
PTL_EDW.D_LOCN.REGN_NUM,
PTL_EDW.D_LOCN.REGN_NUM
||' - '
||PTL_EDW.D_LOCN.REGN_NM,
PTL_EDW.D_LOCN.AREA_NUM ,
PTL_EDW.D_LOCN.AREA_NUM
||' - '
||PTL_EDW.D_LOCN.AREA_NM,
PTL_EDW.D_LOCN.RDIST_NUM,
PTL_EDW.D_LOCN.RDIST_NUM
||' - '
||PTL_EDW.D_LOCN.RDIST_NM,
PTL_EDW.D_LOCN.DIST_NUM ,
PTL_EDW.D_LOCN.DIST_NUM
||' - '
||PTL_EDW.D_LOCN.DIST_NM,
CASE
WHEN TRIM(PTL_EDW.D_VEHICLE.VEH_CAP_STAT) IN
('ACTIVE','ACCRUED')
THEN 'Active'
ELSE 'Inactive'
END,
DECODE(PTL_EDW.D_VEHICLE.CONTR_GRP, 'X' ,
'NON-CONTRACT',PTL_EDW.D_VEHICLE.VEH_CAT),
PTL_EDW.D_VEHICLE.VEH_UNIT_TYP ,
PTL_EDW.D_VEHICLE.VEH_MODL_YR ,
PTL_EDW.D_VEHICLE.VEH_MAKE ,
PTL_EDW.D_VEHICLE.VEH_MODEL ,
CASE
WHEN
PTL_HOLD.R_COMP_CODES.COMP_CD
IN ('057','061')
THEN 'Accident/Incident'
ELSE 'Non-Accident/Incident'
END ,
PTL_HOLD.R_COMP_CODES.COMP_CD ,
PTL_HOLD.R_COMP_CODES.COMP_DESC,
PTL_HOLD.R_COMP_CODES.COMP_CD
||' - '
||PTL_HOLD.R_COMP_CODES.COMP_DESC,
PTL_EDW.D_VEHICLE.UNIT_NUM ,
PTL_EDW_D_RO_LOCN.DIST_NUM
|| PTL_EDW_D_RO_LOCN.DIST_SUFX
|| PTL_E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TL_EDW_D_CHRG_LOCN.LOCN_KEY
AND
CURRENT_VEH_LOCN.LOCN_KEY =
PTL_EDW.F_VEH_LOCN.LOCN_KEY
AND
CURRENT_VEH.SCD_FLG ='A'
AND
CURRENT_VEH.CONTR_GRP ='P'
AND
CURRENT_VEH.CORP_CD =
PTL_EDW.D_VEHICLE.CORP_CD
AND CURRENT_VEH.UNIT_NUM =
PTL_EDW.D_VEHICLE.UNIT_NUM
AND
CURRENT_VEH.VEH_KEY =
PTL_EDW.F_VEH_LOCN.VEH_KEY
AND
PTL_HOLD.R_COMP_CODES.COMP_CD =
PTL_EDW.F_RO_DETL.COMP_CD
AND
'Accounting Month' = 'RO Date'
AND
'2500' = 'NO-MIN'
OR EXISTS
SELECT
RO_TOTAL_COST.RO_LOCN_KEY,
RO_TOTAL_COST.ORIGINAL_RO_NUM
FROM
PTL_EDW.F_RO_DETL RO_TOTAL_COST,
PTL_EDW.D_TIME DTIME
WHERE
'I' = 'I'
OR
'I' = 'E'
AND RO_TOTAL_COST.RO_TYP 'W'
AND RO_TOTAL_COST.RO_LOCN_KEY =
PTL_EDW.F_RO_DETL.RO_LOCN_KEY
AND RO_TOTAL_COST.ORIGINAL_RO_NUM =
PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
AND RO_TOTAL_COST.RO_TIME_KEY =
DTIME.TIME_KEY
AND DTIME.CALENDAR_DT BETWEEN to_date(
'2011-JAN-01') AND to_date(
'2012-SEP-24')
GROUP BY
RO_TOTAL_COST.RO_LOCN_KEY,
RO_TOTAL_COST.ORIGINAL_RO_NUM
HAVING
SUM(RO_TOTAL_COST.RO_COST) >= TO_NUMBER
(TRANSLATE('2500','NO-MIN',' '))
AND PTL_EDW_D_CHRG_LOCN.DIST_NUM_SUFX IN (
'014810')
AND
PTL_EDW.D_TIME.CALENDAR_DT BETWEEN to_date(
'2011-JAN-01') AND to_date('2012-SEP-24')
AND
'I' = 'I'
OR
'I' = 'E'
AND
PTL_EDW.F_RO_DETL.RO_TYP
'W'
AND
EXISTS
SELECT
FROM
PTL_HOLD.USER_GEO
WHERE
USERID ='600125729'
AND PTL_HOLD.USER_GEO.GEO IN (
CURRENT_VEH_LOCN.CORP_CD,
CURRENT_VEH_LOCN.REGN_NUM,
CURRENT_VEH_LOCN.AREA_NUM,
CURRENT_VEH_LOCN.RDIST_NUM,
CURRENT_VEH_LOCN.DIST_NUM)
UNION
SELECT
'../../opendoc/',
'&hideSave=true&hideEdit=true&hideRefresh=true&hideUserPromptInput=true'
'Data As Of:' ,
'Run Date:' ,
ptl_hold.get_stgextr_time('FACT_FPNA_RO'),
'Accounting Month' ,
PTL_EDW.F_RO_DETL.RO_TYP ,
PTL_EDW.D_CUSTOMER.CUST_NUM ,
(PTL_EDW.D_CUSTOMER.CUST_NUM )
||' - '
||( PTL_EDW.D_CUSTOMER.CUST_PRIME_NM),
PTL_EDW.D_CUSTOMER.BILL_GRP ,
CASE
WHEN PTL_EDW.D_LOCN.CORP_CD='HPTL'
THEN 'US'
ELSE
CASE
WHEN PTL_EDW.D_LOCN.CORP_CD='2000'
THEN 'CANADA'
ELSE 'UNKNOWN'
END
END ,
PTL_EDW.D_LOCN.REGN_NUM,
PTL_EDW.D_LOCN.REGN_NUM
||' - '
||PTL_EDW.D_LOCN.REGN_NM,
PTL_EDW.D_LOCN.AREA_NUM ,
PTL_EDW.D_LOCN.AREA_NUM
||' - '
||PTL_EDW.D_LOCN.AREA_NM,
PTL_EDW.D_LOCN.RDIST_NUM,
PTL_EDW.D_LOCN.RDIST_NUM
||' - '
||PTL_EDW.D_LOCN.RDIST_NM,
PTL_EDW.D_LOCN.DIST_NUM ,
PTL_EDW.D_LOCN.DIST_NUM
||' - '
||PTL_EDW.D_LOCN.DIST_NM,
CASE
WHEN TRIM(PTL_EDW.D_VEHICLE.VEH_CAP_STAT) IN
('ACTIVE','ACCRUED')
THEN 'Active'
ELSE 'Inactive'
END,
DECODE(PTL_EDW.D_VEHICLE.CONTR_GRP, 'X' ,
'NON-CONTRACT',PTL_EDW.D_VEHICLE.VEH_CAT),
PTL_EDW.D_VEHICLE.VEH_UNIT_TYP ,
PTL_EDW.D_VEHICLE.VEH_MODL_YR ,
PTL_EDW.D_VEHICLE.VEH_MAKE ,
PTL_EDW.D_VEHICLE.VEH_MODEL ,
CASE
WHEN
PTL_HOLD.R_COMP_CODES.COMP_CD
IN ('057','061')
THEN 'Accident/Incident'
ELSE 'Non-Accident/Incident'
END ,
PTL_HOLD.R_COMP_CODES.COMP_CD ,
PTL_HOLD.R_COMP_CODES.COMP_DESC,
PTL_HOLD.R_COMP_CODES.COMP_CD
||' - '
||PTL_HOLD.R_COMP_CODES.COMP_DESC,
PTL_EDW.D_VEHICLE.UNIT_NUM ,
PTL_EDW_D_RO_LOCN.DIST_NUM
|| PTL_EDW_D_RO_LOCN.DIST_SUFX
|| PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM,
PTL_EDW_D_RO_LOCN.DIST_NUM
|| PTL_EDW_D_RO_LOCN.DIST_SUFX
|| PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
|| PTL_EDW.F_RO_DETL.RO_SEQ_NUM ,
PTL_EDW.F_RO_DETL.RO_SRC ,
PTL_EDW.F_RO_DETL.TOTAL_LABOR_HRS ,
PTL_EDW.F_RO_DETL.TOTAL_LABOR_COST ,
PTL_EDW.F_RO_DETL.OUT_COST ,
PTL_EDW.F_RO_DETL.PARTS_COST ,
PTL_EDW.F_RO_DETL.RO_COST ,
TO_CHAR(PTL_EDW_D_RO_LOCN.LOCN_KEY),
PTL_EDW.F_RO_DETL.RO_NUM ,
PTL_EDW.F_RO_DETL.RO_SEQ_NUM ,
PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
FROM
PTL_EDW.F_RO_DETL ,
PTL_EDW.D_CUSTOMER ,
PTL_EDW.D_LOCN ,
PTL_EDW.D_VEHICLE ,
PTL_HOLD.R_COMP_CODES ,
PTL_EDW.D_LOCN PTL_EDW_D_RO_LOCN ,
PTL_EDW.D_LOCN PTL_EDW_D_CHRG_LOCN,
PTL_EDW.D_LOCN CURRENT_VEH_LOCN ,
PTL_EDW.F_VEH_LOCN ,
PTL_EDW.D_VEHICLE CURRENT_VEH
WHERE
PTL_EDW.F_RO_DETL.CUST_KEY =
PTL_EDW.D_CUSTOMER.CUST_KEY
AND
PTL_EDW.F_RO_DETL.LOCN_KEY =
PTL_EDW.D_LOCN.LOCN_KEY
AND
PTL_EDW.D_VEHICLE.VEH_KEY =
PTL_EDW.F_RO_DETL.VEH_KEY
AND
PTL_EDW_D_RO_LOCN.LOCN_KEY =
PTL_EDW.F_RO_DETL.RO_LOCN_KEY
AND
PTL_EDW.F_RO_DETL.CHRG_LOCN_KEY=
PTL_EDW_D_CHRG_LOCN.LOCN_KEY
AND
CURRENT_VEH_LOCN.LOCN_KEY =
PTL_EDW.F_VEH_LOCN.LOCN_KEY
AND
CURRENT_VEH.SCD_FLG ='A'
AND
CURRENT_VEH.CONTR_GRP ='P'
AND
CURRENT_VEH.CORP_CD =
PTL_EDW.D_VEHICLE.CORP_CD
AND CURRENT_VEH.UNIT_NUM =
PTL_EDW.D_VEHICLE.UNIT_NUM
AND
CURRENT_VEH.VEH_KEY =
PTL_EDW.F_VEH_LOCN.VEH_KEY
AND
PTL_HOLD.R_COMP_CODES.COMP_CD =
PTL_EDW.F_RO_DETL.COMP_CD
AND
'Accounting Month' = 'Accounting Month'
AND
'2500' = 'NO-MIN'
OR EXISTS
SELECT
RO_TOTAL_COST.RO_LOCN_KEY,
RO_TOTAL_COST.ORIGINAL_RO_NUM
FROM
PTL_EDW.F_RO_DETL RO_TOTAL_COST
WHERE
'I' = 'I'
/* what's the point? A literal always equals itself. /*
OR
'I' = 'E'
/* again, what's the point? This will never be true */
AND RO_TOTAL_COST.RO_TYP 'W'
AND RO_TOTAL_COST.RO_LOCN_KEY =
PTL_EDW.F_RO_DETL.RO_LOCN_KEY
AND RO_TOTAL_COST.ORIGINAL_RO_NUM =
PTL_EDW.F_RO_DETL.ORIGINAL_RO_NUM
AND RO_TOTAL_COST.PARTITION_KEY BETWEEN
to_number(TO_CHAR(to_date('2011-JAN-01','YYYY-MON-DD'),'yyyymm')) AND
to_number(TO_CHAR(to_date('2012-SEP-24','YYYY-MON-DD'),'yyyymm'))
/* what is the data type of PARTITION_KEY? This manipulation strongly suggests that it should be DATE and isn't.
GROUP BY
RO_TOTAL_COST.RO_LOCN_KEY,
RO_TOTAL_COST.ORIGINAL_RO_NUM
HAVING
SUM(RO_TOTAL_COST.RO_COST) >= TO_NUMBER(TRANSLATE('2500','NO-MIN',' '))
AND PTL_EDW_D_CHRG_LOCN.DIST_NUM_SUFX IN (
'014810')
AND
PTL_EDW.F_RO_DETL.PARTITION_KEY BETWEEN
to_number(TO_CHAR(to_date('2011-JAN-01',
'YYYY-MON-DD'),'yyyymm')) AND to_number(
TO_CHAR(to_date('2012-SEP-24',
'YYYY-MON-DD'),'yyyymm'))
AND
'I' = 'I'
OR
'I' = 'E'
AND
PTL_EDW.F_RO_DETL.RO_TYP
'W'
AND
EXISTS
SELECT
FROM
PTL_HOLD.USER_GEO
WHERE
USERID ='600125729'
AND PTL_HOLD.USER_GEO.GEO IN (
CURRENT_VEH_LOCN.CORP_CD,
CURRENT_VEH_LOCN.REGN_NUM,
CURRENT_VEH_LOCN.AREA_NUM,
CURRENT_VEH_LOCN.RDIST_NUM,
CURRENT_VEH_LOCN.DIST_NUM)
Maybe you are looking for
-
Photoshop CS4, Intous 3 and Windows 7 - strange work
Hello. I have Windows RTM 64bit, Intous 3 latest driver (29.09.09), Adobe Photoshop CS4. And when I work in Photoshop with brush some times it draws normally with pressure, but sometimes NOT. The difference is pen movement during first pen touch. If
-
Anyone aware of a step by step guide to setup lion server?
Anyone aware of a step by step guide to setup lion server? Looking to bin my SBS and movr to lion server but need an idiots guide to step by step setup.
-
wew, where do i start,,, ummm, i tampered with the battery and when i inserted it on the netbook something burned (i saw smoke coming out of the board where the battery is inserted particularly the positive and negative or inbetween them), why, becau
-
Document splitting - GSP_LZ2
Hello Gurus In the t-code GSP_LZ2 I'd like to ask the meaning of the function of override document splitting, that there is in New General Ledger in ECC 6.0. In the help is written: This indicator is used to specify whether the internal derivation of
-
Data Size in QT inspector is vastly different than Finder
Hi all, I am looking at the size of my QT movie files in the finder, and comparing the size to the Data Size in the QT Inspector window. I notice that the average video has a difference of a few percentage points between the Inspector and the Finder.