Query about account hierarchy

i want a query about account hierarchy
like if i have asset 1000
fixed asset 1100
land 1110
i want the result from query:
asset 1000
fixed asset 1100 1000
land 1110 1100
the last column is parent

Try this
SELECT ffv.flex_value, maptl.parval
  FROM apps.fnd_flex_values ffv,
       (SELECT ffvc.flex_value chval, ffvh.parent_flex_value parval
          FROM apps.fnd_flex_values ffvr1,
               apps.fnd_flex_values ffvr2,
               apps.fnd_flex_values ffvc,
               apps.fnd_flex_value_hier_all ffvh
         WHERE ffvh.child_flex_value_low = ffvr1.flex_value
           AND ffvh.child_flex_value_high = ffvr2.flex_value
           AND ffvc.flex_value_id BETWEEN ffvr1.flex_value_id
                                      AND ffvr2.flex_value_id
           AND ffvr1.flex_value_set_id = :val_set_id
           AND ffvr2.flex_value_set_id = :val_set_id
           AND ffvc.flex_value_set_id = :val_set_id
           AND ffvh.flex_value_set_id = :val_set_id) maptl
WHERE ffv.flex_value = maptl.chval(+)
AND ffv.flex_value_set_id = :val_set_id
ORDER BY ffv.flex_valueThis takes value set id as an input parameter.
HTH

