Parent and Child relation in Install Base R12

Hi,
Could you let me know the query for, when i pass Instace_ID I should get Parent_Instance details,Child_Instance details along with parent part_numbers and child part_numbers.
I tried using below query, but I m missing child details and child part_numbers, any suggestions.
select distinct
ciip.instance_id parent_instance_id,
ciic.instance_id child_instance_id,
ciip.instance_number parent_instance_number,
ciic.instance_number child_instance_number,
msip.segment1 parent_part_number,
msic.segment1 child_part_number,
ciip.serial_number parent_serial_number,
ciic.serial_number child_serial_number,
msip.description parent_part_description,
msic.description child_part_description,
ciip.active_start_date,
ciip.active_end_date,
ciip.location_id,
ciip.install_date,
ciip.install_location_id
from
csi_item_instances ciip,
csi_ii_relationships cir,
csi_item_instances ciic,
mtl_system_items_b msip,
mtl_system_items_b msic
where 1=1
and ciip.serial_number = 'ABN656'
and ciip.instance_id = cir.object_id
and ciic.instance_id = cir.subject_id
and ciip.inventory_item_id = msip.inventory_item_id
and ciic.inventory_item_id = msic.inventory_item_id
--and ciip.instance_id=46725
order by ciip.instance_id,ciip.instance_number;
Thanks.

Did you check if the serial ABN656 is the parent and has child components under it? Check the below query for the same. Additionally you can also navigate to Oracle Installed Base Agent User responsibility, search for ABN656, click on the record, navigate to Configuration tab and see if this serial has any child components.
select *
from csi_ii_relationships cir
,csi_item_instances cii
where cii.serial_number = 'ABN656'
and cii.instance_id = cir.object_id
Thanks
Shree

