Ad-hoc query generation question

I have a LTS which has 5 tables -
Item,
Purchase_Categories,
Order_Management_Categories,
Inventory_Categories,
Costing_Categories
Now each %_categories table is joined to Item table in physical layer. In the LTS however, each %_Categories table has an outer join with the Item table so that if a category does not exist, the item is still displayed.
When I run a query where I select a column from Item and a column from Purchase_Categories, OBIEE still generates a query
SELECT ITEM.COLUMN1,
PURCHASE_CATEGORIES.COLUMN2
FROM ITEM left outer join purchase_categories ON ...
left outer join order_management_categories ON ...
left outer join inventory_categories ON...
left outer join costing_categories ON ....
I was expecting that OBIEE would generate a query select only the tables which were need i.e. the expected query was -
SELECT ITEM.COLUMN1,
PURCHASE_CATEGORIES.COLUMN2
FROM ITEM left outer join purchase_categories ON ...
I have seen that in some cases, OBIEE selects only the table that is required to generate the join based on the column selected, even though there are multiple tables in the joined in the LTS i.e. if the query is selecting columns from only 1 table and there are 2 tables in the LTS, OBIEE generates a query with only one table which has the column being selected.
Why this difference in behavior during query generation ? Why does OBIEE intelligently select a specific table from the LTS definition some case and in other cases does not ?

In case of outer join oracle applied all the join conditions defined among LTes. In normal joins it is able to figure out the correct source for column and does the trimming.
Edited by: user596996 on Mar 20, 2009 6:33 AM

