FND_FLEX_VALUE Hierarchy

Hi,
I have following query
SELECT ffvc.parent_flex_value pcat_parent_code,
ffvc.flex_value pcat_child_code,
--(LEVEL - 1) pcat_level,
ffvc.description pcat_desc
FROM apps.fnd_flex_value_children_v ffvc,
apps.fnd_flex_values ffv
WHERE ffvc.flex_value_set_id = (SELECT   flex_value_set_id
FROM   apps.fnd_flex_value_sets
WHERE   flex_value_set_name = 'MCK_GLB_PCAT_VS')
AND   ffv.flex_value_set_id = ffvc.flex_value_set_id
AND   ffv.flex_value = ffvc.flex_value
I want to find parent-child level, so I modified the above query as follows -
SELECT ffvc.parent_flex_value pcat_parent_code,
ffvc.flex_value pcat_child_code,
*(LEVEL - 1) pcat_level,*
ffvc.description pcat_desc
FROM apps.fnd_flex_value_children_v ffvc,
apps.fnd_flex_values ffv
WHERE ffvc.flex_value_set_id = (SELECT   flex_value_set_id
FROM   apps.fnd_flex_value_sets
WHERE   flex_value_set_name = 'MCK_GLB_PCAT_VS')
AND   ffv.flex_value_set_id = ffvc.flex_value_set_id
AND   ffv.flex_value = ffvc.flex_value
START WITH   ffvc.parent_flex_value IN ('001',
*'010',*
*'019',*
*'020',*
*'030',*
*'035',*
*'101',*
*'105',*
*'110',*
*'120',*
*'130',*
*'201',*
*'250',*
*'300',*
*'401',*
*'405',*
*'605',*
*'A97',*
*'A98',*
*'A99')*
CONNECT BY PRIOR ffvc.parent_flex_value = ffvc.flex_value;
The top most qurey returns correct records. But when I add START WITH and CONNECT BY the query returns repeated records with different level_id.
I am not able to understnd how same parent-child can have different levels.
Kindly let me know if there is some thing wrong in my query (START WITH and CONNECT BY).
Thanks,
Aditya

If you have managed to fix this, it would be great if you could share the solution!
Thanks,
Hussein

