Hierarchies in BW 3.5

Hi all,
Can anybody tell me what is Hierarchies in infoobject with suatable example ,i am very new to this and i want create Hierarchies , for this what i should have to do ???
thanks and regards
Ankit modi.

Hi Ankit,
check these links:
For creation of Employees:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20a709c1-0a8e-2a10-21b4-f779728c63bf
Hierarchy:
Load from Flat file:
/people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
http://help.sap.com/saphelp_nw04s/helpdata/en/fa/e92637c2cbf357e10000009b38f936/frameset.htm
How to download hierarchy to Flat file:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
Hope this helps.......
Rgs,
I.R.K

Similar Messages

  • Values not getting displayed in the selection screen for Hierarchies?

    Hi All,
      Our system was upgraded from BW 3.1 to 2004s. The quality system displayes values when query result is filtered for a hierarchy infoobject but the production system does not display any values and sometimes throws an error 'The operation failed because of a server error. See system logs.' There is no changes done for hierarchies in both the systems.
    Please let me know if anyone has had similar problems.
    Thanks,
    Krishna

    Hi All,
      Our system was upgraded from BW 3.1 to 2004s. The quality system displayes values when query result is filtered for a hierarchy infoobject but the production system does not display any values and sometimes throws an error 'The operation failed because of a server error. See system logs.' There is no changes done for hierarchies in both the systems.
    Please let me know if anyone has had similar problems.
    Thanks,
    Krishna

  • Report  performance with Hierarchies

    Hi
    How to improve query performance with hierarchies. We have to do lot of navigation's in the query and the volume of data size very big.
    Thanks
    P G

    HI,
    chk this:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
    Query Performance – Is "Aggregates" the way out for me?
    /people/vikash.agrawal/blog/2006/04/17/query-performance-150-is-aggregates-the-way-out-for-me
    ° the OLAP cache is architected to store query result sets and to give all users access to those result sets.
    If a user executes a query, the result set for that query’s request can be stored in the OLAP cache; if that same query (or a derivative) is then executed by another user, the subsequent query request can be filled by accessing the result set already stored in the OLAP cache.
    In this way, a query request filled from the OLAP cache is significantly faster than queries that receive their result set from database access
    ° The indexes that are created in the fact table for each dimension allow you to easily find and select the data
    see http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    ° when you load data into the InfoCube, each request has its own request ID, which is included in the fact table in the packet dimension.
    This (besides giving the possibility to manage/delete single request) increases the volume of data, and reduces performance in reporting, as the system has to aggregate with the request ID every time you execute a query. Using compressing, you can eliminate these disadvantages, and bring data from different requests together into one single request (request ID 0).
    This function is critical, as the compressed data can no longer be deleted from the InfoCube using its request IDs and, logically, you must be absolutely certain that the data loaded into the InfoCube is correct.
    see http://help.sap.com/saphelp_nw04/helpdata/en/ca/aa6437e7a4080ee10000009b38f842/content.htm
    ° by using partitioning you can split up the whole dataset for an InfoCube into several, smaller, physically independent and redundancy-free units. Thanks to this separation, performance is increased when reporting, or also when deleting data from the InfoCube.
    see http://help.sap.com/saphelp_nw04/helpdata/en/33/dc2038aa3bcd23e10000009b38f8cf/content.htm
    Hope it helps!
    tHAK YOU,
    dst

  • BW hierarchies issue with BOBJ Reporting tools

    Hi All,
    Brief about the requirement:
    Our client was using Mainframe and other tools for their reporting. Now as they have planned to go for SAP, purchased SAP BW 7 and SAP BOBJ XI 3.1 for warehouse and reporting purposes.
    Initial Road map planned for implementation was
    o     to use Crystal for operational and formatted reporting
    o     to use WebI for Ad hoc and interactive reporting
    o     to use Xcelsius for Dashboards
    Once we started analysing the requirements, we observed that client requires hierarchies extensively for reporting and they donu2019t want to compromise in that for reporting. At this situation we have explored the options and came to know from the SAP sites that BO got limitations in case of BW hierarchies. But we not able to articulate the what is the exact issue. Is it with only WebI or Crystal also?
    What we have articulated is we cannot report the hierarchies in BO in terms of nodes - > Sub nodes -> sub nodes instead we can do as fixed columns. Please add me if i am missing anything else.
    And also please let us know options. Options that we were thinking are Implement with BO XI 3.1 considering Advanced analysis tool then upgrade to BO XI 4.1.
    Please suggest us, what is the BW & BO hierarchy issue and right tools to use.
    Thanks & Regards,
    Bala

    Our client uses XI 3.2 but is experiencing issues with Hierarchical BEX queries returning blanks - the mdx is fine - just webi that seems to have a problem and I'm also trying to determine in exactly which instances this occurs.
    XI 4.x supposedly resolves mots issues but here again details are not known.
    I.e. hopefully someone can point to an info source that describes in more detail what issues are likely to occur re hierarchies and webi.

  • How can I use one hierarchical table as a node of another hierarchical tabl

    I have a requirement where I have two hierarchical tables and one table should  work as node for other table . How to achieve this??
    To elaborate more the structure is like
    Main Table (Company Structure)
    Sub table “Consolidation Groups” which has got hierarchical structure
    Sub table “Entity” which is also hierarchical.
    The Entity table should act as a node for table “Consolidation Groups”
    How can I achieve this functionality??
    Thanks
    Suvarna

    you misunderstood me apparently. I said you can't organinze to tables so one serves as a node's value of the other. Let me show you wnat I suggested by an example.
    First table has such values:
    -A
    |-B
    |-C
    and the second one is
    -x
    |-y
    |-z
    -p
    |-r
    |-s
    I thought you wanted to confine relationships between them so fo B node be able to select only x's branch and for C - only p's branch. If it's similar to the truth then let's create another table with two fields. Field one points to table containing capital letters and field two - lower case letters. Both fields are of type lookup pointing to an hierachial tables. Now when you populate this table you'll create records like (I list two columns):
    B - y
    B - z
    C - r
    C - s
    from your orinal table from now you should point to the above table. So instead of having two fields each pointing to its own table and compeling you to think how to organize two hierarchies, now you have only one field pointing to a table with all valid combinations. When you populate this table though YOU have to decide what such combinations are. It may make sense (if you have different users) to restrict access to this table on read-only level  for regular users to preserve the valid combinations.
    Hope it helps but if I understood your wrong give a concrete example.

  • Data Federator - Hierarchies and Text Descriptions

    Hi,
    I am trying to create WEBI reports on the top of SAP BW. The universe is connecting to SAP BW via Data Federator. I am facing issues with the hierarchy creation. The hierarchies created in the InfoProvider (Multicube - from CRM data source) are not available in the Universe.  I can't create the hierarchies in the universe as all the levels of the hierarchy are not available in the multicube. I need to get the hierarchy data from the CRM data source directly. But the valid sources for DF with respect to SAP BW are just cubes. Kindly let me know if there are any workarounds. Please let me know if more details are needed.
    Thanks in advance.
    Regards.

    Hi
    Officially SAP BW hierarchies are not suppoerted for the Data Federator  (http://wiki.sdn.sap.com/wiki/display/BOBJ/LeveragingDataFederatorinSAP+integrations). What you can do is to use also the SAP R/3 connector (SAP BusinessObjects Web Intelligence Reporting for SAP ERP [original link is broken] .Note this is prototype not a product) and fetch your CRM data also in the virtual tables of the DF. Still you have to rebuild your hierarchies manually in the universe.
    Regards,
    Stratos

  • How to get Hierarchical XML File from a Database Join Query !

    Hi,
    How can i get a Hierarchical XML File from a Database Join Query ?
    Any join query returns repeated values as below:
    BD17:SQL>select d.dname, e.ename, e.sal
    2 from dept d
    3 natural join
    4 emp e
    5 /
    DNAME ENAME SAL
    ACCOUNTING CLARK 2450
    ACCOUNTING KING 5000
    ACCOUNTING MILLER 1300
    RESEARCH SMITH 800
    RESEARCH ADAMS 1100
    RESEARCH FORD 3000
    RESEARCH SCOTT 3000
    RESEARCH JONES 2975
    SALES ALLEN 1600
    SALES BLAKE 2850
    SALES MARTIN 1250
    SALES JAMES 950
    SALES TURNER 1500
    SALES WARD 1250
    14 rows selected.
    We tried use DBMS_XMLQUERY to generate a xml file, but it was unable to get xml in Hierarchical format.
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <ROWSET>
    - <ROW num="1">
    <DNAME>ACCOUNTING</DNAME>
    <ENAME>CLARK</ENAME>
    <SAL>2450</SAL>
    </ROW>
    - <ROW num="2">
    <DNAME>ACCOUNTING</DNAME>
    <ENAME>KING</ENAME>
    <SAL>5000</SAL>
    </ROW>
    - <ROW num="3">
    <DNAME>ACCOUNTING</DNAME>
    <ENAME>MILLER</ENAME>
    <SAL>1300</SAL>
    </ROW>
    - <ROW num="4">
    <DNAME>RESEARCH</DNAME>
    <ENAME>SMITH</ENAME>
    <SAL>800</SAL>
    </ROW>
    - <ROW num="5">
    <DNAME>RESEARCH</DNAME>
    <ENAME>ADAMS</ENAME>
    <SAL>1100</SAL>
    </ROW>
    - <ROW num="6">
    <DNAME>RESEARCH</DNAME>
    <ENAME>FORD</ENAME>
    <SAL>3000</SAL>
    </ROW>
    - <ROW num="7">
    <DNAME>RESEARCH</DNAME>
    <ENAME>SCOTT</ENAME>
    <SAL>3000</SAL>
    </ROW>
    - <ROW num="8">
    <DNAME>RESEARCH</DNAME>
    <ENAME>JONES</ENAME>
    <SAL>2975</SAL>
    </ROW>
    - <ROW num="9">
    <DNAME>SALES</DNAME>
    <ENAME>ALLEN</ENAME>
    <SAL>1600</SAL>
    </ROW>
    - <ROW num="10">
    <DNAME>SALES</DNAME>
    <ENAME>BLAKE</ENAME>
    <SAL>2850</SAL>
    </ROW>
    - <ROW num="11">
    <DNAME>SALES</DNAME>
    <ENAME>MARTIN</ENAME>
    <SAL>1250</SAL>
    </ROW>
    - <ROW num="12">
    <DNAME>SALES</DNAME>
    <ENAME>JAMES</ENAME>
    <SAL>950</SAL>
    </ROW>
    - <ROW num="13">
    <DNAME>SALES</DNAME>
    <ENAME>TURNER</ENAME>
    <SAL>1500</SAL>
    </ROW>
    - <ROW num="14">
    <DNAME>SALES</DNAME>
    <ENAME>WARD</ENAME>
    <SAL>1250</SAL>
    </ROW>
    </ROWSET>
    Thank you for some help.
    Nelson Alberti

    Hi,
    I wrote a general ABAP program which can be configured to grab contrent from an URL and post that content as a new PI message into the integration adapter .... from that point on normal PI configuration can be used to route it to anywhere ...
    It can be easily scheduled as a background job to grab content on a daily basis etc ...
    Regards,
    Steven

  • Excel Pivot Table with Date Hierarchies - query performance degradation

    For the sake of this explanation, I’m going to try and keep it simple. Slicing the data by additional dimensions only makes the issue worse. I’ll keep this description to one fact table and three dimensions. Also, I’m fairly new to SSAS Tabular; I’ve worked
    with SSAS Multidimensional in the past.
    We’ve got a fact table that keeps track of bill pay payments made over time. Currently, we only have about six months of data, with the fact row count at just under 900,000 rows. The grain is daily.
    There is an Account dimension (approx. 460,000 rows), with details about the individual making a payment.
    There is a Payment Category dimension (approx.. 35,000 rows), which essentially groups various Payees into groups which we like to report on: Automobile Loan, Mortgage, Insurance, etc.
    There is the requisite Date dimension  (exactly 62093 rows-more days than we need?), which allows visibility as to what is being paid when.
    Using this DW model, I’ve created a SSAS BISM Tabular model, from which Excel 2010 is ultimately used to perform some analysis, using Pivot Tables. In the tabular model, for easier navigation (doing what I’ve always done in SSAS MultiDimensional), I’ve created
    several Date Hierarchies, Year-Month, Year-Quarter-Month, etc.
    There are currently only two measures defined in the Tabular model: one for the “Sum of PaymentAmount”; one for the “PaymentsProcessed”.
    OK, in Excel 2010, using a Pivot Table, drag the “Sum of PaymentAmount” measure to the Values section, next to/under the PivotTable Field List. Not too exciting, just the grand total of all Payments, for all time.
    Drag the “YearMonth” hierarchy (from the Date dimension) to the “Column Labels” section. After expanding the year hierarchy to see the months, now the totals are for each of the months, for which we have data, for June through November, 2013.
    Drag the “PaymentCategory” (from the Payment Categories dimension) to the “Report Filter” section. Filter accordingly: We just want to see the monthly totals for “Automobile Loans”.
    Now, some details. Drag the “AccountSK” (hiding the actual account numbers) to the “Row Labels” section. This shows all accounts that have made Automobile Loan payments over the last six months, showing the actual payment amounts.
    So far, so good. Remember, I’m using a Date Hierarchy here, in this case “YearMonth”
    Now, if any of the other attributes on the Account dimension table, say “CreditScore”, or “LongName”, are subsequently dragged over to the “Row Lables” section, under the “AccountSK”, the results will never come back, before timing out or by giving up and
    pressing ESCape!
    If this exact scenario is done by removing the Date Hierarchy, “YearMonth” from the “Column Labels” and replace it with “Year” and “MonthName” attributes from the Date dimension, these fields not being in any sort of hierarchy, adding an additional “Account”
    attribute does not cause any substantial delay.
    What I’m trying to find out is why is this happening? Is there anything I can do as a work around, other than what I’ve done by not using a Date Hierarchy? Is this a known issue with DAX and the query conversion to MDX? Something else?
    I’ve done a SQL Profiler trace, but I’m not sure at this point what it all means. In the MDX query there is a CrossJoin involved. There are also numerous VertiPaq Scans which seems to be going through each and every AccountSK in the Account dimension, not
    just the ones filtered, to get an additional attribute (About 3,600 accounts which are “Automobile Loan” payments.).
    Any thoughts?
    Thanks! Happy Holidays!
    AAO

    Thanks for your reply Marco. I've been reading your book, too, getting into Tabular.
    I've set up the Excel Pivot Table using either the Year/MonthName levels, or the YearMonth hierarchy and then adding the additional attribute for the CreditScore.
    Incidentally, when using the YearMonth hierarchy and adding the CreditScore, all is well, if the Year has not been "opened". When this is done, I suspect the same thing is going on.
    From SQL Profiler, each of the individual MDX queries below (formatted a bit for readability).
    Thanks!
    // MDX query using separate Year and MonthName levels, NO hierarchy.
    SELECT 
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    CrossJoin(
    {[Date].[Year].[All],[Date].[Year].[Year].AllMembers}, 
    {([Date].[MonthName].[All])}
    ,[Date].[Year].[Year].AllMembers, [Date].[MonthName]
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON COLUMNS, 
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    CrossJoin(
    {[Accounts].[AccountSK].[All],[Accounts].[AccountSK].[AccountSK].AllMembers}, 
    {([Accounts].[CreditScore].[All])}
    ,[Accounts].[AccountSK].[AccountSK].AllMembers, [Accounts].[CreditScore]
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON ROWS  
    FROM [PscuPrototype] 
    WHERE ([PaymentCategories].[PaymentCategory].&[Automobile Loan],[Measures].[Sum of PaymentAmount]) 
    CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
    // MDX query using separate YearMonth hierarchy (Year, MonthName).
    SELECT 
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    {{DrilldownLevel({[Date].[YearMonth].[All]},,,INCLUDE_CALC_MEMBERS)}}, 
    {[Date].[YearMonth].[Year].&[2013]},,,INCLUDE_CALC_MEMBERS
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON COLUMNS,
    NON EMPTY 
    Hierarchize(
    DrilldownMember(
    CrossJoin(
    {[Accounts].[AccountSK].[All],[Accounts].[AccountSK].[AccountSK].AllMembers}, 
    {([Accounts].[CreditScore].[All])}
    ,[Accounts].[AccountSK].[AccountSK].AllMembers, [Accounts].[CreditScore]
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME 
    ON ROWS  
    FROM [PscuPrototype] 
    WHERE ([PaymentCategories].[PaymentCategory].&[Automobile Loan],[Measures].[Sum of PaymentAmount]) 
    CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
    AAO

  • Analysis Authorization based on Hier node with multiple display hierarchies

    Hi guys - I've got a problem where s.o. might have an idea of how to switch on the light at the end of the tunnel, I am currently standing in:
    Requirement:
    Cost Center Authorization should be given through RSECADMIN, reporting should be possible for any hierarchy that exists for the authorization relevant info object.
    Preferred solution:
    The Cost Center Analysis Authorization should be given through RSECADMIN - Hierarchy node assignment.
    u2022     A dedicated Authorization Cost Center Hierarchy will be maintained in ECC6 as an alternative cost center hierarchy and extracted into BW.
    u2022     The RSECADMIN Hierarchy node assignment should be based on a particular node (Type 2).
    u2022     The display level will be specified as required (here: Level 7)
    u2022     The Authorization granted should be independent of hierarchy name and version (validity 3).
    Reporting Scenario and technical impact:
    As mentioned above, when designing and running a query the user should be able to freely select other (i.e. than the authorization) display hierarchies for the authorization relevant reporting object 'Cost Center' as well. The technical names of the semantically relevant hierarchy nodes could therefore vary. E.g. cost centers 1, 2 and 3, being assigned under hierarchy node u2018Au2019 of the RSECADMIN relevant authorization hierarchy, could be subsumed by hierarchy node u2018Bu2019 in another display hierarchy, which the user may want to display in accordance to his reporting needs. Ideally, the alternative display hierarchy should therefore display node u2018Bu2019.
    My findings so far (based on prototyping) turn out that this is not possible as long u2018Bu2019 (and its hierarchy) is not authorized in RSECADMIN. Can these findings be confirmed? And if not, would anyone have an idea of how to facilitate the reporting scenario?
    Would there be any other way to grant access, possibly based on RSECADMIN single values, and also enable the user to flexibly display hierarchies with only those hierarchy nodes whose single cost center values the user has been given access to?
    Thanks everyone for your input...
    Claus
    Edited by: Claus64 on Jul 13, 2009 4:10 AM

    HI CLause,
    On Jul 14 2009, you wrote in SDN and said:
    FYI: Found a solution...
    The hierarchy analysis authorization will be based on a navigational attribute of cost center.
    With analysis authorizations it is possible to declare the Auth object (e.g. 0COSTCENTER__RACCAUT0) as authorization relevant and leave the superior object 0COSTCENTER auth irrelevant.
    The auth will be given for 0COSTCENTER__RACCAUT0. This object will be placed as a filter of the query, being restricted by an Authorization variable for hierarchy nodes.
    Due to the concept of Analysis Authorizations, this variable will automatically pick up the nodes granted as part of RSECADMIN Hierarchy based Authorization.
    As mentioned above, 0COSTCENTER as the regular reporting characteristic remains auth irrelevant and can therefore take any hierarchy thatu2019s available. Reporting on single values will be possible, too. Only those nodes show up that hold the authorized cost centers in accordance to the authorization.
    If the auth relevant 0COSTCENTER__RACCAUT0 is not used in the query definition by either not taking it in as a filter or skipping the Auth variable, the query will launch the message that the authorization is missing. No data show up at all.
    Claus
    See this thread:
    Analysis Authorization based on Hier node with multiple display hierarchies
    I am also in the same situation as you and need to understadn your solution. I understand that you created a Nav Attr on 0COSTCENTER and made this auth relevant whilst ensuring that 0COSTCENTER is NOT auth relevant. This is all fine. The issue was you have multiple hierachies for 0COSTCENTER, how did the new Nav Attr help you solve your issue. When loading 0COSTCENTER what values did you load ino the new Nav Attribute and how did that link to the hierachies? Also, in RSECADMIN you created hiearchy nodes based on the Nav Attribute but I am confused as to what values you have in the Nav Attr.
    I appreciate if you can share your solution from the past in more details.
    many thanks

  • Slow Hierarchical Query

    Hi,
    I have a hierarchical query which takes 2 seconds to execute. I need to get this down to milli seconds.
    The table has around 8000 records. The query will never return more than 20 or so records. There is only ever 2 levels to the query.
    I am quite surprised at this because it is a very simple query no table joins etc and I would have though 8000 records was nothing for Oracle.
    Select id, parent_id, col1, col2, col3, col4, col5, col6
    from my_table
    where id=500
    start with parent_id is null
    connect by prior id = parent_id;
    I have even tried initializing the start with say with 0 and making it a not null column...... indexing the columns used in the start with + connect by
    I have tried various indexing stratergies. Does anyone have any similar experience? I am using Oracle 9i.
    Thanks in advance

    How can I utilise the above query in a view if at all? Will I be able to pass in differnt ID's to the START WITH...?Certainly, you can. For example, you can use packaged
    public variable to pass a parameter or Oracle CONTEXT:
    SQL> create or replace package pass_param is
      2    empno emp.empno%TYPE;
      3    function get_empno return emp.empno%TYPE;
      4  end;
      5  /
    &nbsp
    Package created.
    &nbsp
    SQL> create or replace package body pass_param is
      2    function get_empno return emp.empno%TYPE
      3    is
      4    begin
      5      return empno;
      6    end; 
      7  end;
      8  /
    &nbsp
    Package body created.
    &nbsp
    SQL> create or replace view emp_v as
      2  select ename from emp
      3  start with empno = pass_param.get_empno
      4  connect by prior empno = mgr
      5  /
    &nbsp
    View created.
    &nbsp
    SQL> exec pass_param.empno := 7839;
    &nbsp
    PL/SQL procedure successfully completed.
    &nbsp
    SQL> select * from emp_v;
    &nbsp
    ENAME
    KING
    JONES
    SCOTT
    ADAMS
    FORD
    SMITH
    BLAKE
    ALLEN
    WARD
    MARTIN
    TURNER
    JAMES
    CLARK
    MILLER
    &nbsp
    14 rows selected.
    &nbsp
    SQL>  exec pass_param.empno := 7698;
    &nbsp
    PL/SQL procedure successfully completed.
    &nbsp
    SQL> select * from emp_v;
    &nbsp
    ENAME
    BLAKE
    ALLEN
    WARD
    MARTIN
    TURNER
    JAMES
    &nbsp
    6 rows selected. or:
    SQL> create or replace package set_param
      2  is
      3   procedure set_empno(empno in number);
      4  end;
      5  /
    &nbsp
    Package created.
    &nbsp
    SQL> create or replace package body set_param
      2  is
      3   procedure set_empno(empno in number)
      4   is
      5   begin
      6     dbms_session.set_context('empnamespace','empno',empno);
      7   end;
      8  end;
      9  /
    &nbsp
    Package body created.
    &nbsp
    SQL> create or replace context empnamespace using set_param;
    &nbsp
    Context created.
    &nbsp
    SQL> create or replace view emp_v as
      2  select ename from emp
      3  start with empno = sys_context('empnamespace','empno')
      4  connect by prior empno = mgr
      5  /
    &nbsp
    View created.
    &nbsp
    SQL> exec set_param.set_empno(7698);
    &nbsp
    PL/SQL procedure successfully completed.
    &nbsp
    SQL> select * from emp_v;
    &nbsp
    ENAME
    BLAKE
    ALLEN
    WARD
    MARTIN
    TURNER
    JAMES
    &nbsp
    6 rows selected.
    &nbsp
    SQL> exec set_param.set_empno(7839);
    &nbsp
    PL/SQL procedure successfully completed.
    &nbsp
    SQL> select * from emp_v;
    &nbsp
    ENAME
    KING
    JONES
    SCOTT
    ADAMS
    FORD
    SMITH
    BLAKE
    ALLEN
    WARD
    MARTIN
    TURNER
    JAMES
    CLARK
    MILLER
    &nbsp
    14 rows selected.Rgds.

  • Values from alv hierarchical list display

    hi all,
    i need to display sme values from vbak and vbap tables in ALV hierarchical list display.if i click on the sales order of the header, it should directly go to the second screen of transaction VA03 with the sales details displayed..
       i got the parameter id, how can i assign the selected sales order value to this parameter id?...
    regards,
    Hamsa Priya

    Hi,
    Check this example..Marked in bold..
    TYPE-POOLS: slis.
    DATA: BEGIN OF itab OCCURS 0,
            vbeln TYPE vbeln,
            expand,
          END OF itab.
    DATA: BEGIN OF itab1 OCCURS 0,
            vbeln TYPE vbeln,
            posnr TYPE posnr,
            matnr TYPE matnr,
            netpr TYPE netpr,
          END OF itab1.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'VBELN'.
    s_fieldcatalog-outputlen = '12'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'POSNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'POSNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'MATNR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'MATNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname   = 'ITAB1'.
    s_fieldcatalog-rollname  = 'NETPR'.
    s_fieldcatalog-do_sum    = 'X'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    DATA: s_layout TYPE slis_layout_alv.
    s_layout-subtotals_text            = 'SUBTOTAL TEXT'.
    s_layout-key_hotspot = 'X'.
    s_layout-expand_fieldname = 'EXPAND'.
    SELECT vbeln UP TO 100 ROWS
           FROM
           vbak
           INTO TABLE itab
           WHERE vbeln > '0060000040'.
    IF NOT itab[] IS INITIAL.
      SELECT vbeln posnr matnr netpr
             FROM vbap
             INTO TABLE itab1
             FOR ALL ENTRIES IN itab
             WHERE vbeln = itab-vbeln.
    ENDIF.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA: s_keyinfo TYPE slis_keyinfo_alv.
    s_keyinfo-header01 = 'VBELN'.
    s_keyinfo-item01   = 'VBELN'.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
         EXPORTING
              i_callback_program      = v_repid
    <b>          i_callback_user_command = 'USER_COMMAND'</b>
              is_layout               = s_layout
              it_fieldcat             = t_fieldcatalog
              i_tabname_header        = 'ITAB'
              i_tabname_item          = 'ITAB1'
              is_keyinfo              = s_keyinfo
         TABLES
              t_outtab_header         = itab
              t_outtab_item           = itab1
         EXCEPTIONS
              program_error           = 1
              OTHERS                  = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      IF ucomm = '&IC1' AND selfield-fieldname = 'VBELN'.
        READ TABLE itab INDEX selfield-tabindex.
        IF sy-subrc = 0.
    document
          SET PARAMETER ID 'AUN' FIELD itab-vbeln.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.</b>
    Thanks,
    Naren

  • Material Item Hierarchies in SRM 7.0

    Dear Experts,
    we are on PPS 3.0, SRM 7.0, Extended Classic scenario and using the MM-SUS scenario for sending POs from SRM to SUS via ECC and PI.
    The issue we are facing is the message mapping errors in PI, when  the PO from SRM contains a material item hierarchy with  free text subline items that do not have quantity, price or delivery date defined.
    A free text item does not have any information defined, but XI expects the fields like quantity, Price, delivery date etc and hence the error.
    The process flow is an item hierachy PO is created in SRM, replicated to ECC successfully and a Idoc is sent successfully to PI. The failure occurs in PI on its way to SUS.
    Did any one face this issue with free text subline items in Item hierarchies and what is the resolution.
    Thanks in advance,
    Scott

    HI
    This speaks about the status of the Cart. This means that the Status of the Cart is AWAITING APPROVAL...I dont know which document you have gone through but procedure for adding a Custom Field in SRM 7.0 is:
    1. Create a Custom field in the Database in SRM. Preferrably add the field in an include and extend thta include to the table in SE11.
    2. Go to Portal Login of SRM and right click the part of the screen where you want to add the custom field. Click on More Field Help. The popup will give you the name of WebDynpro Applicaiton which controls that area.
    3. Login to SRM via GUI and display the webdynpro application using SE80. Enhance the Webdynpro application.
    4. Add the custom field to the Context of the WebDynpro Application View. You will be selecting the field from the database table while adding the custom field to the context
    5. Add the field at the specified place in Layout Tab of the WebDynpro View,
    6. Create a binding between the Layout Field and the Context
    7. Activate the changes.... you will see the field in Portal login of SRM....
    For more details , refer to the Webdynpro help of the application...
    Regards
    Virender Singh

  • Convert ALV report into PDF and mail ( Hierarchical List View )

    Hi All,
    I see many posts of PDF download but none resolve my issue.
    I am writing a report in APO SNP which fetches data and displays an alv using REUSE_ALV_HIERSEQ_LIST_DISPLAY as i need to show the result as a Hierarchical sequential list.
    I need to provide the functionality of PDF download ( online ) and Email with PDF as attachement ( Background ) for the list output.
    I read the post http://www.sapdev.co.uk/reporting/rep_spooltopdf2.htm which provides a sample program and tried to incorporate but the control doesn't come back from the ALV function module.
    How do i trigger the spool creation while still showing the output  and then send email?
    Suggestions and pointers are highly appreciated
    Regards,
    KD

    Hi.,
    Check this wiki: [Convert ALV as PDF  Attachment|http://wiki.sdn.sap.com/wiki/display/Snippets/SENDALVGRIDASPDFATTACHMENTTOSAPINBOXUSINGCLASSES]
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Performance issue with two unbanalnced hierarchies in a single report

    Hi All
    We are facing the performance issue with one of the report which houses two unbalanced hierarchies (having 18 levels) - skipped & ragged. Basically its a part of OBIAPPS financila analytics .
    The query is below :
    Could anyone let me know how to improve the performane. Any parameter that should be looked at while using unbalanced hierarchies.
    WITH SAWITH0
    AS ( SELECT SUM (T91707.OTHER_LOC_AMT) AS c1,
    MAX (T314768.HIER2_CODE) AS c2,
    MAX (T314768.HIER3_CODE) AS c3,
    MAX (T314768.HIER4_CODE) AS c4,
    MAX (T314768.HIER5_CODE) AS c5,
    MAX (T314768.HIER6_CODE) AS c6,
    MAX (T314768.HIER7_CODE) AS c7,
    MAX (T314768.HIER8_CODE) AS c8,
    MAX (T314768.HIER9_CODE) AS c9,
    MAX (T314768.HIER10_CODE) AS c10,
    MAX (T314768.HIER11_CODE) AS c11,
    MAX (T314768.HIER12_CODE) AS c12,
    MAX (T314768.HIER13_CODE) AS c13,
    MAX (T314768.HIER14_CODE) AS c14,
    MAX (T314768.HIER15_CODE) AS c15,
    MAX (T314768.HIER16_CODE) AS c16,
    MAX (T314768.HIER17_CODE) AS c17,
    MAX (T314768.HIER18_CODE) AS c18,
    MAX (T314768.HIER19_CODE) AS c19,
    MAX (T314768.HIER20_CODE) AS c20,
    T314768.HIER1_NAME AS c21,
    T314768.HIER1_CODE AS c22,
    T314914.HIER1_NAME AS c24,
    T314914.HIER10_NAME AS c25,
    T314914.HIER11_NAME AS c26,
    T314914.HIER12_NAME AS c27,
    T314914.HIER13_NAME AS c28,
    T314914.HIER14_NAME AS c29,
    T314914.HIER15_NAME AS c30,
    T314914.HIER16_NAME AS c31,
    T314914.HIER17_NAME AS c32,
    T314914.HIER18_NAME AS c33,
    T314914.HIER19_NAME AS c34,
    T314914.HIER2_NAME AS c35,
    T314914.HIER20_NAME AS c36,
    T314914.HIER3_NAME AS c37,
    T314914.HIER4_NAME AS c38,
    T314914.HIER5_NAME AS c39,
    T314914.HIER6_NAME AS c40,
    T314914.HIER7_NAME AS c41,
    T314914.HIER8_NAME AS c42,
    T314914.HIER9_NAME AS c43,
    T314914.HIER20_CODE AS c44,
    T314914.HIER1_CODE AS c45,
    T314914.HIER10_CODE AS c46,
    T314914.HIER11_CODE AS c47,
    T314914.HIER12_CODE AS c48,
    T314914.HIER13_CODE AS c49,
    T314914.HIER14_CODE AS c50,
    T314914.HIER15_CODE AS c51,
    T314914.HIER16_CODE AS c52,
    T314914.HIER17_CODE AS c53,
    T314914.HIER18_CODE AS c54,
    T314914.HIER19_CODE AS c55,
    T314914.HIER2_CODE AS c56,
    T314914.HIER3_CODE AS c57,
    T314914.HIER4_CODE AS c58,
    T314914.HIER5_CODE AS c59,
    T314914.HIER6_CODE AS c60,
    T314914.HIER7_CODE AS c61,
    T314914.HIER8_CODE AS c62,
    T314914.HIER9_CODE AS c63
    FROM W_HIERARCHY_D T314768 /* Dim_W_HIERARCHY_D_Segment11 */
    W_GL_SEGMENT_D T315677 /* Dim_W_GL_SEGMENT_D_Segment11 */
    W_HIERARCHY_D T314914 /* Dim_W_HIERARCHY_D_Segment13 */
    W_GL_SEGMENT_D T315731 /* Dim_W_GL_SEGMENT_D_Segment13 */
    W_GL_ACCOUNT_D T91397 /* Dim_W_GL_ACCOUNT_D */
    W_GL_OTHER_F T91707 /* Fact_W_GL_OTHER_F */
    WHERE ( T91397.ROW_WID = T91707.GL_ACCOUNT_WID
    AND T91397.ACCOUNT_SEG11_CODE = T315677.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG13_CODE = T315731.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG11_ATTRIB = T315677.SEGMENT_LOV_ID
    AND T91397.ACCOUNT_SEG13_ATTRIB = T315731.SEGMENT_LOV_ID
    AND T314768.HIER_CODE = T315677.SEGMENT_LOV_ID
    AND T314768.HIER_NAME = T315677.SEGMENT_LOV_NAME
    AND T314768.HIERARCHY_ID = T315677.SEGMENT_VAL_CODE
    AND T314914.HIER_CODE = T315731.SEGMENT_LOV_ID
    AND T314914.HIER_NAME = T315731.SEGMENT_LOV_NAME
    AND T314914.HIERARCHY_ID = T315731.SEGMENT_VAL_CODE
    AND T315677.SEGMENT_LOV_NAME =
    'Responsibility_Centre_Functional'
    AND T315677.SEGMENT_LOV_ID = 1000163
    AND T315731.SEGMENT_LOV_NAME = 'Account_Master'
    AND T315731.SEGMENT_LOV_ID = 1000165
    AND ( T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER11_CODE IS NULL)
    AND (T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER12_CODE IS NULL)
    AND ( T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER8_CODE IS NULL)
    AND ( T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER9_CODE IS NULL)
    AND ( T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER10_CODE IS NULL)
    AND ( T314914.HIER1_CODE IN ('ALL_LI')
    OR T314914.HIER2_CODE IN ('S000000001')
    OR T314914.HIER3_CODE IN ('S000005150')
    OR T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022'))
    AND ( T314914.HIER2_CODE IN ('S000000001')
    OR T314914.HIER3_CODE IN ('S000005150')
    OR T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER2_CODE IS NULL)
    AND ( T314914.HIER3_CODE IN ('S000005150')
    OR T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER3_CODE IS NULL)
    AND ( T314914.HIER4_CODE IN ('S000005151')
    OR T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER4_CODE IS NULL)
    AND ( T314914.HIER5_CODE IN ('S000005153')
    OR T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER5_CODE IS NULL)
    AND ( T314914.HIER6_CODE IN ('S000005154')
    OR T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER6_CODE IS NULL)
    AND ( T314914.HIER7_CODE IN ('S000005062')
    OR T314914.HIER8_CODE IN ('S000005160')
    OR T314914.HIER9_CODE IN ('S000000187')
    OR T314914.HIER10_CODE IN ('S526003000')
    OR T314914.HIER11_CODE IN ('S526002012')
    OR T314914.HIER12_CODE IN ('S000001022')
    OR T314914.HIER7_CODE IS NULL)
    AND T314768.HIER1_CODE IS NOT NULL
    AND T314914.HIER20_CODE IS NOT NULL
    AND T314914.HIER13_CODE IS NULL
    AND T314914.HIER14_CODE IS NULL
    AND T314914.HIER15_CODE IS NULL
    AND T314914.HIER16_CODE IS NULL
    AND T314914.HIER17_CODE IS NULL
    AND T314914.HIER18_CODE IS NULL
    AND T314914.HIER19_CODE IS NULL)
    GROUP BY T314768.HIER1_CODE,
    T314768.HIER1_NAME,
    T314914.HIER1_CODE,
    T314914.HIER1_NAME,
    T314914.HIER2_CODE,
    T314914.HIER2_NAME,
    T314914.HIER3_CODE,
    T314914.HIER3_NAME,
    T314914.HIER4_CODE,
    T314914.HIER4_NAME,
    T314914.HIER5_CODE,
    T314914.HIER5_NAME,
    T314914.HIER6_CODE,
    T314914.HIER6_NAME,
    T314914.HIER7_CODE,
    T314914.HIER7_NAME,
    T314914.HIER8_CODE,
    T314914.HIER8_NAME,
    T314914.HIER9_CODE,
    T314914.HIER9_NAME,
    T314914.HIER10_CODE,
    T314914.HIER10_NAME,
    T314914.HIER11_CODE,
    T314914.HIER11_NAME,
    T314914.HIER12_CODE,
    T314914.HIER12_NAME,
    T314914.HIER13_CODE,
    T314914.HIER13_NAME,
    T314914.HIER14_CODE,
    T314914.HIER14_NAME,
    T314914.HIER15_CODE,
    T314914.HIER15_NAME,
    T314914.HIER16_CODE,
    T314914.HIER16_NAME,
    T314914.HIER17_CODE,
    T314914.HIER17_NAME,
    T314914.HIER18_CODE,
    T314914.HIER18_NAME,
    T314914.HIER19_CODE,
    T314914.HIER19_NAME,
    T314914.HIER20_CODE,
    T314914.HIER20_NAME),
    SAWITH1
    AS (SELECT SUM (D1.c1) OVER () AS c1,
    MAX (D1.c2) OVER (PARTITION BY D1.c22) AS c2,
    MAX (D1.c3) OVER (PARTITION BY D1.c22) AS c3,
    MAX (D1.c4) OVER (PARTITION BY D1.c22) AS c4,
    MAX (D1.c5) OVER (PARTITION BY D1.c22) AS c5,
    MAX (D1.c6) OVER (PARTITION BY D1.c22) AS c6,
    MAX (D1.c7) OVER (PARTITION BY D1.c22) AS c7,
    MAX (D1.c8) OVER (PARTITION BY D1.c22) AS c8,
    MAX (D1.c9) OVER (PARTITION BY D1.c22) AS c9,
    MAX (D1.c10) OVER (PARTITION BY D1.c22) AS c10,
    MAX (D1.c11) OVER (PARTITION BY D1.c22) AS c11,
    MAX (D1.c12) OVER (PARTITION BY D1.c22) AS c12,
    MAX (D1.c13) OVER (PARTITION BY D1.c22) AS c13,
    MAX (D1.c14) OVER (PARTITION BY D1.c22) AS c14,
    MAX (D1.c15) OVER (PARTITION BY D1.c22) AS c15,
    MAX (D1.c16) OVER (PARTITION BY D1.c22) AS c16,
    MAX (D1.c17) OVER (PARTITION BY D1.c22) AS c17,
    MAX (D1.c18) OVER (PARTITION BY D1.c22) AS c18,
    MAX (D1.c19) OVER (PARTITION BY D1.c22) AS c19,
    MAX (D1.c20) OVER (PARTITION BY D1.c22) AS c20,
    D1.c21 AS c21,
    D1.c22 AS c22,
    SUM (
    D1.c1)
    OVER (
    PARTITION BY D1.c46,
    D1.c47,
    D1.c48,
    D1.c49,
    D1.c50,
    D1.c51,
    D1.c52,
    D1.c53,
    D1.c54,
    D1.c55,
    D1.c45,
    D1.c44,
    D1.c56,
    D1.c57,
    D1.c58,
    D1.c59,
    D1.c60,
    D1.c61,
    D1.c62,
    D1.c63,
    D1.c22)
    AS c23,
    D1.c24 AS c24,
    D1.c25 AS c25,
    D1.c26 AS c26,
    D1.c27 AS c27,
    D1.c28 AS c28,
    D1.c29 AS c29,
    D1.c30 AS c30,
    D1.c31 AS c31,
    D1.c32 AS c32,
    D1.c33 AS c33,
    D1.c34 AS c34,
    D1.c35 AS c35,
    D1.c36 AS c36,
    D1.c37 AS c37,
    D1.c38 AS c38,
    D1.c39 AS c39,
    D1.c40 AS c40,
    D1.c41 AS c41,
    D1.c42 AS c42,
    D1.c43 AS c43,
    D1.c44 AS c44,
    D1.c45 AS c45,
    D1.c46 AS c46,
    D1.c47 AS c47,
    D1.c48 AS c48,
    D1.c49 AS c49,
    D1.c50 AS c50,
    D1.c51 AS c51,
    D1.c52 AS c52,
    D1.c53 AS c53,
    D1.c54 AS c54,
    D1.c55 AS c55,
    D1.c56 AS c56,
    D1.c57 AS c57,
    D1.c58 AS c58,
    D1.c59 AS c59,
    D1.c60 AS c60,
    D1.c61 AS c61,
    D1.c62 AS c62,
    D1.c63 AS c63
    FROM SAWITH0 D1)
    SELECT DISTINCT
    38 AS c1,
    D1.c24 AS c2,
    D1.c25 AS c3,
    D1.c26 AS c4,
    D1.c27 AS c5,
    D1.c28 AS c6,
    D1.c29 AS c7,
    D1.c30 AS c8,
    D1.c31 AS c9,
    D1.c32 AS c10,
    D1.c33 AS c11,
    D1.c34 AS c12,
    D1.c35 AS c13,
    D1.c36 AS c14,
    D1.c37 AS c15,
    D1.c38 AS c16,
    D1.c39 AS c17,
    D1.c40 AS c18,
    D1.c41 AS c19,
    D1.c42 AS c20,
    D1.c43 AS c21,
    D1.c21 AS c22,
    NULL AS c23,
    NULL AS c24,
    NULL AS c25,
    NULL AS c26,
    NULL AS c27,
    NULL AS c28,
    NULL AS c29,
    NULL AS c30,
    NULL AS c31,
    NULL AS c32,
    NULL AS c33,
    NULL AS c34,
    NULL AS c35,
    NULL AS c36,
    NULL AS c37,
    NULL AS c38,
    NULL AS c39,
    NULL AS c40,
    NULL AS c41,
    D1.c44 AS c42,
    D1.c45 AS c43,
    D1.c46 AS c44,
    D1.c47 AS c45,
    D1.c48 AS c46,
    D1.c49 AS c47,
    D1.c50 AS c48,
    D1.c51 AS c49,
    D1.c52 AS c50,
    D1.c53 AS c51,
    D1.c54 AS c52,
    D1.c55 AS c53,
    D1.c56 AS c54,
    D1.c57 AS c55,
    D1.c58 AS c56,
    D1.c59 AS c57,
    D1.c60 AS c58,
    D1.c61 AS c59,
    D1.c62 AS c60,
    D1.c63 AS c61,
    NULL AS c62,
    D1.c22 AS c63,
    NULL AS c64,
    NULL AS c65,
    NULL AS c66,
    NULL AS c67,
    NULL AS c68,
    NULL AS c69,
    NULL AS c70,
    NULL AS c71,
    NULL AS c72,
    NULL AS c73,
    NULL AS c74,
    NULL AS c75,
    NULL AS c76,
    NULL AS c77,
    NULL AS c78,
    NULL AS c79,
    NULL AS c80,
    NULL AS c81,
    D1.c23 AS c82,
    CASE WHEN 1 = 1 THEN 1 ELSE 0 END AS c83,
    CASE
    WHEN D1.c2 IS NULL
    AND D1.c3 IS NULL
    AND D1.c4 IS NULL
    AND D1.c5 IS NULL
    AND D1.c6 IS NULL
    AND D1.c7 IS NULL
    AND D1.c8 IS NULL
    AND D1.c9 IS NULL
    AND D1.c10 IS NULL
    AND D1.c11 IS NULL
    AND D1.c12 IS NULL
    AND D1.c13 IS NULL
    AND D1.c14 IS NULL
    AND D1.c15 IS NULL
    AND D1.c16 IS NULL
    AND D1.c17 IS NULL
    AND D1.c18 IS NULL
    AND D1.c19 IS NULL
    AND D1.c20 IS NULL
    THEN
    1
    ELSE
    0
    END
    AS c84
    FROM SAWITH1 D1
    WHERE ( D1.c44 IS NOT NULL
    AND D1.c50 IS NULL
    AND D1.c49 IS NULL
    AND D1.c22 IS NOT NULL
    AND D1.c51 IS NULL
    AND D1.c52 IS NULL
    AND D1.c53 IS NULL
    AND D1.c54 IS NULL
    AND D1.c55 IS NULL)
    /* Formatted on 12/17/2012 7:49:44 PM (QP5 v5.139.911.3011) */
    WITH OBICOMMON0
    AS (SELECT T156337.ROW_WID AS c2,
    T156337.MCAL_PERIOD_WID AS c3,
    ROW_NUMBER ()
    OVER (PARTITION BY T156337.MCAL_PERIOD_WID
    ORDER BY T156337.MCAL_PERIOD_WID DESC)
    AS c4,
    T156337.MCAL_PERIOD_NAME AS c5,
    T156337.MCAL_PER_NAME_YEAR AS c6
    FROM W_MCAL_DAY_D T156337 /* Dim_W_MCAL_DAY_D_Fiscal_Day */
    WHERE (T156337.MCAL_CAL_NAME = 'Accounting')),
    SAWITH0
    AS (SELECT CASE
    WHEN CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END
    IS NOT NULL
    THEN
    RANK ()
    OVER (
    ORDER BY
    CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END ASC NULLS LAST)
    END
    AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3
    FROM OBICOMMON0 D1),
    SAWITH1
    AS (SELECT DISTINCT
    MIN (D1.c1) OVER (PARTITION BY D1.c3) AS c1, D1.c2 AS c2
    FROM SAWITH0 D1),
    SAWITH2
    AS (SELECT CASE
    WHEN CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END
    IS NOT NULL
    THEN
    RANK ()
    OVER (
    ORDER BY
    CASE D1.c4 WHEN 1 THEN D1.c2 ELSE NULL END ASC NULLS LAST)
    END
    AS c1,
    D1.c3 AS c2,
    D1.c5 AS c3,
    D1.c6 AS c4
    FROM OBICOMMON0 D1),
    SAWITH3 AS (SELECT DISTINCT MIN (D1.c1) OVER (PARTITION BY D1.c2) AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3,
    D1.c4 AS c4
    FROM SAWITH2 D1),
    SAWITH4
    AS ( SELECT SUM (T91707.TD_OTHER_REP_AMT) AS c1,
    T314914.HIER1_NAME AS c2,
    D2.c3 AS c3,
    T314914.HIER1_CODE AS c4,
    D2.c2 AS c5
    FROM W_HIERARCHY_D T314914 /* Dim_W_HIERARCHY_D_Segment13 */
    W_GL_SEGMENT_D T315731 /* Dim_W_GL_SEGMENT_D_Segment13 */
    W_GL_ACCOUNT_D T91397 /* Dim_W_GL_ACCOUNT_D */
    W_GL_OTHER_F T91707 /* Fact_W_GL_OTHER_F */
    SAWITH1 D4,
    SAWITH3 D2
    WHERE ( T314914.HIER_CODE = T315731.SEGMENT_LOV_ID
    AND T314914.HIER_NAME = T315731.SEGMENT_LOV_NAME
    AND T91397.ROW_WID = T91707.GL_ACCOUNT_WID
    AND T91707.ACCT_PERIOD_END_DT_WID = D4.c2
    AND T314914.HIERARCHY_ID = T315731.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG13_CODE = T315731.SEGMENT_VAL_CODE
    AND T91397.ACCOUNT_SEG13_ATTRIB = T315731.SEGMENT_LOV_ID
    AND T315731.SEGMENT_LOV_NAME =
    'Account_Retail_Distribution'
    AND T315731.SEGMENT_LOV_ID = 1000165
    AND D2.c1 = D4.c1
    AND (D2.c4 IN ('2011', '2012')))
    GROUP BY T314914.HIER1_CODE,
    T314914.HIER1_NAME,
    D2.c2,
    D2.c3)
    SELECT D1.c1 AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3,
    D1.c4 AS c4,
    D1.c5 AS c5,
    D1.c6 AS c6
    FROM ( SELECT DISTINCT 0 AS c1,
    D1.c2 AS c2,
    D1.c3 AS c3,
    D1.c4 AS c4,
    D1.c1 AS c5,
    D1.c5 AS c6
    FROM SAWITH4 D1
    ORDER BY c2 NULLS FIRST, c4 NULLS FIRST, c3) D1
    WHERE ROWNUM <= 65001

    Hello Gurus, Experts
    Any help/tips here ...

  • Urgent:Grand total in hierarchical alv

    I am printing a hierarchical alv with subtotals. I want to print the grand total for the whole numeric columns ...
    Can anyone explain me how i can do this.
    Thanks and regards,
    Subhakar

    Hi,
    In this case you not only require the totals but the subtotals also.
    For achieving this output you will have to sort the alv on the first column and also give subtotals there.
    use
    data: SORTF TYPE SLIS_SORTINFO_ALV,
             TSORT TYPE SLIS_T_SORTINFO_ALV.
    in the function module reuse_alv_grid_display give
    it_sort = tsort.
    eg:
    FORM ALV_SHOW.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      LAYOUT-BOX_TABNAME = 'IT_DISPLAY'.
      LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
      LAYOUT-ZEBRA = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM        = SY-REPID
         I_CALLBACK_USER_COMMAND   = 'USER_COMMAND'
          IS_LAYOUT                 = LAYOUT
          IT_FIELDCAT               = TCATALOG
          IS_VARIANT                = VAR1
          I_SAVE                    = 'A'
          IT_SORT                   = TSORT
          IT_EVENTS                 = TEVENT[]
        TABLES
          T_OUTTAB                  = IT_DISPLAY.
    ENDFORM .                    "ALV_SHOW
    and write a subroutine for sort...
    form sort.
    CLEAR SORTF.
      SORTF-spos = 1.
      SORTF-fieldname = 'column_1'.
      SORTF-tabname = 'IT_table used for display in alv'.
      SORTF-up = 'X'.
      SORTF-subtot = 'X'.
    APPEND SORTF TO TSORT.
    endform.
    If this doesn't help I will send you the whole source of a sample program..
    Abdullah

  • HFR Range from and to - Not working correctly for hierarchies?

    Hi All,
    Can anyone help me with my below issue relating to ranges in Oracle’s Hyperion Financial Reporting Studio tool.
    The issue I’m experiencing is that when I create a report and use the ‘Add Relationship’ -> ‘Range’ option for my month dimension, the correct months are returned as long as the start month and end month are not the same.
    In our setup we have 2 month hierarchies, one for the fiscal year (July to June) and another for the calendar year (January to December). The problem that I’m noticing in the report, is that when I enter a range from July to July, that instead of returning July, it returns July, August, September, October, November, December, January, February, March, April, May, June, July. My though it that it is looping through both the fiscal and the calendar hierarchies to return the range, instead of only the fiscal hierarchy. Both these hierarchies have the same members, however ordered differently.
    Does anyone know of a way to resolve this within HFR?
    I noticed that when creating the range, there is an option to ‘select a hierarchy’. At the moment there is only 1 choice ‘ Period’, however I’m curious if I could create and link a hierarchy to the fiscal hierarchy, that this might resolve the problem?
    Any ideas?
    Thanks,
    Lance

    Hi Lance,
    IIRC Range uses the first (main) hierarchy - so you'll need to move the Fiscal year one to be first in the outline.
    Cheers, Iain

Maybe you are looking for