Similar Messages

  • Questions in Ad Hoc Query & How to Configure the EEO standard reports

    Hi all,
      I have a  question in Ad hoc query report in HR.
    <b>How to:</b> Get a list of the total number of employees included in a particular report at the end of the report. Ex: If i create and run a report for salaried employees, sorted out by company codes, how can i get a sub-total and total no. of employees listed in the report.
    I tried Ranked format, but when you print the report it doesn't retain the report name on the top.
    -->I have a question regarding the Standard reports for EEO and AAP
    <b> How do I</b>
    1. Start configuring these report
    2. What are the things i should have before configuring it in IMG
    If anyone can provide me with some documentation regarding the EEO and AAP report configuration that would be great.
    Thanks in advance.....
    Harish

    This can be done using the security for the Infoprovider,  provide the users access to create queries only for that Infoprovider.

  • Help in Ad-hoc query and Hr form editor

    any body have material links of Ad-hoc query(it means how the reports are generated with Ad-hoc query) and Hr form editor(with examples) plz forward it to me???????????

    Hi,
    HR Ad Hoc Query is the special version of InfoSet Query with the HR object selection.
    You can find the system documentation here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/f9/cc9138e4a0341fe10000009b38f8cf/frameset.htm
    However I doubt the use of documentation of the query generator. So what is your concrete question?
    Or in any R/3 via application help of transaction SQ01.
    Also HR580 is a good course.
    Regards,
    Michael

  • Object selection on Ad-Hoc Query

    One of our users has created an infoset based on LDB PCE and selecting PA and PD objects. If this is ran through Ad-hoc query there is the option to restrict selections using "persons along the org structure" which gives the tree repreesentation that the user can then  easily expand and click through.
    If the user runs the infoset through SAP query this function does not seem to be available.
    Can anyone advise if/how to enable this selectin  of org structure positions through the tree structure in SAP query?
    If not, does anyone know if there is a specific reason it's not possible?
    Thanks
    Phil

    Martin,
    In SAP HR we have 3 Logical Data Base which we can use to get the information output as report
    1 . PNP/PNPCE - This database contains PA,TIME,and PAYROLL infotype & Tables (0000 - 0999 & 2000 - 2999)
    2. PCH - this database contains PD infotype and tables (1000  for OM and 5000 for TEM)
    3. PAP - This database contains recruitment infotype and tables (0001,0002, 4000 - 4999)
    When we want to create a query we have to choose from one Logical database only ... if u want the output from different Logical database the it will be development program/report which is done by the Help of technical consulant (ABAP)
    Hope this gives you the general information on ADHOC Query
    In your question you trying to get output from PA and PD both has different database of each
    so the output which you are expecting will not reflect
    even if you create infoset .... the out put shows the values/information of the specified Logical database only rest of the fields will mark as blank in the report.
    Conclution
    if  you want to create reports for Bussiness events, qualifications, Positions all are different objects so you need to create different infoset
    Hope you get some idea
    Thanks and Regards
    Rajeshk

  • Benefit cost reporting in ad hoc query

    Is it possible to use ad hoc query to report on future dated benefit cost changes?  I have tried several different ways but have not been successful.
    I tried changing the date of the reporting period to match that of the effective date for the benefit cost change but the system still outputs the old costs.
    I also tried using the benefit cost calculation date as a selection field and then enter the effective date for benefit change but that did not work either.
    Does anyone have any insight?  Thanks in advance for your input!

    Did you ever find an answer to your question?  I am having the exact same issue.  Unless a new infotype is saved with the dates that coincide with the cost configuration change, I cannot report on the new cost via Ad hoc or SAP query.  The only thing that works is the standard health plan cost report but my users prefer to use query so they can get every field they need.

  • Ad hoc query missing amounts

    Hi:
    I'm having problems in order to obtain amounts from a custom infotype, this custom infotype (9001) is attached to the positions. When I try to obtain information about amounts that I have store in the custom infotype with the ad hoc query, I have the following error:
    Error when generating the report (see long text)
    Message no. AQ_AD_HOC221
    Diagnosis
    The report cannot be generated because the internal description is invalid or incomplete, or because the selection screen is too large.
    Regenerate the assigned InfoSet, and read the log. If the InfoSet is OK, make sure that at least one field is given as output.
    If you used the 'Refresh' icon to start the query, use the 'Output' menu option to execute the query. This gives you a full screen display of the data.
    If an output was generated, the query cannot work with actual data in the construction view. In this case, always use the 'Output' function to execute the query.
    And I just tried to obtain information of 1 record.
    I'm in 640 version.
    Thanks in advance!!

    Hi Antonio,
    Without knowing the structure of your custom infotype, it is difficult to identify the cause of your problem.  I would first start with that - use transaction SE11 and make sure the infotype structure and definition for the requested field are correct and activated. 
    Since the infotype is tied to Position, I would create a new PCH based Infoset (SQ02) with the Position as the key.  Then include the IT1001, 1005, 9001, etc as well as the IT0000, 0001, 0002, etc. for Person as Holder.  Generate the Infoset, assign it to your user group (via SQ03) and then create an Ad Hoc Query with it. 
    It is also possible the custom infotype may not work in Ad Hoc, but could if the query is created directly in SQ01.  I would also give that a try.  Again, the problem is probably in the custom infotype and the field itself or in the generation of your infoset. 
    Paul

  • Ad hoc query report geneartion

    Hi Guys,
    I am seeking your help on ad hoc query report generation.
    My requirement: There is a customized table maintained to fetch the description and the relevant data.. For ex: 
    Type of Vehicle
    Description
    XYZ
    Test description1
    ABC
    Test description 2
    The requirement is to fetch the description using ad-hoc query for all the type of vehicles. I have created a type of vehicle field and included in the field group. So far, I am able to get the type of vehicle on my ad-hoc report. But, the description fails to retrieve. Please note I have also created an additional description field on ad-hoc reports to fetch the description.. After the generation of the info set, I am unable to fetch the type of vehicle with the description.
    Can anyone please guide the field code that needs to be maintained specially to fetch the contents all together?
    Thanks.
    BP

    Hi,
    I have already mentioned that "Please note I have also created an additional description field on ad-hoc reports to fetch the description."

  • Ad-hoc Query & Ad-hoc Query Designer

    Hi Experts,
                   Please present some information about following question:
    1) Ad-hoc Query and Ad-hoc Query Designer.
    2) Under which senario we go for Ad-hoc Query instead of normal query.
    3) How it will be effective in reporting.
    4) How to get into Ad-hoc Query Designer, coz i couldn't  find anything in the Bex
    points vl be rewarded.thank you.
    Regards,
    Vasanth.D

    Hi,
    Check out the following link:
    http://help.sap.com/saphelp_nw70/helpdata/en/08/965b423be8de54e10000000a155106/frameset.htm
    Regards,
    Kishore

  • Ad hoc query text field reference

    Hi all,
    Faily new to all this and wonder if you have any insight on the following:
    In ad hoc query I'm adding additional fields to a functional area. They subsequently show up in SQ02 in the left hand pane tree structure for that functional area.
    Now, if I double click on one of the additional fields the most central pane shows the details of this field. One of the boxes in there called 'References' contains a field 'Text field' that associates a long text with the code that the field contains.
    As a made-up example: the add. field could be Personnel Area, value "XY01", and it is associated with a field Personnel Area Long Text that contains "Xeta Yoyo Regional Office". This is the association shown in 'References' -> 'Text Field'.
    My problem is that this 'Text field' field seems to be populated automatically, that is there is some kind of automatic link between the field and the foreign field that contains its associated long text. Also it's greyed out so un-editable.
    Does anyone know where this relationship comes from? Does anyone know how to be able to edit this 'Text field' field?
    Grateful for help,
    Richie

    Ok, I'll try to be a bit clearer.
    For infosets in Ad Hoc Query, a field has an option to be related to another, different field that provides the long text version of this. Example: field P1000-OTYPE 'object type' is related to T7770-OTEXT 'object type text'.
    This relationship is displayed for each infoset additional field: right click on the add. field ->  display/change definition, text identification ->  'Determine LIKE reference using text field' in the pop up window.
    Problem is this text field is <b>always</b> greyed out and uneditable. So the question was, how do you set this yourself?
    Hope this clarifies stuff, thanks for any help,
    Richie

  • How to Modify the Ad-hoc Query Infoset of Standard Area.

    Hi all,
    Am having problem with Ad-hoc Query.
    i need to modify ZHR_PA_01 Infoset, this is an infoset available in Satandard Area.
    For displaying the Infoset, am Unsing T-code : S_PH0_48000510
    As of my knowledge Using T-Code SQ01& SQ02.... we can create , Change, delete the Infosets of Global Area.
    But
    please any body can tel me,How to Change the Infoset of Standard Area
    How to add the New Field Group to this Standard area infoset.
    Thanks in Advance.
    Points will be rewarded.
    Regards,
    Kalam A.

    Hi Prakash,
    thank u very much,
    yes, i have added the new Infotype 9105 to data fields.
    1.but this infotype in Data fields is showing as P8003.
    could you tel me why this is showing like this.?
    2.i have a field "Priority" in the existing "Critical Role" Field Group.
    n My requirement is
    "Add the Priority Field text description as an additional output field. the Numeric value stored in the Proirity field can be lookied up in the YHRPRIOX table,Object Type ZR."
    3.After adding fields to newly created Field Group, is there any think to do the Coding or Changes.
    4.After adding i have saved it & Generated the Infoset, i got few warnings.
    and Could you tel me How to test this..??
    Could you provide me, if any links or materials for this..?
    Please dont feel bad for all asking all the questions
    Cos am very new to Ad-hoc Querry and i have gone through the Documents in Help.sap.com.Am unable to find the above questions.
    So
    Could you please answer to my questions.
    Thanks&Regards,
    Kalam A.

  • A ad-hoc query tuning

    Hi,
    I have a ad-hoc query generated by OBIEE like below , in production, it runs 4 minture, then start to fetch rows, in staging it runs
    284019 rows selected.
    Elapsed: 00:27:15.26
    --so is there any way to shorten time? thanks
    select /*+ result_cache */ SUBSTR(OC.RECALL_DATE, 5,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 7,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 0,4) as created_Date,
    SUBSTR(AF.FINAL_BILL_DATE, 5,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 7,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 0,4) || ' - B'as bill_Date,
    SUBSTR(AF.WRITEOFF_DATE, 5,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 7,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 0,4) ||' - W' as writeoff_Date,
    RF.REGION_DESCRIPTION,
    RL.RISK,
    DA.ACCOUNT_TYPE_DESC,
    C.CATEGORY_DESC,
    DR.DISCONNECT_REASON||' - '||DISCONNECT_REASON_DESC||' - DR' ,
    S.STATE_CODE,
    ST.STATUS_DESC,
    --LOB.LOB_FINALS_DESC||' - LOB',
    AT.U_FINALS_STATUS_DESCRIPTION,
    RC.OCA_REFERRAL_TYPE_DESC,
    DO.U_Agency_Status,
    DO.oca_parent_cd||'-'||oca_parent_desc,
    RR.OCA_REFERRED_REASON_DESC,
    CASE WHEN CR.CREDIT_REPORT_CODE in ('1','2','3','4','N','E', 'O','V','6','7') then CR.CREDIT_REPORT_CODE||' - '||CR.CREDIT_REPORT_DESC ELSE '0 - UNKNOWN' END,
    CL.U_COLLECTOR_CODE,
    -- Enhancement of May release for WR 60615RC2 A2R
    case when AF.RECORDSTATUSIND='A2R' then 'Yes - A2R' else 'No - A2R' end as A2R_Status,
    COUNT(distinct AF.ACCOUNT_ID) AS no_of_accounts,
    SUM(OC.RECALL_AMOUNT) AS amount
    FROM
    T_AGG_CANRET_BS BS,
    F_OCA_REFERRED OC,
    D_ACCOUNT_FINALS AF,
    D_DATE D,
    D_REGION_FINALS RF,
    D_CREDIT_CLASS RL,
    D_DISCONNECT_REASON DR,
    D_CATEGORY C,
    D_STATE S,
    V_D_ACCOUNT_STATUS_FINAL ST,
    V_D_FINALS_ACCOUNT_STATUS AT,
    D_ACCOUNT_TYPE DA,
    D_OCA_REFERRAL_TYPE RC,
    V_D_OCA DO,
    D_OCA_REFERRED_REASON RR,
    D_CREDIT_REPORT CR,
    V_D_COLLECTOR CL
    -- D_LOB_FINALS LOB
    WHERE
    OC.SOURCE_BILL_SUMMARY_ID=BS.BILL_SUMMARY_ID_FINALS AND
    BS.ACCOUNT_ID=AF.ACCOUNT_ID AND
    AF.REGION_ID=RF.REGION_ID AND
    OC.RECALL_DATE=D.DATE_ID AND
    AF.RISK=RL.CREDIT_CLASS_ID AND
    AF.LOB_ID=DA.ACCOUNT_TYPE_ID AND
    BS.CATEGORY_ID=C.CATEGORY_ID AND
    AF.DISCONNECT_REASON_ID=DR.DISCONNECT_REASON_ID AND
    AF.STATE_ID=S.STATE_ID AND
    -- AF.LOB_ID_FINALS=LOB.LOB_FINALS_ID AND
    AF.BILL_STATUS_ID=ST.ACCOUNT_STATUS_ID AND
    AF.ACCOUNT_STATUS_ID=AT.FINALS_ACCOUNT_STATUS_ID AND
    RC.OCA_REFERRAL_TYPE_ID=OC.OCA_REFERRAL_TYPE_ID AND
    DO.OCA_TIER_ID=OC.OCA_TIER_ID AND
    RR.oca_referred_reason_code=OC.RECALL_REASON_ID AND
    CR.CREDIT_REPORT_ID=AF.CREDIT_REPORT_ID AND
    CL.COLLECTOR_ID=OC.COLLECTOR_ID AND
    OC.RECALL_DATE > 19000101 AND
    UPPER(RR.OCA_ACTION)='RECALL' AND
    CL.COLLECTOR_CODE <> 'FINAL_SYS_COL'
    ---AND BS.LAST_QTS_UPD_DT > to_char(trunc(sysdate)-7,'YYYYMMDD')
    --AND CR.CREDIT_REPORT_CODE= CASE WHEN CR.CREDIT_REPORT_CODE in ('1','2','3','4','N','E','V','6','7') then CR.CREDIT_REPORT_CODE ELSE 'O' END
    GROUP BY
    SUBSTR(OC.RECALL_DATE, 5,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 7,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 0,4) ,
    SUBSTR(AF.FINAL_BILL_DATE, 5,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 7,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 0,4) || ' - B',
    SUBSTR(AF.WRITEOFF_DATE, 5,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 7,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 0,4) ||' - W' ,
    RF.REGION_DESCRIPTION,
    RL.RISK,
    DA.ACCOUNT_TYPE_DESC,
    C.CATEGORY_DESC,
    DR.DISCONNECT_REASON||' - '||DISCONNECT_REASON_DESC||' - DR',
    S.STATE_CODE,
    ST.STATUS_DESC,
    -- LOB.LOB_FINALS_DESC||' - LOB',
    AT.U_FINALS_STATUS_DESCRIPTION,
    RC.OCA_REFERRAL_TYPE_DESC,
    DO.U_Agency_Status,
    DO.oca_parent_cd||'-'||oca_parent_desc,
    RR.OCA_REFERRED_REASON_DESC,
    CASE WHEN CR.CREDIT_REPORT_CODE in ('1','2','3','4','N','E', 'O','V','6','7') then CR.CREDIT_REPORT_CODE||' - '||CR.CREDIT_REPORT_DESC ELSE '0 - UNKNOWN' END,
    CL.U_COLLECTOR_CODE,
    -- Enhancement of May release for WR 60615RC2 A2R
    case when AF.RECORDSTATUSIND='A2R' then 'Yes - A2R' else 'No - A2R' end;

    jerrygreat wrote:
    Hi,
    I have a ad-hoc query generated by OBIEE like below , in production, it runs 4 minture, then start to fetch rows, in staging it runs
    284019 rows selected.
    Elapsed: 00:27:15.26
    --so is there any way to shorten time? thanks
    select /*+ result_cache */ SUBSTR(OC.RECALL_DATE, 5,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 7,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 0,4) as created_Date,
    SUBSTR(AF.FINAL_BILL_DATE, 5,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 7,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 0,4) || ' - B'as bill_Date,
    SUBSTR(AF.WRITEOFF_DATE, 5,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 7,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 0,4) ||' - W' as writeoff_Date,<snip>
    OC.RECALL_DATE > 19000101 AND<snip>
    GROUP BY
    SUBSTR(OC.RECALL_DATE, 5,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 7,2) || '/' ||
    SUBSTR(OC.RECALL_DATE, 0,4) ,
    SUBSTR(AF.FINAL_BILL_DATE, 5,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 7,2) || '/' ||
    SUBSTR(AF.FINAL_BILL_DATE, 0,4) || ' - B',
    SUBSTR(AF.WRITEOFF_DATE, 5,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 7,2) || '/' ||
    SUBSTR(AF.WRITEOFF_DATE, 0,4) ||' - W' ,Like others I had issues with the formatting, you should fix that. I've a question and a suggestion
    1) You use the result cache hint (on an ad-hoc query!!? but never mind?) Perhaps it runs in prod in 27 mins the first time and then 4 mins.
    2) Make your dates use the date datatype. Then you can avoid the horrible functions where they hurt and make things clearer.
    Otherwise you'll need to post the usual formatted using {code tags} execution plans from both prod and dev.

  • Are there any standar iview that works with transaction Ad-hoc Query?

    Are there any standar iview that works with transaction Ad-hoc Query?
    So, I want the same iview for the various querys.
    Are there any iview how this?

    I am working with Portal and HR.
    Now, we are looking for to make a query, get the generated code, and insert it in a rfc. So, i could make a java web dynpro and call the rfc. But this is not the best solution.
    My question is about are there any standard iview for this scenario.
    Do you know?

  • Out put problem in Ad hoc query reports

    Hi Gurus,
    I am tryting to generate a report through Ad hoc query in S_PH0_48000510 - Ad Hoc Query SAP/Query/HR_ADM - > Selected several options like personnel number / employee name / entry date / leaving date.
    But when we select it shows the input details but when i try for output the entry date / leaving date even the names of the employees are not reflecting.
    But the age/date of birth other fields are coming in output.
    Kindly let me know the solution to get a out put. If there is any changes need to be done in the back end. Pls advice with the path details.
    Thanks & Regards,
    Pradeep Krishnamurthy

    Hi Madhu,
    Yes, I did but out put is not coming.
    Regards,
    Pradeep Krishnamurthy

  • How to disable Wizard in Ad-hoc Query Designer

    Hi everybody,
    I am using the Bex Ad-hoc Query Designer in a web application. The users should be able to define their own queries, but just for one info provider. I selected the info provider in the properties of the ad-hoc query designer in the web template.
    Now the users are able to create queries for all info providers with the wizard.
    Is it possible to disable the wizard or to disable all buttons at the top of the ad-hoc query designer.
    Thanks in advance,
    Joerg

    This can be done using the security for the Infoprovider,  provide the users access to create queries only for that Infoprovider.

  • How to add an Infotype to an exsting Infoset (ad hoc query)

    Hi,
    How to add an Infotype (Ex. 0025) to an exsting Infoset (ad hoc query)?
    I was trying by clicking on 'Extras' tab & create...I get three options, create field, create table or create structure.
    I am not sure which to use or is there any other way? Pls. let me know the steps...
    Also what is this 'Package', which is aked whenever you create or change an Infoset.
    Pls. suggest.
    Tnx
    SKR

    I was able to add the infotype by adding the table as PA0025 & include all the fields in the field group.
    When I check, I get the following error:
    "Access to PA0025 with sequence no. 01"
    Message Text
       Access to PA0025 with sequence number 01
    Technical data
    Message type__________ W (Warning)
    Message class_________ AQ (Message texts for SAP Query)
    Message number________ 006
    Message variable 1____    Access to PA0025 with sequence number 01
    Message variable 2____ 
    Message variable 3____ 
    Message variable 4____ 
    Message attributes
    Level of detail_______ 4 (Level of detail 4)
    Problem class_________ 3 (medium)
    Sort criterion________ 
    Number________________ 1
    Do we need to input the sequence no. as 00? or is their anything else that I have to maintain?
    Tnx
    SKR