Similar Messages

  • 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

  • Where can I find a tutorial about Show Folders Hierarchy?

    I have Permiere Elements 11 which also has the Elements Organizer as part of the program. And I have Photoshop Elements 10 also. The Elements Organizer with the video editing program is what I'm interested in though. I think my folder hierarchy is not right. I'd like to straighten it out but I don't know how. Can someone direct me to a tutorial on how to work with the Folders Hierarchy.
    This might be a different question, but it might be related to my confusion about the Folder Hierarchy in the Organizer. On June 10 I was copying some photos from my hard drive to the Organizer - probably a dumb thing to do. While I was doing this, the Pictures folder (View and organizes digital pictures) no longer took me to all my photos on the hard drive. The Pictures folder is under Personal Folder, Documents, Music, Control Panel on the Windows 7 desktop to the right of the Start Menus stuff.
    When I click on Pictures now I get two folders: Adobe and Pictures. The Adobe folder has these values - Size: 0 bytes; Contains: 0 Files, 1 Folder; Created: Monday, June 10, 2013; Attributes: Read-only (only applies to files in the folder. I deleted the Abobe folder several times but it keeps coming back.
    What I would really like to do is to restore my Pictures folder to its original state so that I will have access to all my hard drive photos immediately instead of clicking around in those folders. I vaguely think that something I did to the folder hierarchy in the Optimizer has messed up other things on my computer.

    You wrote, "So if you moved the files, what you need to do is move them back..."
    I don't know how to do this. Could you tell  me how. I moved about 50 photos into the Organizer. Now I know I should not have done this. I'd like to correct the mistake.
    When I click on the Show Folder List icon this is what I see:
    My Pictures
         Pictures
              Faces
                   Clowns
         My Videos
         Computer
                   C:
                   Program Data
                   Users
                        Tommy
                              Faces
                                   Dancing
                                   Faces
                                   Lovers
                                   Racing
                                   Tommy
                         Pictures
                  D
                  E
                  F
                  G
    This makes no sense to me. But I could live with it - except perhaps something I did has made my PrE11 impossible to work with. When I put new clips via the memory card into the program, they do not go into the Timeline. All I get is an error message.
    I like the Adobe programs and don't want to give up on them, especially since my problems probably have been self-imposed.

  • Hiding a hierarchy column in graph view

    Hi All,
    In an compound layout I would like to have pivot view and bar chart view.
    There are two hierarchy columns in criteria. These column should display in pivot view.
    My requirement is to hide the hierarchy columns in Bar chart view and can we apply separate selection steps for each view.
    Kindly help me..
    Thanks,
    Haree

    Hi,
    Edit the pivot table and graph and at the below you can see the selection steps for the individual components. So that you can give separately for each of the components.
    Hope this helped/ answered.
    Regards
    MuRam

  • Error in loading a Hierarchy

    When we are loading a hierarchy in the BW system, we get the following error :
    Error in the hierarchy structure: see error log.
    We tried activation of the hierarchy data source then rerun the load. Still it fails with the same error.
    Please let us knwo if any one has inputs regarding the same.

    Please go through the following SAP Notes.
    [Note 1266877 - BW hierarchy error when loading|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1266877]
    [Note 384945 - BW: Incorrect hierarchy extraction for 0REOBJ|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=384945]
    You will also find plent of threads with the same issue. Just search with the key words from the Error Log.
    Regards,
    Gaurav

  • Error while assigning a foreign hierarchy characteristic

    Hi Guys,
    When trying to insert a characteristic node to a hierarchy, it gives me an error saying 'info object OHIER_NODE not entered for /SI/SS_O356(where the hierarchy is being maintained) as a foreign hierarchy characteristic' .Is there anything else that i need to maintain ?
    Can someone please help me get out of this  message
    award will be provide for correct answer
    Thanks

    Hi,
    Have you got the solution for your problem?  .If so, may i know how did you solved it.
    If not, please do not make thread as answered ,it misguide us that you got solution.
    With rgds,
    Anil Kumar Sharma .P

  • Creation of new product hierarchy and products in SAP CRM.

    Dear all,
    please help with resolving of following issue:
    In CRM system base hierarchies were replicated from R/3 system with materials. Current requirement is to create new materials in CRM directly (as standalone scenario). As far as I understand, I have to create new hierarchy with required list of set types in order to allow creation of products in CRM directly (product type = material). Can anybody describe changes in the system step by step, what should be changed and where?
    As a result I need to have a possibility to create products in CRM directly for sales scenario processing.
    Thank you in advance!

    Hi Jorge,
    thank you so much for your reply!
    Here what I tried to do:
    1. I created new category in hierarchy R3PRODSTYP, added 3 set types: COMM_PR_MAT, COMM_PR_SHTEXT, COMM_PR_UNIT as basic set types.
    2. In the SPRO - Cross-Application Components - SAP Product - Settings for Product Type - Number Assignment - Define Number Ranges for the Product Type "Material" I found my new product category is unassigned, so I assigned it to the "CRM Products" group.
    3. Farther I tried to create a new product for created category in CRM Web UI, but was not able to find it in the Base category search field. All categories correctly displayed from R3PRODSTYP, but my new category is absent. What can be the reason of category absence? Btw, it cannot be found even when I try to display whole hierarchy in Web UI, however, in SAP GUI, it can be seen via tcode comm_hierarchy.
    Here is the setup of hierarchies in the system:
    I have no idea how to check #3 "Ensure the hierarchy is assigned to CRM application".
    Can you please suggest, what should be changed in addition? Thank you!

  • In Adobe Bridge, how can I display keywords in their hierarchy, do an "aka" keyword assignment, and perform multi-value keyword searches?

    Hi Bridge Geniuses!
    I need your help. I am using Bridge to sort and keyword a pretty big photo archive. I have created a pretty long nested hierarchy (4 layers deep, max) and, for a few reasons, would like the parent tags to be automatically included when I indicate a sub-tag.  The problem I have now is that the keyword list is distractingly long and organized alphabetically. My first question is this: is there a preference setting in Bridge that will ask the program to display the keywords in their hierarchy? That is, will Bridge present the list as, for example, cars à hybrids à Toyotas à Prius. 
    My second question is: if I have two or more names that represent the same keyword, is there an “aka” function in this program that will allow me to direct searches for two or more different words to the same keyword entry? (For example, if I want my searches for “Bruce Wayne” to also show entries marked as “Batman.”)
    Finally, I would like to know if Bridge will perform keyword searches for more than one word at a time. So far, I have tried entering two keywords with overlap at a time, separated by a space or a comma or a semicolon, and the search comes up empty.
    Thank you very much for your help!

    I reset my custom workspace and all seems to be well now. My keywords now show, the number of photos each applies to and I can again search.
    Thank you.

  • Error while uploading data from a flat file to the hierarchy

    Hi guys,
    after i upload data from a flat file to the hierarchy, i get a error message "Please select a valid info object" am loading data using PSA, having activated all external chars still get the problem..some help on this please..
    regards
    Sri

    there is o relation of infoobject name in flat file and infoobjet name at BW side.
    please check with the object in the BW and their lengths and type of the object and check your flat file weather u have the same type there,
    now check the sequence of the objects in the transfer rules  and activate them.
    there u go.

  • Why I can not find field:Level in Project Hierarchy in BAPI_BUS2054_NEW?

    Dear experts,
        Why I can not find the field of "Level in Project Hierarchy" in structure BAPI_BUS2054_NEW?
    I only define the data to upload wbs:
    PROJECT DEFINITION
    PROJECT DESCRIPTION
    PROJECT PROFILE
    WBS Element
    WBS description
    Can you tell me which fields must to upload?
    Looking forward to your reply.
    Many thanks.
    Merryzhang

    Anyone can help me ?I need the field "Level" in BAPI_BUS2054_NEW,But I can not find it.

  • I have hierarchy data in R/3 side how will i load that data from R/3 to BW

    Hi all,
    i have my hierarchy data in the R/3 side how will i load that data from  R/3 to BW side
    Regard
    Kiran Kumar

    Hi Kiran,
    Here is the procedure:
    1.      In the Data Warehousing Workbench under Modeling, select the InfoSource tree.
    2.      Select the InfoSource (with direct update) for the InfoObject, to which you want to load the hierarchy.
    3.      Choose Additional Functions® Create Transfer Rules from the context menu of the hierarchy table object for the InfoObject. The Assign Source System dialog box appears.
    4.      Select the source system from which the hierarchy is to be loaded. The InfoSource maintenance screen appears.
    ○       If the DataSource only supports the transfer method IDoc, then only the transfer structure is displayed (tab page DataSource/Transfer Structure).
    ○       If the DataSource also supports transfer method PSA, you can maintain the transfer rules (tab page Transfer Rules).
    If it is possible and useful, we recommend that you use the transfer method PSA and set the indicator Expand Leaf Values and Node InfoObjects. You can then also load hierarchies with characteristics whose node name has a length >32.
    5.      Save your entries and go back. The InfoSource tree for the Data Warehousing Workbench is displayed.
    6.      Choose Create InfoPackage from the context menu (see Maintaining InfoPackages). The Create InfoPackage dialog box appears.
    7.      Enter the description for the InfoPackage. Select the DataSource (data element Hierarchies) that you require and confirm your entries.
    8.      On the Tab Page: Hierarchy Selection, select the hierarchy that you want to load into your BI system.
    Specify if the hierarchy should be automatically activated after loading or be marked for activation.
    Select an update method (Full Update, Insert Subtree, Update Subtree).
    If you want to load a hierarchy from an external system with BAPI functionality, make BAPI-specific restrictions, if necessary.
    9.      If you want to load a hierarchy from a flat file, maintain the tab page: external data.
    10.      Maintain the tab page: processing.
    11.      Maintain the tab page: updating.
    12.      To schedule the InfoPackage, you have the following options:
    ○       (Manually) in the scheduler, see Scheduling InfoPackages
    ○       (Automatically) using a process chain (see Loading Hierarchies Using a Process Chain)
    When you upload hierarchies, the system carries out a consistency check, making sure that the hierarchy structure is correct. Error messages are logged in the Monitor. You can get technical details about the error and how to correct it in the long text for the respective message.
    For more info visit this help pages on SAP Help:
    http://help.sap.com/saphelp_nw04s/helpdata/en/80/1a6729e07211d2acb80000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/3d/320e3d89195c59e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6729e07211d2acb80000e829fbfe/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4dae0795-0501-0010-cc96-fe3a9e8959dc
    Cheers,
    Habeeb

  • Maintain hierarchy data in R/3

    Hello experts,
    How to maitain hierarchy data in R/3. Any pointerts will be appreciated.
    Thanks
    Konda Reddy

    Hierarchy maintenance in R/3 is the domain of the functional consultant - be it the cost center hierarchy or the plant hierarchy etc. It depends on the functional consultant to configure the same and the TCode for each is different and depends on the module... please be more specific...
    Arun

  • Customer Hierarchy download in CRM7.0 Web UI

    Hi Experts
    Need your expert advice on the below issue:
    We are using customer hierarchy from ECC to SAP CRM7.0 for one of our client. I have performed the below steps to bring ECC customer hierarchy to CRM.
    SAP ECC System:
    1.Hierarchy node is created thru tcode- v-12
    2.Customer hierarchy is created thru tcode- VDH1N
    Replication steps in CRM:
    1.Replicate Customer Hierarchy Customizing thru TCode- R3AS, download object DNL_CUST_THIT .
    2.Assign ERP Customer Hier. to CRM hierarchy category in SPRO .
    3.Replicate Customer Hier thru Tcode u2013R3AS , download object DNL_BUPA_KNVH.
    4.Create account hierarchy thru Tcode- BPH_DNL , we need to create the hierarchy only for the sales area 0001,01,01.  So I have selected sales the required sales area only.
    5.I checked in web ui  and found the result for account hierarchies.
    Current Result:
    a.ECC hierarchy downloaded, however descriptions for the hierarchy nodes are missing in CRM web ui.
    b.Customer assigned to ECC hierarchy can be seen in the u201CAccount Hierarchy Detailsu201D assignment block , however I could not see the customers in u201C Assigned Accountsu201D assignment block.
    6.Expected Result :
    a.ECC hierarchy display with description in u201C Account Hierarchy Detailsu201D assignment block.
    b.Display customeru2019s information in u201C Assigned Accountsu201D assignment block.
    Can anybody support and provide the information if we are missing any configuration step ? or the result is the correct behavior of standard system ?
    I would really appreciate your help on this.
    Regards
    Satish Rikhi

    Hi Tanya
    My issue is got sovled with SAP note 1398619 .However, for the second issue there is no finding.
    I am assuming ,that is standard SAP CRM behaviour , if we assign any account in crm , that will be shown in the assignment block.
    Regards
    Satish

  • Implement Hierarchy's On InfoObject that is Not Auth Relevant.

    Hello Friends,
    Please Advice me in this issue.
    I am Upgrading from 3.1 to 7.0.I am able to implement hierarchies when the Infoobject is auth relevant.
    There are hierarchies in 3.1 on Infoobjects which are Not Auth Relevant.
    Like 0PLANT ..I don't know how to implement using this.
    Is there any way to implement hierarchies on InfoObjects which are not auth relevant in BI 7.0 using Analysis authorizations.
    Or Do i need to make thes non auth relevant InfoObjects of 3.1 to auth relevant in 7.0 and implement hierarchies.
    Please advice.
    Thanks,
    Ram

    Hi Keerti,
    Can you please tell me how to implement hierarchy with out making 0PLANT auth relevant.
    We are upgrading from 3.1 to 7.0.
    0PLANT is not auth relevant in 3.1 but it has Hierarchies.
    So business team wants to have the same in 7.0 with out making it auth relevant.
    Please help me in doing this.
    Thanks
    Ram

  • How to filter hierarchy node in BEX query designer

    Dear experts
    We are working on FI balance sheet with hierarchy infoobject 0GLACCEXT. Example of our balance sheet is as follow:
    Parent Node A = 20
         Sub-parent Node A1 = 10
             Leaf A11 = 5
                 Leaf A12 = 5
    Parent Node B = 20
         Sub-parent Node B1 = 10
                   Leaf B11 = 5
                   Leaf B12 = 5
    We require only:
        Sub-parent Node A1 = 10
        Leaf B12 = 5
    So I filter those out in BEX restriction;  however, after we examine the report in tcode RSRT, "Sub-parent Node A1" is not shown in BEX Report, and the result is as follow:
    Parent Node B = 5
         Sub-parent Node B1 = 5
                 Leaf B12 = 5
    Are there solutions for us to show merely A1 and B12 ?

    Hi Chu
    Try the following steps.
    Initial Output
    In this example I will restrict the query for only displaying Node 8603 and leaf 9000
    Proceed to restrict the Characteristic. Please be aware of the difference between hierarchy nodes and leaf characteristic values. Also set the Hierarchy display properties to expand up to level 1.
    Execute the query again:
    Please be aware that users will still be able to expand node 8603 and see the lower level nodes/leaf. In order to restrict users from doing this set up users authorizations.
    Regards,
    Carlos

Maybe you are looking for

  • Internet

    Right i really need this problem sorting out... connecting to the internet on my Macbook (wireless is not an option) i have 2 approaches. 1. Connect directly to the internet via ethernet straight to my Windows PC. But how do i activate Internet shari

  • How to create a page format at sapscript?

    Hi all, Please help me in creating a page format for sapscript. Thanks.

  • Error on Receiver Mail Adapter (SMTP)

    Hi All, I'm going to exchange message within mail to mail scenario like synchronous one. Sender Mail Adapter is running well, it can take any email in inbox. but when I want to send the email back to the sender, the receiver adapter doesn't work. her

  • MacBookPro running 10.8.5 fails to wake from sleep or kp???

    Folks: I installed ML 10.8.5 a couple weeks ago in a separate partition from SL 10.6.8, and more or less things have been OK.  Today, however I'm wondering if 10.8.5 has a "Rip van Winkle" type "glitch" that causes problems with the unit waking from

  • FTP Polling Adapter Unresponsive or Hangs Once in Month

    Hi, We have 3-4 services in BPEL 11g which polls data from the FTP server .But out of which one services hangs or Unresponsive (once in months).Due To which files are not picked up from FTP server. Others services are working fine. Currently, we are