Similar Messages

  • How to get the parent and child relation of the group (______________)

    Please teach the method of acquiring the parent and child relation of the group with EDK5.2.
    EDK5.2____________________,_________o

    Hello.
    Java________,_______________...
    Class________o
    com.plumtree.remote.auth.ChildGroupList
    ...o(^^;)
    Best Regards,
    --------- Hiroko Iida_______ (05/10/28 18:27) -------
    Please teach the method of acquiring the parent and child relation of the group with EDK5.2.
    EDK5.2____________________,_________o

  • How to link parent and child relation in Metapedia

    How to link parent and child relation in Metapedia

    Vamsi,
    Did you every determine how to do what you were asking about? Where you thinking of how to link a parent term to a child term (i.e. like a related term) or was this about linking a term to a different metadata object (e.g. table or report) ?

  • Automatic status heritage from parent item to child item in Instal Base R12

    Hi,
    Do you know please how to deactive automatic heritage of status from parent item to all child items of instal base when updating parent item status in R12?
    When I update status of package in Instal Base, statuses of all child items are updated automatically with same value.
    I am using R12 standard API's and I don't see any parameter that can help ...
    Must I see the Ebs parameters ? Profile options?
    Thx

    Did you check if the serial ABN656 is the parent and has child components under it? Check the below query for the same. Additionally you can also navigate to Oracle Installed Base Agent User responsibility, search for ABN656, click on the record, navigate to Configuration tab and see if this serial has any child components.
    select *
    from csi_ii_relationships cir
    ,csi_item_instances cii
    where cii.serial_number = 'ABN656'
    and cii.instance_id = cir.object_id
    Thanks
    Shree

  • Need query to get parent and child relations

    Hi,
    SELECT
    a.ID MASTER_ID, a.UNIQUE_NAME MASTER_UNIQUE_NAME, d.ID CHILD_ID, d.UNIQUE_NAME CHILD_UNIQUE_NAME, 1 SUB_LEVEL
    FROM
    srm_projects a,
    prTask b,
    prSubProject c,
    srm_projects d
    WHERE
    a.id = b.prProjectID
    AND b.prID = c.prTaskID
    AND c.PRREFPROJECTID=d.id
    The above query gives a project and its child.
    Child project can inturn have child projects.
    But the above query gives only the first level.
    To obtain second level I am presently using the following query
    SELECT
    a.ID MASTER_ID, a.UNIQUE_NAME MASTER_UNIQUE_NAME, d.ID CHILD_ID, d.UNIQUE_NAME CHILD_UNIQUE_NAME, 1 SUB_LEVEL
    FROM
    srm_projects a,
    prTask b,
    prSubProject c,
    srm_projects d
    WHERE
    a.id = b.prProjectID
    AND b.prID = c.prTaskID
    AND c.PRREFPROJECTID=d.id
    UNION ALL
    SELECT
    a.ID, a.UNIQUE_NAME, g.ID, g.UNIQUE_NAME, 2 SUB_LEVEL
    FROM
    srm_projects a,
    prTask b,
    prSubProject c,
    srm_projects d,
    prSubProject e,
    prTask f,
    srm_projects g
    WHERE
    a.id = b.prProjectID
    AND b.prID = c.prTaskID
    AND c.PRREFPROJECTID=d.id
    AND d.ID = f.PRPROJECTID
    AND f.prID = e.prTaskID
    AND e.PRREFPROJECTID=g.id
    But the problem is there is no limit on levels. They can go on to 20 to 30.
    So i need a query which gives me all the levels and not as above one where i am specifying till wht level.
    Please guide me.

    Thanks.
    Please find the table structures
    CREATE TABLE SRM_PROJECTS
    ID NUMBER NOT NULL,
    NAME VARCHAR2(240 BYTE),
    UNIQUE_NAME VARCHAR2(60 BYTE),
    DESCRIPTION VARCHAR2(2286 BYTE),
    IS_ACTIVE NUMBER DEFAULT 1 NOT NULL,
    CREATED_DATE DATE NOT NULL,
    CREATED_BY NUMBER NOT NULL,
    LAST_UPDATED_DATE DATE NOT NULL,
    LAST_UPDATED_BY NUMBER NOT NULL,
    CREATE TABLE PRTASK
    PRUID VARCHAR2(32 BYTE),
    PRID NUMBER(10),
    PRPROJECTID NUMBER(10),
    PRISUNPLANNED NUMBER(10) DEFAULT 0 NOT NULL,
    PRSHORTNAME VARCHAR2(48 BYTE),
    PRNAME VARCHAR2(450 BYTE),
    PREXTERNALID VARCHAR2(48 BYTE),
    PRISMILESTONE NUMBER(10) DEFAULT 0 NOT NULL,
    PRCATEGORY VARCHAR2(96 BYTE),
    CREATE TABLE PRSUBPROJECT
    PRUID VARCHAR2(32 BYTE),
    PRID NUMBER(10),
    PRTASKID NUMBER(10),
    PRREFPROJECTID NUMBER(10),
    PRREFTASKID NUMBER(10),
    PRISREADONLY NUMBER(10) DEFAULT 0 NOT NULL,
    PRISIPD NUMBER(10) DEFAULT 0 NOT NULL,
    PRMODBY VARCHAR2(96 BYTE),
    PRMODTIME DATE
    )

  • Insert data Flatfile table to Parent and child tables

    Hi All,
        I have Flatfile table which is we getting from daily txt files and i want to populate flatfile data to parent as well as child tables. parent table has primary key as ID. This ID is foreign key of child tables. 
    Here i have mentioned our process.
    1. Flatfile duplicates has to remove with condition of daily date.
    2. Before Insert parent table have to check duplicate(we have Unique key of 4 columns in parent) if duplicate is there we have to delete duplicate then Insert into parent table unique records(Primary key is ID).(here why we are delete duplicate record meaning
    we getting daily files so if any records updated in future that record should be insert to parent and child table so only we delete old records and insert new records).
    3.After insert parent we have to populate child tables from Flatfile table as well as we have to insert parent table primary key as foreign key of child tables.
    4. if any truncation error occurs that errors should go to error log table.
    Right now we are using cursor for this concept and cursor has performance issue. so we are trying to optimize other way to populate parent and child table to increase performance to populate.
    Please help us to which way to do this process increase of performance .
    Please  can any one reply.

    Hi RajVasu,
    Since this issue is related to Transact-SQL, I will move this thread to Transact-SQL forum. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Check for same parent and child combination

    hi all i am using oracle 10g. can you please help me in this issue.
    how do i know if the same combination of parent and child present in the table
    key value and value are the values given by user.
    if the user try to create a same profile with same set of key_value and value then that should be avoided
    so how to achieve that.
    example profile already in the table
    -- PROFILE_ID,DETAIL_ID,PARENT_DETAIL_ID,KEY_VALUE, VALUE, LAST_IND
    100,               1,               NULL,                      1,              CDE,     N
    100,               2,              1,                            2,              XXX,     N
    100,               3,              1,                            2,              YYY,    N
    100,               4,              1,                            4,              NEW,    Ynew profile by user -- it should throw an error saying that same profile already present
    -- PROFILE_ID,DETAIL_ID,PARENT_DETAIL_ID,KEY_VALUE,VALUE,LAST_IND
    101,               5,               NULL,                      1,              CDE,    N
    101,               6,              5,                            2,              XXX,    N
    101,               7,              5,                            2,              YYY,    N
    101,               8,              5,                            4,              NEW,    YEdited by: DeepakDevarapalli on Dec 9, 2009 9:48 AM
    Edited by: DeepakDevarapalli on Dec 9, 2009 9:59 AM

    sir i have used your logic, each query works fine and displays the correct results below are the results.
    SELECT   SUBSTR (t.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (PARTITION BY profile_id ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail
                           WHERE profile_id IN (100, 101))
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) t
    GROUP BY ptxtresults from query 1
    profile_values
    1/CDE,2/XXX,2/YYY,4/111
    1/CDE,2/XXX,2/YYY,4/222
    SELECT   SUBSTR (s.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail1)
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) s
    GROUP BY ptxtresults from query 2
    profile_values
    1/CDE,2/XXX,2/YYY,4/111
    but when i tried to combine both and do a minus it throws me an error .
    ORA-00600: internal error code, arguments: [expcmo_strdef1], [27], [27], [], [], [], [], []
    -- target
    SELECT   SUBSTR (t.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (PARTITION BY profile_id ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail
                           WHERE profile_id IN (100, 101))
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) t
    GROUP BY ptxt
    MINUS
    -- staging
    SELECT   SUBSTR (s.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail1)
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) s
    GROUP BY ptxt

  • How to list selected parent and child rows with values from ADF TreeTable

    I created one tree table having three levels using DepartmentsVO, EmployeesVO and
    JobHistoryVO where these tables contains parent and child relationship on database.
    Then i added one more column to the tree table which displays selectBooleanCheckBox. This
    check box is available for parent and child rows in that column.
    My first concern is i
    want to list out all the parentids and its child ids from three levels where the check
    box is selected.
    second concern is
    if i select the check box for a parent row, then the remaining check boxes for child rows also select automatically which are comes under the parent row.
    Thanks in advance.
    jk

    hi Frank,
    Thanks for the quick reply...
    As I mentioned before I am able to get the children using JUCtrlHierNodeBinding. but wanted to change the value of child row which have specific data.
    Is it possible through JUCtrlHierNodeBinding to update data of child and parent?? If so then can you please post the code snippet for the same???
    Viral

  • Delivery document how to print the BOM Parent and Child items

    Hi,
    I have a production BOM. In Delivery document how to print the Parent and Child items Item Code and Qty.At the time
    of add a delivery document Inventory stock redused only in Parent Item not child item because child item stock already reduced in issue for production.

    If you need to print both the BOM Parent and Child items, you have to create your own report. BOM is only for production if it is not Sales type.
    Thanks,
    Gordon

  • Session expiration issue with parent and child window

    Hi,
    We have two applications (App1 - Implemented using JSF, Spring and Hibernate and App2 -Implemented using Spring MVC, Spring JDBC).
    I have implemented 'Test Access Content' functionality in App1.
    First admin user (Role- Manager) needs to login to App1
    As part of 'Test Access Content' functionality, he enters URL with encrypted key and click 'Test Access' button.
    It opens new window (implemented using java script - window.open) and hits spring controller of App2.
    In spring controller of App2, I am decrypting the key to get user details. After that i am setting user details in session, constructing final URL to display actual content.
    Problem is parent window maintains session till child window renders response. Once child window renders response, parent window loosing session.
    So, if i click any button in parent window after child window renders response, it displays login page as there is no session for parent window.
    Please note that App1 and App2 are sharing same domain. only context paths are different for both apps (app1 and app2).
    Any suggestions on this issue are much appreciated. Please let us know if you have any questions.

    Hi,
    When you open a child window from parent window then you can access child data in the parent window through javascript.
    We have a main web page. There are quite many links on it from which >user can open new web pages but the data is saved when the submit >button on the main page is clicked. Also data that user entered on the >other sub pages is not displayed in the main window.
    1 is this a case of parent and child window.case 1 When you are submitting the main page you need to run javascript function and get data from child windows and save that to database or session. next time when you are displaying the main window you need to query session or database to display the child window data in the main window.
    Case 2> closing child window and you need data in the parent. This can be done in two ways.
    1> When you are closing the child window populate some variables of the main window using javasript.
    2> Save the values in the database or session and refresh the main window and extract data from database or session
    Where should the data be saved that user enetered on the sub pages as the data is not shown in the main page - should it be stored in the session?It is design decision. You can store data in either session or database when you are closing the child window. But ifyou are saving the data on the main page then you can populate main page with child windows data using javascript. Save the data t database when main window data is saved. Depends on business requirements.
    In short if you are saving child windows data in session or database then you need to refresh main screen to pull that data otherwise populate main screen using javascript.
    I hope i answered your questions :) best of luck

  • OIM API - How to get the values in the process form (both parent and child)

    Hi,
    I created an RO with a Process form (both Parent and Child).I created a unconditional process task which takes in the processinstance key and tried to retrieve the process form datas.When i tried to provison the resource,the process task is getting triggered and I could able to get the parent form data but not the child form data.
    Any idea why is this happening?.Is it mandatory to have the "Triggers" ON to get the Child Form data.?
    Thanks,

    try this
    tcResultSet childResults = formOper.getChildFormDefinition(
                             formOper.getProcessFormDefinitionKey(procInstanceKey),
                             formOper.getProcessFormVersion(procInstanceKey));
    This should work,
    Regards,
    Raghav

  • Parent and Child Both Variant in Subcontracting.

    Dear MM Experts.
    I have  a scenario in subcontracting where both the material Parent and Child are having variant class.
    At the time of PO creation I am able to configure the Parent Item from the characteristics  but the child item is not showing me the parameters of Child when we explode the components.
    Can anyone help me resolving the issues.
    Yogesh Walde

    yes you can
    <mx:TitleWindow>
    <mx:Script>
    <![CDATA[
    import mx.core.Application;
    ]]>
    </mx:Script>
    </mx:TitleWindow>

  • Merge of parent and child content of a heirarchy

    Can anyone say the procedure to of merging the parent and child link of heirarchy into one string and been displayed in a seperate feild

    Lakshmi Kanth,
    I am <b>assuming</b> that you are refering to "Merge Records" option in MDM Data Manager. If this is the scenario that you are looking for then here are the details:
    When it comes to Hierarchy tables, merging records is different than Merging Main table records. This option in Hierarchy tables also has lot of constraints - One of them is "Destination and source node cannot have children". Because of this, currently it is not possible to merge Parent- child records. However, for more information, please refer to this <a href="http://help.sap.com/saphelp_mdmgds55/helpdata/EN/43/9967ab46ec60b7e10000000a11466f/content.htm">link</a> for more information on Merging in Hierarchy tables.
    If "Merge Records" in Data Manager is not the option that you are looking for, let us know more details.
    Regards,
    Rajani Kumar

  • Programmatic, using bean add Parent and child nodes in af:tree dynamically

    Hi All,
    i have to add parent and child nodes dynamically in tree .
    Example :
    i have created a tree like below.On click of button i will get value A ,from pl/sql function i will A1 and A 2 values.which i have to show in pop as tree.
    A
    |-----A1
    |-----A2
    If user clicks on A2.I have to catch A2 value and pass to pl/sql function which gives A2.01 and A2.02 values.
    A
    |-----A1
    |-----A2
    |------A2.01
    |------A2.02.
    A, A1 ,A2,A2.01 ...........values comes from pl/sql funchtion .
    thanks in advance ......... any suggestion will greatly helps

    no use ......................

  • How to differentiate between Parent and Child in IBASE?

    Hi. I am working on enhancing a BAPI :BAPI_GOODSMVT_CREATE by calling the following function module IBPP_CREATE_IBASE at its exit.
    The BAPI is being called from an SAP ME system and will be passing MATNR and Serial Number of Parent and Child materials to create the IBASE in ECC system. I am confused as to how to differentiate between whether a object is Parent or a Child when the BAPI: BAPI_GOODSMVT_CREATE is called.

    if you have NULL valued fields. If
    you do a compare and one or both are NULL, then the result is always NULL,
    never true or false. Even comparing two fields which are both NULL will
    give NULL as result, not true! Or if you have something like "select
    sum(field) from ..." and one or more are NULL, then the result will be
    NULL. Use always "if field is NULL ..." for NULL checking and for safety
    maybe something like "select sum( IsNull(field,0) ) from ...". Check the
    function ISNULL() in the manual.

Maybe you are looking for

  • Can I add a text form field in Photoshop that can be edited in Acrobat reader?

    I design coffee labels with Photoshop then send them off to the printers. The printers then open up a PDF and put in the best before date before printing. At the moment I have to add the text form fields using Acrobat Pro after i've saved the photosh

  • Populate BAM data object through adf form.

    I want to populate a BAM data object using adf form as we do in case of database table by creating a data control. How to do this?

  • Errors with Dreamweaver

    I am running Dreamweaver CS4 on Mac OS X version 10.6.7. When I try to insert an image I get this error: And this is what happens to my code after I push ok: I do have my visual aids on and I also reset my prefrences. Anyone have any solutions for th

  • The iTunes store will not load. what can I do?

    The iTunes store will not load. What can I do?

  • Field Point marked as invalid in project

    I have posted a question regarding Field Point issues. If you have Field Point experience could you please check the post. I'm posting here to reach a broader audience. Thanks. Mark Yedinak "Does anyone know where the love of God goes when the waves