Similar Messages

  • GL Account Hierarchy related issue

    Hi BI gurus,
    The Scenario is like this:-
    We are doing reporting for Profit&Loss based on GL Account Hierarchy (0GL_ACCOUNT).
    The GL Hierarchy have Asset & Liability nodes.
    The problem is that, in BW, regardless of credit or debit values, it will just display the report the same values on both nodes. so certain GL accounts (e.g. Cash Loan) would appear both side of the hierarchy - Asset node and Liability node.
    Is there a way to make it so when we do reporting based on Hierarchy, when the value's Credit, shows on "Asset Node", and Value's Debit will shows on "Liability node"?
    Any advice is greatly appreciated.
    Thanks,
    Vince

    Thanks for the info Yiannis, but I think I've found out the theory for this.
    According to this [http://help.sap.com/saphelp_nw04s/helpdata/en/04/7b95fb42b0f94aba334c0890dbbda4/content.htm|http://help.sap.com/saphelp_nw04s/helpdata/en/04/7b95fb42b0f94aba334c0890dbbda4/content.htm]
    I have read through it, not fully understand how this works yet, but I think should be able to use the following:-
    1. InfoObject 0GLACCEXT (instead of 0GL_ACCOUNT)
    The exception aggregation (balance sheet aggregation) that is in effect here is only possible for the Financial Statement Item characteristic (technical name 0GLACCEXT). The hierarchy table for this characteristic contains a special attribute called Balance-Dependency of a Hierarchy Node (technical name 0BAL_DEPEND), which controls the balance sheet aggregation of the Financial Statement Item characteristic.
    2. Virtual InfoCube  0FIGL_VC1 (will read data from 0FIGL_C01).
    3. There is a balance sheet query available 0FIGL_VC1_Q0001, which displays the balance sheet data the same way as the R/3 report RFBILA00 does.
    [http://help.sap.com/saphelp_sm32/helpdata/en/2d/955a73da4d6d41a0a6128caf274ce8/content.htm|http://help.sap.com/saphelp_sm32/helpdata/en/2d/955a73da4d6d41a0a6128caf274ce8/content.htm]
    Rgds,
    Vince

  • Debit/Credit Balances and Account Hierarchy

    Hi
    I need to show accounts in the Account Hierarchy according to whether the account has a debit or credit balance. For example, if an account has a debit balance, it must be displayed under debtors and if it has a credit balance, under creditors.
    How can I do this type of reporting in BPC, when the same d/c indicator as in the Financial Statement Version in ERP is not available in BPC?
    Any response appreciated.
    L.

    Hi Lambertus,
    BPC doesn't have something like the financial statement version built in. Neither does BW, actually, but there are business content transformations and queries that use some complex methods to do the kind of reporting you are talking about.
    In BPC I think you are going to need three accounts to accomplish this functionality - one in each branch of the hierarchy (accounts A & B in the example), plus one account that you actually load data into (account C in the example), which will not be displayed in the hierarchy. The two accounts in the hierarchy will either be formula accounts (not ideal) or populated using MDX script logic (better because the values will roll up the hierarchy). Your MDX, either in a formula or a script, would need to look something like this:
    [ACCOUNT].[#A] = iif([ACCOUNT].[C] >= 0, [ACCOUNT].[C], 0)
    [ACCOUNT].[#B] = iif([ACCOUNT].[C] < 0, [ACCOUNT].[C], 0)
    Have I tested this code? No. So buyer beware. But hopefully it sets you on the right track.
    Ethan

  • Problem with account hierarchy created in the rpd.

    Hi Everyone,
    A account hierarchy has been created in rpd with 14 levels. The problem is, for some account names when we click on the account name, it does not go to to the next level. For example, The account names "Phillips Van Heusan" - A1 and " Phillips Van Heusan"- A2 are present and they have separate account id's. When queried in the db with the account name which has a space in the front, am getting data but for the account name without space in the front am not getting any data. Both A1 and A2 have different account id's. And the Account name is set as primary key in the rpd in the dimensions hierarchy.
    But in the answers, when I filter out with these two account names, the account A2 gets displayed. When i click on this A2 , it does not drill down to next level where as shows no results. Nothing related to A1 is getting displayed.
    Same problem is faced for all the account names that are similar but have a space in the front.
    My questions:
    1. Is there a possibility that both account names can be displayed along with the measure columns coming from the service fact?
    2. Or else is it possible to filter out the record A1 so that only A2 gets displayed and the drill down happens properly to next level?
    Thanks in advance

    Ok, first the solution I gave to you is not negociable :) I MUST put the ID as the key and not the NAME.
    Once we have that in place, I need you to please change the name of your member and and make it different, not with a space but with a letter or namer. Let's say, go to the database , and add a 1 at the end of the member name so we make it different. Reload the repo and let me know it works.
    J.

  • Uploading Account Hierarchy data

    Hi all,
    Can anyone tell me how to upload Account Hierarchy into BI.I have created a flat file with the Hierarchy structure but unable to upload.
    The File format is
    Node ID,Info Object Name,Node Name,Link Name,Top Node,From Ac,To Ac,Language, Short Text, Long Text,Description.
    Kindly help me in this regard
    Regards
    Ajoy

    Hello,
    SAP provides a very powerful tool to upload mass amount of data without any coding required : LSMW.
    Furthermore, you can use this tool together with the Migration Workbench (tcode SXDA) to do parallel processing...
    So why would you want to record anything, or create a Z program? Even if you need to implement your own rules, you can implement some coding within your mapping project... Many cookbooks about LSMW are available both on SDN and on the sap service market place (with sample files, etc.).
    And for the record, here is of you can use this IDOC that I mentioned in my previous reply:
    Re: using FM CRMXIF_PARTNER_HIER_SAVE
    Regards,
    Nicolas Busson.

  • Account Hierarchy - Need Guidance

    Hi All,
    Please could you brief me about the account hierarchy?
    How it works?
    Inheritance is applicable for .....?
    What are the complexity can come in future?
    Regards,
    Piyush

    Hi Piyush!
    Relationships and Hierarchies are comparable only to a certain extend.
    With Hierarchies you can create a Structure and assign multiple Accounts to one node.
    Relationships are always between two Accounts. However the Shareholder Relationship is used to add information like Ownership in %, Control-Flag, Amount of Ownership. In CRM we have an own Assignment-Block for this Relationship-type.
    These attributes are not available within the Account Hierarchy.
    If you want to create something like the structure of a corporate group I would recommend using Hierarchies as this allows restructuring. So a whole sub-tree can be transferred to another Hierarchy.
    For Account Planning and Trade Promotion Management you can also only use Hierarchy-Nodes and not relationships.
    On the other hand-side relationships are good to see all related Accounts within the Account Overview-Page. The Account Hierarchy Assignment Block in the Account Overview Page only shows the Hierarchy-Nodes the current Account is assigned to, but not all related Accounts.
    Best regards
    Arno

  • Restricted account hierarchy nodes

    Hi BI Gurus,
    I have a requirement to generate Profit and Loss statement in BI. I pulled up account hierarchy out of R/3 into BI.
    The issue is client want to see some nodes of the account hierarchy restricted by specific Functional Area only.
    Please suggest some solution.
    Regards,
    MV

    Hi KK,
    Can you please explain about manually restricting the nodes instead of using hierarchy? Should it be done at R/3 or BI level and how?
    At R/3 level in Report Painter reports each node of the account hierarchy can be easily restricted to a particular Functional Area (at account node or set level) and client want to achieve the same in BI.
    Also the account hierarchy should not be maintained at two places. Since well maintained account hierarchy is already there in R/3 which is why BI pulled it from there; now they are looking for ways to restrict some of the nodes by Functional Area.
    Hope I have explained the situation with all the variables.
    Please provide your valuable suggestions.
    Thanks & Regards,
    MV

  • What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?

    Hi Guys,
    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?
    I have to write an AP Invoice Aging Report in Discoverer to show all unpaid invoices that have been transferred into GL... Business wants it to match one-to-one with the AP Trial Balance standard report...
    Business wants to run the report for any date in a past...
    The report has two parameters:
    As Of Date - the same as As of Date for the AP Trial Report
    Trial Balance Run Date - the date when Trial Balance was run...
    Conditions are:
    TRUNC(Invoice Date) <=TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(NVL(Payment Date,'01-JAN-5000')) > TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    TRUNC(Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Distr Accounting Date <= TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
    NVL(Distr Creation Date,Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
    Show_Flag = 'YES', where:
    Show_Flag = CASE WHEN ( NVL(Cancelled Date,'01-JAN-1901') > NVL(:As Of Date,SYSDATE) AND NVL(Inv Amount Aud,0) = 0 ) THEN 'YES' ELSE ( CASE WHEN NVL(Inv Amount Aud,0) = 0 THEN 'NO' ELSE 'YES' END ) END
    There is a difference between the logic of my report, and the logic of AP Trial Balance...
    Could you please advise what I'm missing?
    Thanks,
    Iana

    What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10? You can get the code by opening the report in Reports Builder and get the query.
    Or, enable trace/debug as per (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
    Thanks,
    Hussein

  • How to Restrict the node level in account hierarchy

    Hi experts,
    I want to restrict the node level in account hierarchy. I attached one example. in that if i click 6000 node again it want to show error message. for one parent node i want to create only two child node. Further if i create means it want to show error msgs and not allow to create the node..
    Regards,
    gopi

    Hi ,
    The component is bp_hier, and method is onnew_node.
    IF lv_tree->is_locked( ) = abap_false.
         lv_tree->lock( ).
       ENDIF.
       CHECK lv_tree->is_locked( ) = abap_true.
       lv_index = typed_context->accounthierarchy->selected_index.
       lv_tree_node = typed_context->accounthierarchy->get_node_by_index( lv_index ).
    *key = lv_tree_node->node_key.
      CALL METHOD lv_api->get_node_parent
         EXPORTING
           iv_node_key        = key
         IMPORTING
           ev_parent_node_key = lv_paent_key
    *      ev_tree_guid       =
    *   lv_parent = lv_tree_node->parent_entity.
    *    typed_context->accounthierarchy->parent_entity.
    CALL METHOD lv_tree_node->get_children
       receiving
         rt_children = rt_child.
       CHECK lv_tree_node IS BOUND.
       lv_tree_node->is_leaf = abap_false.
       TRY.
           lv_proxy_node ?= lv_tree_node.
           TRY.
               lv_object ?= lv_proxy_node->bo.
             CATCH cx_sy_move_cast_error.
               lv_mixed_node ?= lv_proxy_node->bo.
               lv_object ?= lv_mixed_node->if_bsp_wd_ext_property_access~get_model_node( ).
           ENDTRY.
           lv_object_name = lv_object->get_name( ).
           IF lv_object_name = 'BuilHierarchyNode'.
             lv_relation_name = 'BuilHNodeRel'.
           ELSEIF lv_object_name = 'BuilHierarchyHeader'.
             lv_relation_name = 'BuilHeaderNodeRel'.
           ELSE.
             RETURN.
           ENDIF.
           lv_tree_node->get_children( ).
           lv_object = lv_object->create_related_entity( lv_relation_name ).
           lv_child_node = lv_proxy_node->node_factory->get_proxy(
               iv_bo = lv_object
               iv_proxy_type = 'CL_BP_HIER_HIERARCHYTREEV_CN05'
               iv_parent_proxy = lv_tree_node ).
           lv_tree_node->expand_node( ).
           typed_context->accounthierarchy->refresh( ).
           typed_context->accounthierarchy->deselect_all( ).
           lv_child_node->selected = abap_true.
           lv_child_node->is_leaf  = abap_true.
    *accounthierarchy
    *      selectedhierarchynode
           lv_col_wrap = typed_context->selectedhierarchynode->get_collection_wrapper( ).
           lv_col_wrap->clear( ).
    This is the code.
    i wrote . but its not getting.

  • What is the Purpose of Account  Hierarchy Manager

    Dear Members
    Advantages of Account Hierarchy Manager.
    Regards
    Padarthy

    Hi,
    You question is answered in "Oracle General Ledger User Guide", Chapter 7 - The Account Hierarchy Manager.
    Applications Releases 11i and 12
    http://www.oracle.com/technology/documentation/applications.html
    Regards,
    Hussein

  • When I click on "Sign in to Sync" the page "about:accounts" shows error "The URL is not valid and cannot be loaded." How do I fix this so I can use Sync?

    When I click on the three-bar icon (top right) and then on "Sign in to Sync" a new tab opens attempting to load "about:accounts" . . . the page that loads is an error . . . "Problem loading page" shows up on the tab and the page displays:
    The address isn't valid
    The URL is not valid and cannot be loaded.
    Web addresses are usually written like http://www.example.com/
    Make sure that you're using forward slashes (i.e. /).
    Try again
    I am running Firefox 30.0 on a Dell XPS-18 and Windows 8.0.
    I cannot access "about:accounts" at all. How do I fix this?

    The about:accounts page is a valid page in the current Firefox release.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • GL Account Hierarchy

    Hi BW Experts,
    Our's is a BW 3.0B system connected to ECC 6.0. In BW we have a hierarchy defined for GL Account which has GL accounts listed in both Assets & Liabilities. This hierarchy is coming from ECC as designed by functional team. The client requirement is : When the GL Account is active with the hierarchy, it should not display the accounts in both Assets & Liabilities. It should only display the accounts in Assets( if it is an Asset Account) & Liabilities ( if it is a liability account). We are reporting on a multiprovider which has the basic infocube.
    Example:
    GL Account: 10001 - Bank .
    In the GL Account hierarchy, Account 10001 - Bank is under Assets & also Liabilities. Std. report in ECC for Balance Sheet and P/L statement, depending on the Net Amount, it goes under Assets or Liabilities group.
    In BW, when the hierarchy is activated for the report, as the GL Account is manitained in both Assets & Liabilities: it would display the amounts under Assets -for Eg: 100001 - $1000.00
    and also under Liabilities as: 100001 - $1000.00.
    Is there a way to do this kind of reporting? Please let us know if anyone had came across a similar requirement or have a soultion for it.
    Thanks,
    Bala

    Hi Bala,
    I do understand you need. You cannot figure out the issue with GL Account. You definetly need to use 0GLACCEXT characteristic in a virtual infoprovider like 0FIGL_VC1. Then, you would have a chance to build your balance sheet report with hierarchy. This will prevent double assignment of GL account both in Assets and Liabilities.
    Good luck,
    MCA

  • Rollup calculations in Account hierarchy (parent-child type)

    Hi,
    I want to create a parent-child relationship type Account hierarchy using Universe. The hierarchy has to support different set of calculations for roll ups action for different branches in the same level.
    Eg.
          Balance Sheet
              (+)Assets
              (-)Liabilities and Owners Equity
          Net Income
           (+)Operating Profit
           (+)Other Income and Expenses
           (-)Taxes
    Balance Sheet = Assets -Liabilities and Owners Equity
    Net Income = Operating Profit + Other Income and Expenses - Taxes
    Regards, Sujeev

    Measures automatically roll up.
    Whether you define your measure with an aggregate or not, if the projection is set to Sum, it will roll up.
    Measures that are to be summed should have Sum() wrapped round them at the universe level though.
    What you may have is a lot of positive values in your database and no negatives.
    If that's the case, you will need to use a case statement to determine the sign of the value.
    E.g.
    Sum(CASE WHEN Type='Asset' THEN table.value WHEN Type='Liability' THEN -1*table.value ELSE 0 END)

  • Query about local storage

    Hi,
         i had a query about local storage.
         I've a machine that hosts weblogic and tangosol. i've an ejb that accesses a distributed cache i.e NamedCache cache = CacheFactory.get("MyCache")
         i modified tangosol-coherence.xml and set local-storage to false ( for distributed cache) and replaced the file in coherence.jar.
         i'm using an overflow scheme and the back map uses a disk scheme.
         i also start a separate standalone instance of tangosol and i set the system property of local storage to true for the standalone instance.
         i start the standalone instance first and then weblogic.
         The idea is ensure that the tangosol instance in weblogic or the weblogic JVM should not participate in storing data (hence local storage false).
         only the JVM for the standalone instance should store data (hence local storage true -system property).
         i wanted to know whether the property "local-storage" is pertinent to a member(machine) or to a JVM?
         the reason for this doubt: as i'm using a disk scheme, tangosol creates a file for an overflow (e.g lh014402~.tp). i can see two such files when ideally i would have wanted only one for the tangosol instance.
         -rw-r--r-- 1 zephyr users 8364032 2005-06-23 17:02 lh014402~.tp
         -rw-r--r-- 1 zephyr users 8364032 2005-06-23 17:02 lh014403~.tp.
         can you please let me know if we can configure tangosol in such a way that we can two separate instances running with local stroage false for one and true for the other?
         Awaiting your reply
         Thanks
         Vinay

    I would suggest leaving the default 'local-storage' value set to 'true' in the tangosol-coherence.xml and just use the JVM argument to control the local storage of each individual node. Then start the stand alone instance normally (I assume you are using the com.tangosol.net.DefaultCacheServer) and start the WebLogic instance with the following:
         java [...] -Dtangosol.coherence.distributed.localstorage=false [...]
         Hope this helps.
         Later,
         Rob Misek
         Tangosol, Inc.

  • Account Hierarchy to BW..

    Account hierarchy, how does it gets created in ECC. It is account grouping or financial statement version.
    I need to being the account hierarchy to BW.. and trying to know..where the hierarchy data should be pulled from?
    Please give your inputs

    Resolved

Maybe you are looking for

  • Empty Screen after logging into portal

    Hi, I have installed SAPNetweaver 2004S,  SP9 trial edition. After logging into portal , Masthead and Tool area are visible and reamining part is empty screen . Toplevel navigation , detailed navigation, desktop innerpage are not getting displayed. C

  • Black screen/reset doesn't work/restore error 1601

    All of a sudden my iphone 3gs went dead. Reset with home and lock button does nothing. Plugging into a charger shows nothing on the screen either. When I connect to itunes (on a powerbook G4), it sees an iphone in recovery mode that needs to be resto

  • DivX - XviD compatibility

    I wonder if these kind of video formats are supported by iphone. If yes, I would consider seriously the possibility to buy one

  • Blurring a portion of an image

    Does anyone know how to blur a portion of an image in gradient-like fashion to give the impression of an unfocussed lens? Can you do it with a transparent layer mask?

  • Insert excel worksheet in web interface builder

    Dear all, I want to insert my planning package inside my web interface, and I don't know how to fill the planning level fields ? With F1 I got the following information                                                        The planning level of a se