Query Structure

Hi
I want to create a 2 structure in a column with 2 keyfigures and one(1)  Characteristics  But i don't know how to proceed when i created the structure and trying to  add Characteristics it is not accepting please some one suggest me my query output should look like below.
                               Debit                                                                                Credit
Amount         Quantity    A/cNumber(debit)                                            Amount                Quantity              A/cNumber(credit)
So here i am planing to create Debit as 1 structure and Credit as one structure please some one help me on this
Thanks,
AshaKP
Edited by: AshaKP on Jan 19, 2011 5:39 PM

Hi,
You can only create two structures in the Query designer and one has to be of key figures and the other must contain characteristics.
You cant create both with key figures in it.
Regards,
MD

Similar Messages

  • Issues with Bex query structures and Crystal Reports/Webi

    Hi experts,
    I'm having an issue with Bex Query structures and nulls. I've built a Crystal Report against a Bex query that uses a Bex Query structure. The structure looks like the following
    Budget $
    Budget %
    Actual $
    Actual %
    Budget YTD
    etc
    if I drag the structure into the Crystal Report detail section with a key figure it displays like this
    Budget $     <null>
    Budget %     <null>
    Actual $     300
    Actual %     85
    Budget YTD     250
    the null values are displayed (and this is what is required). However if I filter using a Record selection or group on a profit centre then the nulls along with the associated structure component are not displayed.
    Actual $     300
    Actual %     85
    Budget YTD     250
    Webi is also behaving similarly. Can anyone explain why the above is happening and suggest a solution either on the Bex side of things or on the Crystal Reports side of things? I'm confused as to why nulls are displayed in the first example and not the second.
    Business Objects Edge 3.1 SP2
    SAP Int Kit SP2
    OS: Linux
    BW 701 Level 6
    Crystal Reports 2008 V1
    Thanks
    Keith

    Hi,
    Crystal Reports and Web Intelligence will only show data which is in the cube. You could have an actual 0 or Null entry whithout grouping but by changing the selection / grouping in the report the data does not include such entry anymore.
    ingo

  • Dynamic selection in query structure

    Hi everyone,
    I wonder if it is possible to create dynamic selections in a query structure. Here is my scenario:
    In the columns section of my query I have a structure with all months of a year. Depending on the time of the year, all past months shall contain "actuals" whilst the upcoming months contain "forecast" data. (As far as I know) Using variables, I should be able to fill and name each month dynamically using variables. If it's March now, I would have the following resulting structure:
    - "Jan - Actual"  (containing actuals)
    - "Feb - Actual" (containing actuals)
    - "Mar - Forecast" (containing forecast)
    - "Apr - Forecast" (containing forecast)
    Each month is represented by a selection (if I understand correctly).
    Is it possible, to show or hide such a selection dynamically? The reason I ask: for the current period (March) I also want to display the "current" value (besides the forecast). Unfortunately, this selection moves a long the structure as time moves on: this month, the "current" shall be placed right before "Mar - Forecast".
    - "Jan - Actual"  (containing actuals)
    - "Feb - Actual" (containing actuals)
    - "Mar - Current" (containing currents)
    - "Mar - Forecast" (containing forecast)
    - "Apr - Forecast" (containing forecast)
    Next month it shall be right before "Apr - Forecast".
    - "Jan - Actual"  (containing actuals)
    - "Feb - Actual" (containing actuals)
    - "Mar - Forecast" (containing forecast)
    - "Apr - Current" (containing currents)
    - "Apr - Forecast" (containing forecast)
    Is this possible with BW 3.5? Or otherwise with BI 7? Or is this requirement too dynamic?
    Thanks in advance, Dan

    Hi,
    as already mentionned you can do that with the help of variables.
    For the "moving" column one solution would be to systematically create the column for each month and restrict it to the current month. Only one of this column will get a result different than 0. Then you enable the zero suppresion at query level and allow as well the suppression of the element of your structure (will will hide all the non current columns). This solution is not so elegant but would work.
    Othewise it shoul be also possible to make it with a complex variables implementation (ABAP etc...); in thery that should be possible, the question is it worth the time to develop it so sophisticated??
    hope this helps...
    Olivier.
    Edited by: Olivier Cora on Jan 9, 2008 12:38 PM

  • How to work with sap bw bex query structure

    Dear Friends,
    How can we use SAP BW bex query structure in crystal reports.
    Thanks with regards.
    Malik

    i have two structure in my query.
    and structure is comming in my Crystal report.
    i have 10 memebers in that structure and i make display off for some of members .
    but in crystal all of members are comming either its property is hidden or not.
    any help higly appricated.
    Regards
    Malik

  • WARNING BRAIN (230):Could not buffer query structures.

    Hi
    We are trying to run a OOTB report and we are getting redirected to Bex but we are getting the following error in the UI
    Unknown Error: [object Object].
    com.sap.bi.base.application.exceptions.AbortMessageRun
    timeException: Termination message sent
    WARNING BRAIN (230):Could not buffer query structures.
    Buffer too small
    Could you please suggest how to proceed further on this?
    Regards
    Neel

    Hi Neel,
    As the message indicates the query you are trying to execute is too large.  You might have to request your basis team to add more memory for this report execution.
    Secondly of this reason we do not recommend anybody to run the SPM - Spend Analysis Final query as is, because we have a whole bunch of dimensions & measures in the query.  If you have a lot of data in your system then the system would need quite a bit of resources to run this query.
    I would request your basis team to look into the query cache parameters (Global & Local cache size) and see if they can be increased.  Also check query caching persistence mode and see what works best.
    Regards,
    Rohit

  • Mantaining closed the query structure when launching a query from "query mg

    Hi,
    Is it possible to maintain closed the query structure window when launching a query from the "Query manager" menu?
    As say, if I want to see the query syntax, I must click on the "Display query structure" symbol.
    Now the query results windows, always starts with the "query structure" opened. 
    Thanks
    Antonio

    Hi Antoni,
    Only system built-in queries allow that.  We could not control this button to hide query by default.  You may post it as a DRQ on this forum:
    /community [original link is broken]
    Thanks,
    Gordon

  • Dynamic query structures with restrictions - is this possible

    Hi experts,
    We have a client that has hard coded query structures, much to our chagrin.  These structures change quarterly and because the structures are used across several queries and workbooks, I need to find a new solution that will makes the dynamic and can be updated in production.  We have investigated the use of hierarchies for this, and unfortunately this will not work.
    Also, their queries are locked down in production, so all changes must transport from Dev to QA to Production.  This setting is mandated from the parent company, so changing this is not possible.
    Question:  Is it possible to write a WebDynpro or ABAP program that will allow users to change these hard coded structures?  What tables would be used for this?   I'm hoping we can create custom tables that dynamically populate the structures of the query, but I have doubts this can be done. 
    I suspect this is a stretch, but I'm hoping somebody might have attempted this. 
    Any ideas would be appreciated.  We're proficient in BI so any suggestions would be great.
    Example structure:
    P&L Structure
    Revenue ......................(restricted on Revenue GL accounts)
    Out of Pocket Revenue.....(restricted on Out of Pocket GL accounts)
    Total Revenue...................(total of the Revenue and Out of Pocket Revenue from above)
    Best,
    Larry

    ...to put a maintainable table in front of the users can be as easy as creating a  'parameters' cube and putting an input ready query on it. Lots of other options, such as a simple custom table and a gui based form to maintain, but I've used exit variables looking up values from custom parameter cubes a great deal in planning applications.
    Another alternative may be to add a new attribute to your gl accounts to indicate the nominal reporting group, and base your variable exits or row structures on that, leaving your users simply to mainain their GL Account Mastre data as required.
    Edited by: Andrew Trousdell on Jun 18, 2010 4:07 AM

  • Query structure with parameter

    Hi,
    Consuming the web service, results in a xml with complex structures.
    The function below query structure
    <CcResultItems TemplateName="CgrInfo_1">
    My question is how to reorganize query to get results from structure
    <CcResultItems TemplateName="CgrOwners_4">
    which should return three rows.
    Regards,
    Kostadin
    create or replace
    FUNCTION WS_SELECT_XML  RETURN VARCHAR2 AS
    XML_VAR XMLTYPE := XMLTYPE (
    '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Header>
          <XmlSoapHeader xmlns="https://test.wstestx.com/XWS2/"/>
       </soap:Header>
       <soap:Body>
          <ProcessRequestResponse xmlns="https://test.wstestx.com/XWS2/">
             <ProcessRequestResult><![CDATA[<CcResponse>
    <CcResultItems TemplateName="CgrInfo_1">
    <CcResultItem><InfoMessage></InfoMessage><IsitTerminated>0</IsitTerminated><IdObject>365124</IdObject><ObjectlName>BlueRed</ObjectlName><ObjectTaxNumber>305089321502</ObjectTaxNumber></CcResultItem>
    </CcResultItems>
    <CcResultItems TemplateName="CgrUnits_2">
    </CcResultItems>
    <CcResultItems TemplateName="CgrActors_3">
    <CcResultItem><IdObject>365124</IdObject><UnitNo>0</UnitNo><EntityTYPEcode>1</EntityTYPEcode><EntityTYPEdesc>Person</EntityTYPEdesc></CcResultItem>
    </CcResultItems>
    <CcResultItems TemplateName="CgrOwners_4">
    <CcResultItem><IdObject>365124</IdObject><EntityTYPEcode>1</EntityTYPEcode><EntityTYPEdesc>Person</EntityTYPEdesc><OwnerID>610697843014</OwnerID><OwnerName>ALEX</OwnerName></CcResultItem>
    <CcResultItem><IdObject>365124</IdObject><EntityTYPEcode>1</EntityTYPEcode><EntityTYPEdesc>Person</EntityTYPEdesc><OwnerID>840645947005</OwnerID><OwnerName>JOHN</OwnerName></CcResultItem>
    <CcResultItem><IdObject>365124</IdObject><EntityTYPEcode>2</EntityTYPEcode><EntityTYPEdesc>Company</EntityTYPEdesc><OwnerID>703454</OwnerID><OwnerName>BROWN</OwnerName></CcResultItem>
    </CcResultItems>
    <CcResultItems TemplateName="CgrActivities_5">
    </CcResultItems>
    <CcResultItems TemplateName="CgrMembership_6">
    </CcResultItems>
    <CcResultItems TemplateName="CgrFounding_7">
    <CcResultItem><IdObject>365124</IdObject><FoundingDate>8/16/2007 1:53:00 PM</FoundingDate><Total>146701.00</Total></CcResultItem>
    </CcResultItems>
    </CcResponse>]]></ProcessRequestResult>
          </ProcessRequestResponse>
       </soap:Body>
    </soap:Envelope>
    BEGIN
    FOR R IN (
    WITH T AS( SELECT ( XML_VAR ) COL FROM DUAL)
    SELECT x2.*  
       FROM XMLTable(
              XMLNamespaces(
                'http://www.w3.org/2003/05/soap-envelope' AS "soap"
              , default 'https://test.wstestx.com/XWS2/'
            , 'soap:Envelope/soap:Body/ProcessRequestResponse/ProcessRequestResult'
              passing XML_VAR
              columns CcResponse clob path '.'
            ) x1
          , XMLTABLE(
              '/CcResponse/CcResultItems'
              PASSING XMLPARSE(DOCUMENT X1.CCRESPONSE)
              COLUMNS
                      TemplateName  VARCHAR2(140) PATH '@TemplateName'
                    , IDOBJECT      VARCHAR2(140) PATH 'CcResultItem/IdObject'   
                    , OBJECTLNAME   VARCHAR2(340) PATH 'CcResultItem/ObjectlName'               
                   , VRSKA  VARCHAR2(140)    PATH  'CcResultItem'                
            ) X2   
               WHERE X2.TemplateName ='CgrInfo_1'
    --           WHERE X2.TemplateName ='CgrActors_3'
    --           WHERE X2.TemplateName ='CgrOwners_4'            
    ) LOOP
    DBMS_OUTPUT.PUT_LINE(  '   IdObject: ' || R.IDOBJECT ||  '   ObjectlName: ' || R.ObjectlName || '   TemplateName '||R.TemplateName);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE( '-- end --' );
      RETURN NULL;
    END WS_SELECT_XML;

    Based on your query, I am going to assume that you started with
    Extract data from webservice response
    I believe this is the modification that you are looking for
    FOR R IN (
       SELECT x2.TemplateName, x3.idobject, x3.OWNERID
          FROM XMLTable(
                 XMLNamespaces(
                   'http://www.w3.org/2003/05/soap-envelope' AS "soap"
                 , default 'https://test.wstestx.com/XWS2/'
               , 'soap:Envelope/soap:Body/ProcessRequestResponse/ProcessRequestResult'
                 passing XML_VAR
                 columns
                 CcResponse clob path '.'
               ) x1
          , XMLTABLE(
              '/CcResponse/CcResultItems[@TemplateName="CgrOwners_4"]'
              PASSING XMLPARSE(DOCUMENT X1.CCRESPONSE)
              COLUMNS
                      TemplateName  VARCHAR2(20) PATH '@TemplateName'
                    , ItemXML       XMLTYPE       PATH 'CcResultItem'
            ) X2
          , XMLTABLE(
              '/CcResultItem'
              PASSING x2.itemXML
              COLUMNS
                      IDOBJECT      VARCHAR2(20) PATH 'IdObject'  
                    , OWNERID       VARCHAR2(20) PATH 'OwnerID'
            ) X3
    As Odie's post points out.  The first XMLTable (x1) retrieves the contents of ProcessRequestRequest and by doing so, removes the CDATA tag.  We now have a CLOB that looks like XML.  The second XMLTable (x2) converts that CLOB into an XMLType and looks for the node that matches the XPath.  This is where I hard-coded in your request to look for a specific node.  As that desired node has a repeating structure that you want to retrieve each row for, I passed the repeating structure into the third XMLTable (x3) so it could parse them.  You could combine x2 and x3 by using XQuery, but I would suggest starting with this method as I find it is easier to understand what is happening.
    To test this outside of your code, simply replace the line
    passing XML_VAR
    with
    passing XMLTYPE('...contents of the SOAP Message...')
    and run the query.  You can do this to debug the query as you and simply do a SELECT * to see what all is being passed from XMLTable to XMLTable this way to verify the correct data is being passed.

  • API to access query structure / bad performance Bex query processor

    Hi, we are using a big P&L query structure. Each query structure node selects a hierarchy node of the account.
    This setup makes the performance incredible bad. The Bex query processor caches and selects per structure node - which creates an awful mass of unnecessary SQL statements. (It would be more useful to try to merge the SQL statements as far as possible with an group by account to generate bigger SQL statements.)
    The structure is necessary to cover percentage calculations in the query, the hierarchy is used to “calculate” subtotals by selecting different nodes on different levels.
    I am searching now for a different approach to cover the reporting requirement - or - for a API to generate out of the master structure smaller query structures per area of the P&L. It there any class to access the query structure?
    We tried already to generate data entries per node level (duplicating one data record per node where it appears with an characteristic for the node name). But this approach generates too many data records.
    Not using hierarchy nodes would make the maintenance terrible. To generate "hard" selections in the structure out of the hierarchy an API to change the structure be also useful.

    The problem came from a wrong development of exit varibale used in Analysis Authorization
    Edited by: SSE-BW-Team SSE-BW-Team on Feb 28, 2011 1:46 PM

  • GetSelectedMember does not work on BEx Query Structure

    Hi
    Has anyone seen the following behaviour:
    I have a BEx query
    I created a design studio application that accesses the BEx query
    The application displays a column chart. When you select a column, it 'jumps' to another tab that displays the detail in a table.
    I used the following std. script
    DS_DET.setFilter( "ZBCFLG005", CHART_1.getSelectedMember( 'ZBCFLG005' ) ); 
    TABSTRIP_1.setSelectedTabIndex(1);
    My issue is: when my Bex query uses a structure as a source for the chart, then getSelectedMember does not seem to provide the selected structure value (member) i.e. a simple structure filtered by characteristic ZBCFLG005.
    However, when I change my BEx query by removing the structure and simply reporting the characteristic ZBCFLG005 in the rows, then getSelectedMember works i.e. provides the selected structure value (member).
    How do I get Design Studio to read the member value from the BEx structure or is this a potential bug?
    Thx

    Hi Stephen,
    I do not think this is a bug, I have used characteristic structures quite extensively without having an issue.
    Are you using setfilter against a characteristic or against a characteristic structure?
    In your example, you are using a characteristic in both, to filter from, and to filter to:
    DS_DET.setFilter( "ZBCFLG005", CHART_1.getSelectedMember( 'ZBCFLG005' ) );
    But if you use a characteristic structure, you should also use it also in bith from and to, e.g.:
    DS_DET.setFilter( "00O2TG4C8BB5D9L8PYOLHP7N8", CHART_1.getSelectedMember( '00O2TG4C8BB5D9L8PYOLHP7N8' ) );
    Best regards,
    Victor

  • Query structure problem

    Hi,
    I need to create a query with a column structure described bellow:
    Key figure .................|.. 0Quantity .....|.. 0Amount
    Posting period ...........|.. # .................|.. Var1 (5,6, 7, ... 12)
    The problem is that the column 0quantity should show only a figure for the entire year and the 0amount should show figures only for periods while the number of periods shown for 0amount is a variable range. 0amount should not show a figure for entire year (for #).
    Creating two different queries does not seem like a solution as an expandable account hierarchy should be shown on the rows. The hierarchy should show the same view for both 0quantity and 0amount when a node is opened by user.
    Any suggestions how to solve this?
    Aino
    Edited by: Aino Tuominen on Apr 2, 2008 11:36 AM
    Edited by: Aino Tuominen on Apr 2, 2008 11:37 AM
    Edited by: Aino Tuominen on Apr 2, 2008 11:46 AM
    Edited by: Aino Tuominen on Apr 2, 2008 11:47 AM
    Edited by: Aino Tuominen on Apr 2, 2008 11:48 AM
    Edited by: Aino Tuominen on Apr 2, 2008 11:49 AM
    Edited by: Aino Tuominen on Apr 2, 2008 11:52 AM

    To see the periods for 0amount also 0quantity will have the periods shown as they are both in columns. This is not what I want. I only want to have period "#" shown for for 0quantity and periods "1-12" for 0amount. Even if I have restricted these they will be shown as both 0amount and 0quantity are in the same structure for columns.

  • Query structure problem (i think)

    hi am trying to get selected strings out of a jlist
    and concanate them into a query i dont have any
    problems getting the strings out of the list and
    into the query ,i think that my problem lies within
    the structure of my query.i am trying to create a new
    user for a database and set their privleges when i run
    the program and create a new user every things fine as
    long as the only value that i select from the
    privilegs list is "ALL PRIVILEGES" or "CREATE" any ther values
    and i get a connection failure to the MySQL server. could any one tell
    me where i am going wrong or knows the structure of another query
    that can do the same job???
    cheers gerry
    final String privilegetype[] = {"SELECT","INSERT","UPDATE","DELETE","CREATE"
    ,"DROP","ALL PRIVILEGES"};
    String databasename[] = {"garage","music store",};
    //the query where mk=the selected string from privilegetype,
    mkk=the selected string from databasename,
    name=new username,new String(pass)=the new user password
    s.executeUpdate ("GRANT "+mk+" ON "+mkk+" TO "+name+" @"+host+"
    IDENTIFIED BY '"+new String(pass)+"' WITH GRANT OPTION");

    Output the actual query string and see if you can run it outside Java. If you cannot, then it's a database/SQL problem, not a Java problem. If you can, come back and post more details.

  • Problem with BW query/Structure in Xcelsius

    I Build a universe based on a BW Query with structure.
    I created an excel/live office file of this universe and data are  correctly returned.
    But when using the live office imported in Xcelsius and click on preview with the option of refresh on load enable, the column of the query with the structure does not display the description of the indicators (product A, product B, product C), but a  tecnical name (selection1, selection2, selection3).
    Any suggestions!?
    Best Regards,
    Danilo

    Hi Ingo,
    The problem in configuration in tab View in application options of Live Office
    Column Heading = Field Description (correct)
    Best Regards
    Danilo

  • Bex query structure authorization error when copying to Y name

    Hi Gurus,
    We are having a issue in BEX query. As per design, our IT team can copy Z queries to Y queries and modify/create Y queries in production but they cannot update/change Z queries.
    One of the Z query is having structure and BW IT team is trying to copy that query to Y namespace but they can't edit the structure/key figures within that new Y query. . We created a ‘Y Structure’ within a ‘Y Query’ but still cannot edit/modify that Y-Structure. S_RS_COMP and S_RS_COMP1 has full access restricted by Y* in reporting component field.
    Can anyone please help how should we proceed ?
    PS: We don't have problem with other queries which don't have structures.
    Regards,
    Salman

    HI Salman,
    Looks like the structure is globally defined and thats the reason why the team is not able to edit it
    Thanks
    Abhishek Shanbhogue

  • "where used" list for query structures

    Hello Community,
    A structure is a re-useable BEx query object. I'm using the older version of BW 3.5, and we need to be able to identify the following :
    which structures have been used by a given query (using the query's technical name) ?
    which queries already make use of a given structure (using the structure's technical name) ?
    Any useful instructions would be so helpful.
    Thanks!
    Keith Helfrich

    Hi,
    You can get the where used list of the structures bu checking in query designer itself for where used list.
    Other option is : for both parts of your question you can get the infrmation from table RSZELTDIR.
    Here you will get the ELTUID . To find the relation between ELTUID and query technical name (COMPUID), check the my wiki below for exploring the relations below:
    http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
    -Vikram

  • Expand/Collapse query structure?

    Hi all,
    I'm working with a structure in a BW query. In this BW query you have the possibility to expand or collapse structure nodes. Is it possible to overwrite this property in Design Studio?
    I tried to use the scripting formula DS_1.collapseNode("technical ID structure", "technical ID member structure") but it doesn't work.
    Any ideas?
    Thanks, Vanessa

    Hi Vanessa,
    I had the same case on my project(not a real hierarchy, but a structure).
    I've implemented it using a button - I have an image of a + and a -  that collapses and expands the hierarchy.
    try to do it with a button or and image (in the onClick event). and if it works, you can call this event from startup or in background processing.
    about your second answer, in design studio:
    go to your datasource ->right click->edit initial view
    there you will see the query exactly as you defined it in bex.
    change the hierarchy expand\collapse state, and click ok.
    the data in the crosstab will change accordingly.
    hope it helps,
    Roman

Maybe you are looking for