Build an R/3 Hierarchy from a Table

Hi all,
Any one has an idea of how I can build an R/3 Hierarchy from an exisiting Table ?
The table gives the relationship between two diffferent objects A & B. For each value for A there are a number of values for B, as defined & maintained in the table. How can I get this into an R/3 hierarchy - to enable me move it into SAP BW ?
Regards,
Uche

Look at table fmhisv.
Rob

Similar Messages

  • How to create an Hierarchy from 2 tables in Essbase

    Hi,
    Currently We have 5 dimension tables and one fact table in Star Schema Model.We have requirement to create an hierarchy which pulls from multiple tables
    For Eg:
    Table:1 P1 P2
    Table:2 Q1 Q2
    Expected Hierarchy :
    P1
    Q1
    While we try to implement it shows inconsistent results.Can some one let me know the alterante solution to fulfill this requirement.
    Thanks,
    SatyaB

    Your JOIN doesn't work?
    You'd have to post what the tables look like, what you're joining on, etc., etc. You aren't supplying enough information.
    I am (to put it kindly) a SQL hack. I have found that if I go to a company's dba with my childlike SQL and ask, "Can you improve this?" almost 100% of the time they take pity on me and improve my code to no end. I know that's not what a dba is really for, but they tend to like well formed SQL touching their databases. Failing that, is there someone at your firm that is good with SQL who can help? You're on an Essbase board, not a SQL board, so you are likely not going to get the help you need here.
    Regards,
    Cameron Lackpour

  • Multiple hierarchy levels from single table

    Happy 2014 for everyone!
    Here is my first problem of the year: I got a product table with "coded" hierarchy, like this:
    1
     Level
    11 
    Level
    111 
    Level
    1111 
    Level
    11111 
    Product
    11112 
    Product
    11113 
    Product
    1112 
    Level
    11121 
    Product
    112 
    Level
    1121 
    Level
    11211 
    Level
    112111 
    Product
    112112 
    Product
    112113 
    Product
    How should I go about to create an hierarchy from this table? Keeping in mind that products could be in different levels.
    Any ideas please?
    Thanks very much!

    I think you can model this as a parent-child hierarchy.  More info here: http://technet.microsoft.com/en-us/library/ms174846.aspx
    If you are using multidimensional: http://www.brustblog.com/archive/2008/06/22/analysis-services-2008-wizards-is-the-magic-gone.aspx
    If you are using tabular: http://sqlblog.com/blogs/alberto_ferrari/archive/2011/07/19/parent-child-hierarchies-in-tabular-with-denali.aspx
    Christian Wade
    http://christianwade.wordpress.com/
    Please mark correct responses as answers!

  • Building index from multiple tables for text search

    Hallo,
    I had a look at how to build a index table to optimize search with Oracle text.
    At the moment we are using a JOIN of tables to search for a text in several fields located in different tables.
    My question is:
    Is it possible to create that index table from several tables?
    If yes, can you point me out to any links or give me an example.
    So far, all the examples I read were about 1 table only.
    Thanks
    Elisabeth

    The following is an extension of the original example. It uses ctx_ddl.sync_index to synchronize the index and shows the changes in one of the index tables and shows that the query finds the newly synchronized data. It also shows how this only happens when the column that the index is on is updated. In this example, the index is on the dummy column. The first update does not update the dummy column, so the ctx_ddl.sync_index command does not synchronize the new data. The second update does update the related dummy column, so ctx_ddl.sync_index does synchronize the new data. Lastly, I showed what happens to one of the index tables when you rebuild the index. Notice the reduction in rows in the index table after the rebuild process. You could also rebuild online or drop and recreate the index.
    SCOTT@10gXE> DROP TABLE addresses
      2  /
    Table dropped.
    SCOTT@10gXE> DROP TABLE customers
      2  /
    Table dropped.
    SCOTT@10gXE> CREATE TABLE customers
      2    (customer_id NUMBER,
      3       first_name  VARCHAR2(15),
      4       last_name   VARCHAR2(15),
      5       dummy         VARCHAR2(1),
      6    CONSTRAINT   customers_pk PRIMARY KEY (customer_id))
      7  /
    Table created.
    SCOTT@10gXE> CREATE TABLE addresses
      2    (customer_id NUMBER,
      3       street         VARCHAR2(15),
      4       city         VARCHAR2(15),
      5       state         VARCHAR2(2),
      6    CONSTRAINT   addresses_fk FOREIGN KEY (customer_id)
      7                REFERENCES customers (customer_id))
      8  /
    Table created.
    SCOTT@10gXE> GRANT SELECT ON customers TO ctxsys
      2  /
    Grant succeeded.
    SCOTT@10gXE> GRANT SELECT ON addresses TO ctxsys
      2  /
    Grant succeeded.
    SCOTT@10gXE> CONNECT CTXSYS/ctxsys_password
    Connected.
    CTXSYS@10gXE>
    CTXSYS@10gXE> CREATE OR REPLACE PROCEDURE concat_cols
      2    (p_rowid IN     ROWID,
      3       p_clob     IN OUT CLOB)
      4  AS
      5    v_clob            CLOB;
      6  BEGIN
      7    FOR c1 IN
      8        (SELECT customer_id, first_name || ' ' || last_name AS data
      9         FROM      scott.customers
    10         WHERE  ROWID = p_rowid)
    11    LOOP
    12        v_clob := v_clob || c1.data;
    13        FOR c2 IN
    14          (SELECT ' ' || street || ' ' || city || ' ' || state AS data
    15           FROM   scott.addresses a
    16           WHERE  a.customer_id = c1.customer_id)
    17        LOOP
    18          v_clob := v_clob || c2.data;
    19        END LOOP;
    20    END LOOP;
    21    p_clob := v_clob;
    22  END concat_cols;
    23  /
    Procedure created.
    CTXSYS@10gXE> SHOW ERRORS
    No errors.
    CTXSYS@10gXE> GRANT EXECUTE ON concat_cols TO scott
      2  /
    Grant succeeded.
    CTXSYS@10gXE> CONNECT scott/tiger
    Connected.
    SCOTT@10gXE>
    SCOTT@10gXE> EXEC CTX_DDL.DROP_PREFERENCE ('concat_cols_datastore')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('concat_cols_datastore', 'USER_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE ('concat_cols_datastore', 'PROCEDURE', 'ctxsys.concat_cols');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> CREATE INDEX customer_text_idx ON customers (dummy)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS ('datastore concat_cols_datastore')
      4  /
    Index created.
    SCOTT@10gXE> INSERT INTO customers VALUES (1, 'Bob', 'Smith', NULL)
      2  /
    1 row created.
    SCOTT@10gXE> INSERT INTO addresses VALUES (1, 'Noplace', 'Nowhere', 'CA')
      2  /
    1 row created.
    SCOTT@10gXE> INSERT INTO customers VALUES (2, 'Bob', 'Jones', NULL)
      2  /
    1 row created.
    SCOTT@10gXE> INSERT INTO addresses VALUES (2, 'Smith St.', 'Somewhere', 'CA')
      2  /
    1 row created.
    SCOTT@10gXE> EXEC CTX_DDL.SYNC_INDEX ('customer_text_idx')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> COLUMN   token_text FORMAT A30
    SCOTT@10gXE> SELECT   token_text, token_type, token_first, token_last, token_count
      2  FROM     dr$customer_text_idx$i
      3  /
    TOKEN_TEXT                     TOKEN_TYPE TOKEN_FIRST TOKEN_LAST TOKEN_COUNT
    BOB                                     0           1          2           2
    CA                                      0           1          2           2
    JONES                                   0           2          2           1
    NOPLACE                                 0           1          1           1
    NOWHERE                                 0           1          1           1
    SMITH                                   0           1          2           2
    SOMEWHERE                               0           2          2           1
    ST                                      0           2          2           1
    8 rows selected.
    SCOTT@10gXE> SELECT   c.first_name, c.last_name, a.street, a.city
      2  FROM     customers c, addresses a
      3  WHERE    c.customer_id = a.customer_id
      4  AND      CONTAINS (C.dummy, 'Smith') > 0
      5  /
    FIRST_NAME      LAST_NAME       STREET          CITY
    Bob             Smith           Noplace         Nowhere
    Bob             Jones           Smith St.       Somewhere
    SCOTT@10gXE> -- dummy is not updated, so the index is not synchronized:
    SCOTT@10gXE> UPDATE   addresses
      2  SET      city = 'Anywhere'
      3  WHERE    city = 'Somewhere'
      4  /
    1 row updated.
    SCOTT@10gXE> EXEC CTX_DDL.SYNC_INDEX ('customer_text_idx')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SELECT   token_text, token_type, token_first, token_last, token_count
      2  FROM     dr$customer_text_idx$i
      3  /
    TOKEN_TEXT                     TOKEN_TYPE TOKEN_FIRST TOKEN_LAST TOKEN_COUNT
    BOB                                     0           1          2           2
    CA                                      0           1          2           2
    JONES                                   0           2          2           1
    NOPLACE                                 0           1          1           1
    NOWHERE                                 0           1          1           1
    SMITH                                   0           1          2           2
    SOMEWHERE                               0           2          2           1
    ST                                      0           2          2           1
    8 rows selected.
    SCOTT@10gXE> SELECT   c.first_name, c.last_name, a.street, a.city
      2  FROM     customers c, addresses a
      3  WHERE    c.customer_id = a.customer_id
      4  AND      CONTAINS (C.dummy, 'Anywhere') > 0
      5  /
    no rows selected
    SCOTT@10gXE> -- once dummy is updated, the index is synchronized:
    SCOTT@10gXE> UPDATE   customers
      2  SET      dummy = NULL
      3  WHERE    customer_id = 2
      4  /
    1 row updated.
    SCOTT@10gXE> EXEC CTX_DDL.SYNC_INDEX ('customer_text_idx')
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> SELECT   token_text, token_type, token_first, token_last, token_count
      2  FROM     dr$customer_text_idx$i
      3  /
    TOKEN_TEXT                     TOKEN_TYPE TOKEN_FIRST TOKEN_LAST TOKEN_COUNT
    BOB                                     0           1          2           2
    CA                                      0           1          2           2
    JONES                                   0           2          2           1
    NOPLACE                                 0           1          1           1
    NOWHERE                                 0           1          1           1
    SMITH                                   0           1          2           2
    SOMEWHERE                               0           2          2           1
    ST                                      0           2          2           1
    ANYWHERE                                0           3          3           1
    BOB                                     0           3          3           1
    CA                                      0           3          3           1
    JONES                                   0           3          3           1
    SMITH                                   0           3          3           1
    ST                                      0           3          3           1
    14 rows selected.
    SCOTT@10gXE> SELECT   c.first_name, c.last_name, a.street, a.city
      2  FROM     customers c, addresses a
      3  WHERE    c.customer_id = a.customer_id
      4  AND      CONTAINS (C.dummy, 'Anywhere') > 0
      5  /
    FIRST_NAME      LAST_NAME       STREET          CITY
    Bob             Jones           Smith St.       Anywhere
    SCOTT@10gXE> -- notice the changes if the index is rebuilt or dropped and recreated,
    SCOTT@10gXE> ALTER INDEX customer_text_idx REBUILD
      2  /
    Index altered.
    SCOTT@10gXE> SELECT   token_text, token_type, token_first, token_last, token_count
      2  FROM     dr$customer_text_idx$i
      3  /
    TOKEN_TEXT                     TOKEN_TYPE TOKEN_FIRST TOKEN_LAST TOKEN_COUNT
    ANYWHERE                                0           2          2           1
    BOB                                     0           1          2           2
    CA                                      0           1          2           2
    JONES                                   0           2          2           1
    NOPLACE                                 0           1          1           1
    NOWHERE                                 0           1          1           1
    SMITH                                   0           1          2           2
    ST                                      0           2          2           1
    8 rows selected.
    SCOTT@10gXE> SELECT   c.first_name, c.last_name, a.street, a.city
      2  FROM     customers c, addresses a
      3  WHERE    c.customer_id = a.customer_id
      4  AND      CONTAINS (C.dummy, 'Anywhere') > 0
      5  /
    FIRST_NAME      LAST_NAME       STREET          CITY
    Bob             Jones           Smith St.       Anywhere
    SCOTT@10gXE> 

  • Building hierarchy from several diffrent infoObjects

    Hello,
    I have a cube with several infoObjects – all of them are reference of 0customer. The first infoObject is country manager, the second is area managers and the third is agents. I need to build a hierarchy from these infoObjects (country manager>area managers>agents) The infoSource is designed to bring each one of them in a different cell of the extract structure (each one of them is a different infoObject). I have the complete hierarchy (with all the "managers") in 0customer.
    How can I build a hierarchy from them? I don’t want to use the "display as hierarchy" functionality.
    Please Advice,
    David

    just solved it
    I put the 0customer as external Chars. in hierarchies of itself.
    If i want to show the hierarchy: country manager>area managers>agents i should put the agent in the rows/columns and use the workers hierarchy which contains the country manager and area manager which are above the agent.
    Thank you Simon!!!
    David

  • Extract Hierarchy from LFMH(Vendor Hierarchy) table using generic datasourc

    Hi All,
               Can any one provide the steps to Extract Vendor Hierarchy from table LFMH? And also provide ABAP code (Function module) to extraact Vendor Hierarchy
    Thank You
    Rahul

    Hi,
       Let me know your email address, i can forward the required document to you or mail me @ [email protected]
    regards,
    ravi

  • How to populate List Item from the table in a form builder

    I want to know how to populate the List Item (pop up menu and combo box) from a table.
    Supposing I have a table Customer(cust_id,cust_name)
    and now I want to populate it in such a manner that I can update the data back to the database and also access the list on the form.

    This is the method i am using to populate a list.
    1- First of all you need to create a non-database list item for customer_name.
    2-create this procedure
    PROCEDURE populate_list_with_query
    --Populates the given list item with the specified query.
    (p_list_item in VARCHAR2
    ,p_query in VARCHAR2)
    IS
    /* Name the record group after the list item (no
    block prefix). */
    cst_rg_name constant VARCHAR2(30) :=
    GET_ITEM_PROPERTY(p_list_item,item_name);
    v_rg_id RECORDGROUP;
    BEGIN
    v_rg_id := FIND_GROUP(cst_rg_name);
    IF ID_NULL(v_rg_id) THEN
    v_rg_id := CREATE_GROUP_FROM_QUERY(cst_rg_name,p_query);
    END IF;
    IF POPULATE_GROUP(v_rg_id) = 0 THEN
    POPULATE_LIST(p_list_item,v_rg_id);
    /* Force display of first list element label
    in the list item. */
    COPY(GET_LIST_ELEMENT_VALUE(p_list_item,1),p_list_item);
    END IF;
    END populate_list_with_query;
    3- Create When-Create-Record on the block level and write this code
    BEGIN
    POPULATE_LIST_WITH_QUERY('bk1.customer_name',
    'SELECT customer_name, to_char(customer_id) FROM customer');
    END;
    In this example, the customer name is the (visible) list label and the customer ID is the (actual) list value
    i hope this will solve your problem ...

  • Regarding hierarchy creation from sql tables using db / ud connect

    bw version 3.0 upgrading to 7.0
    sql version 2005.
    we had built a sql data mart which is being accesses by a number of reporting tools. BI is one of the systems connected to it. My requirement is to upload hierarchies like customer from the sql data mart in to BW.
    The sql tables are in a denormalized format like this,
    EMPLOYEE_ID LAST_NAME                 MANAGER_ID      LEVEL
            101 Kochhar                          100                             1
            108 Greenberg                        101                            2
            109 Faviet                           108                                3
    They say that all third party reporting tools will recognize the above format and it universal. <b>I wanted to know is there any setting in bw that will allow extraction of hierarchies from the above table format ? if not I can only think of arranging data in the format of BW transfer structure, similar to flat file load.</b>
    I want to know can I upload hierarchies from sql tables or should I create flat files from tables ?
    Inputs will be awarded points.
    Message was edited by:
            aravind sam

    generate datasource? see if this can help..
    RSA1-> SOURCE SYSTEM-> SELECT YOUR SOURCE SYSTEM-> RIGHT CLICK-> GENERATE SOURCE SYSTEM.
    Also check:
    DB connect ORACLE - table name not found
    Re: Bw With ORacle
    Datasource in DB Connect
    and OSS Notes: 518241
    assign points if useful ***
    Thanks,
    Raj

  • Stored procedure to insert into multiple tables in sql server 2012, using id col from one table to insert into the other 2

    Hi all,
    Apologies if any of the following sounds at all silly but I am fairly new to this so here goes...
    I have 3 tables that require data insertion at the same time. The first table is the customers table, I then want to take the automatically generated custid from that table and inser it into 2 other tables along with some other data
    Here's what I have so far which does not work:
    CREATE PROCEDURE CustomerDetails.bnc_insNewRegistration @CustId int,
    @CompanyName varchar(100),
    @FirstName varchar(50),
    @LastName varchar(50),
    @Email nvarchar(254),
    @HouseStreet varchar(100),
    @Town smallint,
    @County tinyint,
    @Postcode char(8),
    @Password nvarchar(20)
    AS
    BEGIN
    begin tran
    insert into CustomerDetails.Customers
    (CompanyName, FirstName, LastName, EmailAddress)
    Values (@CompanyName, @FirstName, @LastName, @Email)
    set @CustId = (select CustId from inserted)
    insert into CustomerDetails.Address
    (CustomerId, HouseNoAndStreet, Town, County, PostCode)
    values (@CustId, @HouseStreet, @Town, @County, @Postcode)
    insert into CustomerDetails.MembershipDetails
    (CustomerId, UserName, Password)
    values (@CustId, @Email, @Password)
    commit tran
    END
    GO
    If anyone could help with this I would very much appreciate it as I am currently building an online store, if there's no registration there's no customers.
    So to whom ever is able to help, I thank you whole heartedly :)

    I hope by now it is apparent that statements like "doesn't work" are not particularly helpful. The prior posts have already identified your first problem.  But there are others.  First, you have declared @CustID as an argument for your
    procedure - but it is obvious that you do not expect a useful value to be supplied when the procedure is executed.  Perhaps it should be declared as an output argument so that the caller of the procedure can know the PK value of the newly inserted customer
    - otherwise, replace it with a local variable since it serves no purpose as an input argument.
    Next, you are storing email twice.  Duplication of data contradicts relational theory and will only cause future problems. 
    Next, I get the sense that your "customer" can be a person or a company.  You may find that using the same table for both is not the best approach.  I hope you have constraints to prevent a company from having a first and last name (and
    vice versa).
    Next, your error checking is inadequate.  We can only hope that you have the appropriate constraints to prevent duplicates.  You should expect failures to occur, from basic data errors (duplicates, null values, inconsistent values) to system issues
    (out of space).  I'll leave you with Erland's discussion for more detail:
    erland - error handling.
    Lastly, you should reconsider the datatypes you are using for the various bits of information.  Presumably town and county are foreign keys to related tables, which is why they are numeric.  Be careful you don't paint yourself into a corner with
    such small datatypes.  One can also debate the wisdom of using a separate tables for Town and County (and perhaps the decision to limit yourself to a particular geographic area with a particular civic hierarchy). Password seems a little short to me. 
    And if you are going to use nvarchar for some strings, you might as well use it for everything - especially names.  Also, everyone should be security conscious by now - passwords should be encrypted at the very least.
    And one last comment - you really should allow 2 address lines. Yes, two separate ones and not just one much larger one.

  • Urgent : Making heirarchy report by fetching data froma single table

    Hi,
    I am making a report in which i hae to display the data like this:-
    If there is a material and it contains batch and that batch furhter conatins sub-batches of it.
    The problem is dat all the data which is to be displayed is from the table CHVW  and i am  not able to display the data in hierarchy by fetching it from a single table.
    plzz guide me how to do dis as it is really urgent and points will be deinftely rewarded.
    help me out.
    reagrds,
    ric.s
    Edited by: ric .s on Apr 30, 2008 10:31 AM

    Hi,
    Check the sample Report.
    REPORT z_alv_hierseq_list.
    Program with FM REUSE_ALV_HIERSEQ_LIST_DISPLAY                      *
    TYPE-POOLS: slis.                    " ALV Global types
    CONSTANTS :
      c_x VALUE 'X',
      c_gt_vbap TYPE slis_tabname VALUE 'GT_VBAP',
      c_gt_vbak TYPE slis_tabname VALUE 'GT_VBAK'.
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.    "#EC NEEDED
    PARAMETERS p_max(02) TYPE n DEFAULT '10' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_2 FOR FIELD p_expand. "#EC NEEDED
    PARAMETERS p_expand AS CHECKBOX DEFAULT c_x.
    SELECTION-SCREEN END OF LINE.
    TYPES :
    1st Table
      BEGIN OF ty_vbak,
        vbeln TYPE vbak-vbeln,             " Sales document
        kunnr TYPE vbak-kunnr,             " Sold-to party
        netwr TYPE vbak-netwr,             " Net Value of the Sales Order
        erdat TYPE vbak-erdat,             " Creation date
        waerk TYPE vbak-waerk,             " SD document currency
        expand TYPE xfeld,
      END OF ty_vbak,
    2nd Table
      BEGIN OF ty_vbap,
        vbeln TYPE vbap-vbeln,             " Sales document
        posnr TYPE vbap-posnr,             " Sales document
        matnr TYPE vbap-matnr,             " Material number
        arktx TYPE vbap-arktx,             " Material description
        netwr TYPE vbap-netwr,             " Net Value of the Sales Order
        waerk TYPE vbap-waerk,             " SD document currency
      END OF ty_vbap.
    DATA :
    1st Table
      gt_vbak TYPE TABLE OF ty_vbak,
    2nd Table
      gt_vbap TYPE TABLE OF ty_vbap.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
      v_2 = 'With ''EXPAND'' field'.
    START-OF-SELECTION.
    Read Sales Document: Header Data
      SELECT vbeln kunnr netwr waerk erdat
        FROM vbak
          UP TO p_max ROWS
        INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
      IF gt_vbak[] IS NOT INITIAL.
      Read Sales Document: Item Data
        SELECT vbeln posnr matnr arktx netwr waerk
          FROM vbap
          INTO CORRESPONDING FIELDS OF TABLE gt_vbap
           FOR ALL ENTRIES IN gt_vbak
         WHERE vbeln = gt_vbak-vbeln.
      ENDIF.
    END-OF-SELECTION.
      PERFORM f_display.
          Form  F_DISPLAY
    FORM f_display.
    Macro definition
      DEFINE m_fieldcat.
        ls_fieldcat-tabname = &1.
        ls_fieldcat-fieldname = &2.
        ls_fieldcat-ref_tabname = &3.
        ls_fieldcat-cfieldname = &4.       " Field with currency unit
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        ls_sort-tabname = &1.
        ls_sort-fieldname = &2.
        ls_sort-up        = c_x.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_layout   TYPE slis_layout_alv,
        ls_keyinfo  TYPE slis_keyinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        lt_sort     TYPE slis_t_sortinfo_alv," Sort table
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv." Field catalog
      ls_layout-group_change_edit = c_x.
      ls_layout-colwidth_optimize = c_x.
      ls_layout-zebra             = c_x.
      ls_layout-detail_popup      = c_x.
      ls_layout-get_selinfos      = c_x.
      IF p_expand = c_x.
        ls_layout-expand_fieldname  = 'EXPAND'.
      ENDIF.
    Build field catalog and sort table
      m_fieldcat c_gt_vbak 'VBELN' 'VBAK' ''.
      m_fieldcat c_gt_vbak 'KUNNR' 'VBAK' ''.
      m_fieldcat c_gt_vbak 'NETWR' 'VBAK' 'WAERK'.
      m_fieldcat c_gt_vbak 'WAERK' 'VBAK' ''.
      m_fieldcat c_gt_vbak 'ERDAT' 'VBAK' ''.
      m_fieldcat c_gt_vbap 'POSNR' 'VBAP' ''.
      m_fieldcat c_gt_vbap 'MATNR' 'VBAP' ''.
      m_fieldcat c_gt_vbap 'ARKTX' 'VBAP' ''.
      m_fieldcat c_gt_vbap 'NETWR' 'VBAP' 'WAERK'.
      m_fieldcat c_gt_vbap 'WAERK' 'VBAP' ''.
      m_sort c_gt_vbak 'KUNNR'.
      m_sort c_gt_vbap 'NETWR'.
      ls_keyinfo-header01 = 'VBELN'.
      ls_keyinfo-item01 = 'VBELN'.
      ls_keyinfo-item02 = 'POSNR'.
    Dipslay Hierarchical list
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = ls_layout
          it_fieldcat             = lt_fieldcat
          it_sort                 = lt_sort
          i_tabname_header        = c_gt_vbak
          i_tabname_item          = c_gt_vbap
          is_keyinfo              = ls_keyinfo
          i_save                  = 'A'
        TABLES
          t_outtab_header         = gt_vbak
          t_outtab_item           = gt_vbap
        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.
    ENDFORM.                               " F_LIST_DISPLAY
          Form USER_COMMAND                                             *
    FORM user_command USING i_ucomm     TYPE sy-ucomm
                            is_selfield TYPE slis_selfield.     "#EC CALLED
      DATA ls_vbak TYPE ty_vbak.
      CASE i_ucomm.
        WHEN '&IC1'.                       " Pick
          CASE is_selfield-tabname.
            WHEN c_gt_vbap.
            WHEN c_gt_vbak.
              READ TABLE gt_vbak INDEX is_selfield-tabindex INTO ls_vbak.
              IF sy-subrc EQ 0.
              Sales order number
                SET PARAMETER ID 'AUN' FIELD ls_vbak-vbeln.
              Display Sales Order
                CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
              ENDIF.
          ENDCASE.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND
    END OF PROGRAM Z_ALV_HIERSEQ_LIST ******************
    Regards,
    Raj.

  • Measurement hierarchy from Essbase to BIEE physical layer

    According to official documents, the measurement hierarchy from Essbase should be imported as one flat level on Physical layer in OBIEE Administration. However, after importing, I can't see those measurements shown ! What I can see is the "Measure" dimension which has 5 gen of hierarchy~
    What I want is to put the measurements (e.g. unit sold / unit sold (east region) / unit sold (west region) / unit count / sales per week .... ) to presentation layer for users. How can I handle this? Is there anything I miss while building the cube in essbase?
    Since my essbase has just been upgraded from v.6 to v.11.
    Does anyone can help? THANKS A LOT !

    Welcome to the wonderful world of OBIEE/Essbase integration!
    Your "Measure" dimension basically should be your Account dimension of Type "Accounts". When a dimension has that type, it will automatically become the "fact" in the flattened out representation in the physcial layer.
    Funny that you mention this since I anyways wanted to blog a bt more on this since I got quite some questions recently (for all who were there: result of that nice discussion in Brighton), since you may have multiple measure hierarchies and then there's a bit more config to do ;-)
    Update:
    I just saw your other post and I'm a bit confused now. You state you have the "Measure" table which I assume means you have it in the BMM layer already. As of 10.1.3.3.2. if you import Essbase metadata, you can just drag and drop it from physical to BMM to presentation layer and the models and presentation tables are created automatically. Not much manual intervention needed (initially, but you'll do a lot of modification afterwards).
    Cheers,
    Christi@n
    Edited by: Christian Berg on May 22, 2009 9:32 AM

  • HELP: how to build a parent-child hierarchy

    Hy everyone,
    my question is very basic: i need to know what is the structure of the relational tables that OBIEE accepts upon which i can build a parent-child hierarchy. I have data that OBIEE does not accept, do you know where i can find a clear description of the structure of the tables that has to be builded for creating correctly a parent-child hierarchy?
    Thanks anyone a lot,
    Regards

    I've found what i needed, for everyone else:
    http://docs.oracle.com/cd/E21043_01/bi.1111/e10540/dimensions.htm#BGBGACFJ
    The parent-child relationship table must include four columns, as follows:
    •A column that identifies the member
    •A column that identifies an ancestor of the member. Note: The ancestor may be the parent of the member, or a higher-level ancestor.
    •A "distance" column that specifies the number of parent-child hierarchical levels from the member to the ancestor
    •A "leaf" column that indicates if the member is a leaf member (1=Yes, 0=No)
    The column names can be user defined. The data types of the columns must satisfy the following conditions:
    •The member and ancestor identifier columns have the same data type as the associated columns in the logical table that contains the hierarchy members. Note that the example shown in Table 9-1 uses text strings for readability, but you normally use integer surrogate keys for member_key and ancestor_key, if they exist in the source dimension table.
    •The "distance" and "leaf" columns are INTEGER columns.
    Note the following about the rows in a parent-child relationship table:
    •Each member must have a row pointing at itself, with distance zero.
    •Each member must have a row pointing at each of its ancestors. For a root member, this is a termination row with null for the parent and distance values.

  • How to get the data from one table and insert into another table

    Hi,
    We have requirement to build OA page with the data needs to be populated from one table and on save data into another table.
    For the above requirement what the best way to implement in OAF.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    Thanks

    You can achieve this in many different ways, one is
    1. Create another VO based on the EO which is based on the dest table.
    2. At save, copy the contents of the source VO into the dest VO (see copy routine in dev guide).
    3. commiting the transaction will push the data into the dest table on which the dest VO is based.
    I understand that if we attach VO object instance to region/page, we only can pull and put data in to only one table.
    if by table you mean a DB table, then no, you can have a VO based on multiple EOs which will do DMLs accordingly.Thanks
    Tapash

  • Report using Data from different tables

    Hello,
    I am trying to convert a Cobol batch program to Oracle 6i tabular report.
    The data is fetched from many different tables and there are lots of processing(i.e, based on the value of a column from one table need additional processing from different tables) required to generate the desired columns in the final report.
    I would like to know what is the best strategy to follow in Oracle Reports 6i. I heard that CREATE GLOBAL TEMPORARY TABLE is an option. ( or REF CURSOR ?) I do not know much about its usage. Can somebody guide me about this or any other better way to achieve the result.
    Thank you in advance
    Priya

    Hello,
    There are many, many options available to you, each of which has advantages and disadvantages. This is why it is difficult to answer "what is best?" without alot more details about your specific circumstances.
    In general, you're going to be writing PL/SQL to do any conditional logic that cannot be expressed as pure SQL. It can executed in the database, or it can executed within Reports itself. And most reports developers do some of both.
    As a general rule, you want to send only the data you need from the database to the report. This means you want to do as much filtering and aggregating of the data as is readily possible within the database. If this cannot be expressed as plain SQL queries, then you'll want to create a stored procedures to help do this work.
    Generally, the PL/SQL you create for executing within the report should be focused on control of the formatting, such as controlling whether a field is visible, or controlling display attributes for conditional formatting.
    But these are not hard and fast rules. In some cases, it is difficult to get all the stored procedures you might like installed into the database. Perhaps the dba is reluctant to let you install that many stored procedures. Perhaps there are restrictions when and how often updates can be made to stored procedures in a production database, which makes it difficult to incrementally adjust your reports based on user feedback. Or perhaps there are restrictions for how long queries are allowed to run.
    So, Reports offers lots of options and features to let you do data manipulation operations from within the report data model.
    In any case, Oracle does offer temporary table capabilities. You can populate a temp table by running stored procedures that do queries, calculations and aggregations. And you can define and initiate a dynamic query statement within the database and pass a handle to this query off to the report to execute (ref cursor).
    From the reports side, you can have as many queries as you want in the data model, arranged in any hierarchy via links. You can parameterize and change the queries dynamically using bind variables and lexicals. And you can add calculations, aggregations, and filters.
    Again, most people do data manipulation both in the database and in Reports, using the database for what it excels at, and Reports for what it excels at.
    Hope this helps.
    Regards,
    The Oracle Reports Team --skw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can i get all the records from three tables(not common records)

    Hi
    I have four base tables at R/3-Side. And i need to extract them from R/3-Side.
    And i dont have any standard extractor for these tables .
    If i create a 'View' on top of these tables. Then it will give only commom records among the three tables.
    But i want all the records from three base tables (not only common).
    So how can i get the all records from three tables. please let me know
    kumar

    You can create separate 3 datasources for three tables and extract data to BW. There you can implement business login to build relation between this data.

Maybe you are looking for