Maybe you are looking for

  • In the Options box, no matter what I set my Home Page to (Current Pages, Blank Page, Default) I am unable to change my homepage settings; they absolutely will not change and I can't figure it out.

    Up to about a month ago, I never had any problems setting my Home Page to Using Current Pages. Then, all of a sudden, I am unable to make any changes to my Home Page no matter what I change the settings to. I work for the US Forest Service and I don'

  • Mail crashing at start - up

    Hi I am wondering if you can help. Over the last few weeks I have been having trouble with mail. I looked up the advice given to other mac users over this problem and removed the plist (?) file and then added it again once mail had begun working as I

  • FMS Flex Live - simple

    Does any one have a example (simple) of flex grabbing video and playing it while using flash media server? . Looking to learn this a little better. The LiveDocs aren't much help. http://flash-communications.net/technotes/fms2/flex2FMS/index.html I ha

  • Navigation on measure heading in pivot view

    i have a question that, i want to navigate to another report if i click on column heading of measure.(for ex: region, dollars are the columns and if i select on dollars heading, need to navigate to another report specified.) My report was developed u

  • Ff.5 upload error

    we have defined one house bank SCB01, account ID SCB01, G/L 10600120 in FBZP G/L 10600120 is for bank reconcillation purpose. in the bank determination/bank selection/bank accounts of FBZP, I defined SCB01/ check/ USD/SCB01/10600122 for bank subaccou