Query to get master and child organizaitons of an item

Hi Experts,
Could some body send me the query to find out the master and child organizations for an item in oracle inventory.
Kindly help
Thanks

Hi,
Please review links and see if it helps you:
Apps Technical: Item Master Details in R12 (with category details)
11i - R12: Master Data (Item, Supplier, Customer, Bank, Item-Stock, Formula, Routing
Thanks &
Best Regards,

Similar Messages

  • 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
    )

  • Problem with Master and Child table

    Hi,
    Working in jdev 11.1.1.2.0. I have one strange issue. i have master and child tables, the model is working fine with the view link. but when drag drop the same into my jsff. when i query the result 1st time 2 tables are refershing properly and data is coming. but the when i trying to select another row in the 1st table my 2nd table(child table) is not refreshing.
    i put partial trigger of the 2nd table as 1st table id.
    can any one help wht is issue here.
    Edited by: user5802014 on Jul 15, 2010 3:44 PM

    Check this post might help you
    http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html

  • Master control attribute value discrepency between Master and child org.

    Hi Guru,
    We are facing a strange issue in Track install Base Attribute values. There are some 60K item having discrepency in the value of the this attribute between master and child.
    We are wondering how it happens as this attribute is master controlled one and we never changed this attribute control and kept as Master controlled. The master value is true
    If you guys experience this issue, please let us know the solution that you had applied to fix this issue.
    regards
    venkat

    Try executing the vo1 query before setting the bind variable for vo2, then execute the vo2 query (if that's what you want to do).

  • Setting bind variable value programmatically for master and child VO's

    Defined following BC:
    Serv VO - Master VO, has Bind_cNum (bind variable)
    ServDetail VO - Child VO, has Bind_cNum2 (bind variable)
    ServViewLink VL - View link between Serv VO & ServDetail VO
    in AMModule Impl have custom WS:
    public List<ViewRowImpl> getMyServices(String cNum)
    List<ViewRowImpl> result = new ArrayList<ViewRowImpl>();
    ViewObjectImpl vo1 = getServ(); //Master VO
    vo1.setNamedWhereClauseParam("Bind_cNum", cNum);
    vo1.setForwardOnly(true);
    ViewObjectImpl vo2 = getServDetail(); //Child VO
    vo2.setNamedWhereClauseParam("Bind_cNum2", cNum);
    vo1.executeQuery();
    while (vo1.hasNext()) {
    result.add((ViewRowImpl)vo1.next());
    return result;
    I am passing same cNum parameter to both Serv VO (Master VO) and ServDetail VO (child VO) as above. (this is in addition to view link bind variable :Id)
    It shows in the logs that it is setting the values correctly:
    <ViewRowSetImpl> <setNamedWhereClauseParam> [382] Serv ViewRowSetImpl.setNamedWhereClauseParam(Bind_cNum, 11771370)
    <ViewRowSetImpl> <setNamedWhereClauseParam> [383] ServDetail ViewRowSetImpl.setNamedWhereClauseParam(Bind_cNum2, 11771370)
    <ViewRowSetImpl> <doSetWhereClauseParam> [383] Serv ViewRowSetImpl.doSetWhereClause(-1, Bind_cNum, 11771370)
    <ViewRowSetImpl> <execute> [385] Serv ViewRowSetImpl.execute caused params to be "un"changed
    <OracleSQLBuilderImpl> <bindParamValue> [394] Binding param "Bind_cNum": 11771370
    <ADFLogger> <addContextData> Execute query
    -- when executing view link
    <ViewRowSetImpl> <setParamValues> [425] ServViewLink_0 ViewRowSetImpl.setParamValues params changed
    <ViewRowSetImpl> <doSetWhereClauseParam> [426] ServViewLink_0 ViewRowSetImpl.doSetWhereClause(-1, Bind_cNum2, null)
    <ViewObjectImpl> <bindParametersForCollection> [436] For RowSet : ServViewLink_0
    <OracleSQLBuilderImpl> <bindParamValue> [437] Binding null of type 12 for "Bind_cNum2"
    <OracleSQLBuilderImpl> <bindParamValue> [438] Binding param "Bind_Id": 5018
    from above log, when ServViewLink_0 is executed, it is changing Bind_cNum2 bind variable to null.
    how can i pass same bind variable value to both Master and Child view objects from AM Impl.java
    Edited by: bsrao on Oct 11, 2012 6:07 PM
    Edited by: bsrao on Oct 11, 2012 6:10 PM
    Edited by: bsrao on Oct 11, 2012 6:12 PM

    Try executing the vo1 query before setting the bind variable for vo2, then execute the vo2 query (if that's what you want to do).

  • Building index from multiple master and child relationship tables

    Hello,
    My question is:
    Is it possible to create the index for master and child tables?
    If yes, can you please point me out to any links or give me an example.
    Actually i just followed this below link to create the index using multiple tables
    Building index from multiple tables for text search
    I am able to create the index using above link,but problem accured , when i search for one master data column value then it is returning many rows with same master data for each child row.
    for example
    SELECT
    a.conc_program_name,
    a.conc_program_desc,
    b.param_name
    FROM a_master a, b_child b
    WHERE b.report_dtls_id = a.report_id
    AND CONTAINS (a.dummy, 'PAY') > 0
    Which retruns
    PAY Master A
    PAY Master B
    PAY Master C
    Please let me know is there any way i can restrict this to single row with concatination of child data like
    PAY Master A B C
    Another doubt is ,i have the column value like p_consolidation_set_id,when i give this in CONTAINS (a.dummy, 'p_consolidation_set_id') > 0 ,then not able to get the any results.
    please let me what shall i do for this issue.
    Thanks
    Message was edited by:
    user496798

    There are various ways to concatenate the values. One nice generic solution is to use Tom Kyte's stragg function:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:2196162600402
    If p_consolidation_set_id is a variable name, not a value, then do not put quotes around it.
    Message was edited by:
    Barbara Boehmer

  • Need query to link parent and child discrete job planned through ascp

    Could you help me create a query that will show both the parent and child discrete jobs created through ascp run? I do not need entire query. I need to know the names of tables and understand the links or joins between tables. Then, I shall be able to write the sql on my own.
    Thanks

    Hi;
    Please check below thread which could be helpful for your issue:
    http://forums.oracle.com/forums/thread.jspa?messageID=9155702
    Regard
    Helios

  • Issue with Master and child relationship,viewlink

    Hi Frnds,
    In one of our custom pages we have Master child relationship between Invoice lines and their distributions.
    Things work absolutely fine when total no of distributions(say 10) are equal to max no of distributions that can be shown on 1st page(i.e equal to advancetable property value 'Records displayed'..say set as 10)
    What happens is when in advance table I click on next button to navigate to next set of records and then edit some field that have any event..ppr or lov my control by default gets transferred to very first set of records.
    !!!!!!!!!!!!!! Also this happens only when no of invoice lines are more than 1.
    I not sure whether the issue is with VL,VO,AO or the advance table property.
    One simple solution that I have tried is...getting back the focus to the row that is updated but it causes some other problem.
    Any pointers will be very helpful
    Thanks in advance.

    Hi any help???

  • Query to get summarized and detailed data

    Hi experts,
    The scenario is as follows:
    Generic extractor -> DSO -> Infocube
    Now, the cube have item level details. My concern is, the cube might grow very big and impact the performance.
    Is it possible to have a query that retrieves summarized information from the cube and for details do a jump to target to the DSO and get the details?
    Pls give me a hint on this.

    Yes you can have summerized query on Cube & item level query on DSO.
    Using RRI (tcode RSBBS) you can jump from Summerized Query to Detailed Query.
    You can also pass values from summerized query to detailed query through RRI if required, provided the same infoobject is used in both cube & DSO.

  • Query to get subtotals and totals

    Hi
    I have write a query which gives results in the following form:
    Name Jan Feb Mar
    A1 54 3 43
    A2 1 23 53
    A3 34 23 23
    Subtotal A 98 49 119
    B1 23 12 34
    B2 12 2 14
    Subtotal B 35 14 48
    Total 133 63 167
    I mean getting the subtotal and then totals.
    Does anybody know how to do this?

    Jeneesh, like your solution.. simple and elegant. But..... ;)
    If you use NVL you can't distinguish between a "NULL value" and a record which was added because of the ROLLUP.. it might be better to use GROUPING to determine if the row was added to the result set because of the ROLLUP
    Notice the difference between these two queries
    SQL> with test as
      2  (
      3  select 'A1' name, 54 jan, 3  feb,  43 mar from dual union all
      4  select 'A2' name, 1  jan, 23 feb,  53 mar from dual union all
      5  select 'A3' name, 34 jan, 23 feb,  23 mar from dual union all
      6  select 'B1',  23 ,12, 34 from dual union all
      7  select null, null, null, null from dual union all
      8  select 'B2',  12 ,2 ,14  from dual
      9  )
    10  select nvl(name,n1) name,jan,feb
    11  from(
    12  select name,substr(name,1,1) n1,sum(jan) jan,sum(feb) feb from test
    13  group by rollup(substr(name,1,1),name)
    14  );
    NAME        JAN        FEB
    A1           54          3
    A2            1         23
    A3           34         23
    A            89         49
    B1           23         12
    B2           12          2
    B            35         14
                124         63
    10 rows selected.
    SQL> with test as
      2  (
      3  select 'A1' name, 54 jan, 3  feb,  43 mar from dual union all
      4  select 'A2' name, 1  jan, 23 feb,  53 mar from dual union all
      5  select 'A3' name, 34 jan, 23 feb,  23 mar from dual union all
      6  select 'B1',  23 ,12, 34 from dual union all
      7  select null, null, null, null from dual union all
      8  select 'B2',  12 ,2 ,14  from dual
      9  )
    10  select decode (grouping (substr(name,1,1)), 1, 'Total', substr (name, 1, 1)) n1
    11       , decode (grouping(name), 1, 'Name total',name)
    12       , sum(jan) jan
    13       , sum(feb) feb
    14    from test
    15   group by rollup (substr(name,1,1)
    16                   ,name
    17                   );
    N1    DECODE(GRO        JAN        FEB
          Name total
    A     A1                 54          3
    A     A2                  1         23
    A     A3                 34         23
    A     Name total         89         49
    B     B1                 23         12
    B     B2                 12          2
    B     Name total         35         14
    Total Name total        124         63
    10 rows selected.
    SQL>

  • Query to get salary and stock options

    Hello All,
    I need to genrate a report which give infomation of the following
    Salary, Bonus, Emp A/c number, stock options, proposed salary and proposed bonus
    For this I am using the following query , Can any one verify this and let me know.
    SELECT ppp.proposed_salary_n, proposed_salary, peevf.screen_entry_value,segment1||segment2||segment3||segment4||
    segment5||segment6 "Stock Options" ,segment1||segment2||segment3||segment4||segment5||segment6||segment7||segment8||segment9||segment10 "Bank Details"
    FROM per_all_assignments_f paaf,
    per_pay_proposals ppp,
    pay_element_entry_values_f peevf,
    pay_element_entries_f penf,
         PER_ANALYSIS_CRITERIA PAC,
         PER_PERSON_ANALYSES PPA,
         per_all_people_f papf
    WHERE papf.PERSON_ID=paaf.person_id
    AND paaf.assignment_id = ppp.assignment_id
    AND peevf.element_entry_id = penf.element_entry_id
    AND paaf.assignment_id = penf.assignment_id
    AND ppa.ANALYSIS_CRITERIA_ID=pac.ANALYSIS_CRITERIA_ID
    AND ppa.person_id=paaf.person_id
    AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
    AND SYSDATE BETWEEN peevf.effective_start_date AND peevf.effective_end_date
    AND SYSDATE BETWEEN penf.effective_start_date AND penf.effective_end_date
    AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date
    AND papf.effective_end_date

    Perfect Octavio...Thanks for your help :)
    I used the following query as per your suggestions:
    SELECT aid.invoice_id,
    aid.amount,
         gcc.CODE_COMBINATION_ID,
    gcc.segment3,
         f1.description,
         gcc.segment4,
    f2.description
    FROM ap_invoice_distributions_all aid,
    gl_code_combinations gcc,
    fnd_flex_values_vl f1,
    fnd_flex_values_vl f2,
    (SELECT flex_value_set_id
    FROM fnd_id_flex_segments
    WHERE application_id = 101
    AND id_flex_code = 'GL#'
    AND UPPER (segment_name) = 'COST CENTER') cc,
    (SELECT flex_value_set_id
    FROM fnd_id_flex_segments
    WHERE application_id = 101
    AND id_flex_code = 'GL#'
    AND UPPER (segment_name) = 'ACCOUNT') acct
    WHERE aid.dist_code_combination_id = gcc.code_combination_id
    AND f1.flex_value_set_id = cc.flex_value_set_id
    AND f2.flex_value_set_id = acct.flex_value_set_id
    AND gcc.segment3 = f1.flex_value
    AND gcc.segment4 = f2.flex_value
    ORDER BY aid.invoice_id
    -Munna
    Edited by: user584101 on Aug 19, 2009 9:59 AM

  • Can't get master and subpages to show in PDF doc

    I have created a PDF doc and revised it in Adobe LiveCycle.
    I can see the pages in LiveCycle, but when I PDF the doc it just shows one page.
    Please advise.

    Moved to LiveCycle Designer.
    Molly,
    People in the Designer forum have more experience with Designer related issues. I have moved it to that forum.
    Mike

  • Query for get username and profile and password life time

    please provide query for this output
    Profile     Username     Password Life Time
    DEFAULT     APPQOSSYS     UNLIMITED days
    DEFAULT     CZ36QW     UNLIMITED days
    DEFAULT     DBSPI     UNLIMITED days
    please tell me Password Life Time in this col um shows empty.

    please provide query for this output
    Profile     Username     Password Life Time
    DEFAULT     APPQOSSYS     UNLIMITED days
    DEFAULT     CZ36QW     UNLIMITED days
    DEFAULT     DBSPI     UNLIMITED days
    please tell me Password Life Time in this col um shows empty.

  • UOM in master ORG and Child Organization

    Hi all,
    In INV user guide, in "Primary Unit of Measure" section, I read the "Note: If an item belongs to both a master organization and a child organization, and these organizations belong to the same costing organization, the primary unit of measure for the item must be the same within both organizations."
    What happend if I configure the diferent UOM in master and child org?

    Were you able to?

  • SAP CUA connector changes password in master system AND child systems?

    Please confirm if OIM can change the password in both SAP CUA master and child systems through SAP CUA connector. The connector guide mentions the following parameter can be defined in SAP CUA IT Resource.
    Parameter: SAPChangePasswordSystem Flag that accepts the value X or ' '
    If the value is X, then the password is changed
    only in the master system. If the value is ' ', then
    the password is changed in both master and child
    systems.
    This parameter is used by the Reset
    Password function.
    Thanks!

    Hi,
    1) You can use report RSCCUSND to distribute users from CUA to child client. Check section "Sending User Master Data to a Child System" in [CUA cookbook|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fe4f76cc-0601-0010-55a3-c4a1ab8397b1?quicklink=index&overridelayout=true].
    2) if the user account has not been synced to CUA then you should be able to delete it in child system. The button should be displayed for unsynced users. You can use transaction SCUG to sync users between new child system and CUA. Check section "Transfering Users from New System" in [CUA cookbook|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fe4f76cc-0601-0010-55a3-c4a1ab8397b1?quicklink=index&overridelayout=true].
    Cheers

Maybe you are looking for

  • I updated my MacBook Pro with new software and when my

    computer asked me for my password to log in, it said that my password was wrong and wouldn't let me use my Apple ID to reset it. When I know the password was right.

  • Creating adobe bookmarks in Pages

    Maybe I am missing something simple. Can I create a document in Pages that when I export it to a PDF document will have automatically created PDF bookmarks. I can do it in inDesign, MS Word, and Open Office. Can I do it in Pages? If so, how? SJ

  • Connect to a stereo receiver?

    I feel stupid asking such a basic question, but I'd like to listen to the music on my ipod by connecting it to the stereo receiver I drive my home speakers with instead of using headphones. Is this as simple as finding an audio cable that plugs into

  • MSAD USER CHANGE PASWORD OPTION

    As I am using MSAD as my USER directory,I am not able to see the change password option  in hyperion workspace 11.1.2.2.for MSAD users.This option is available for Native users but hte same is not Available for MSAD users.Please guide me how do we ac

  • 'Update Fail' message appears when I try to set up my gmail account on my BB Curve 9360

    I managed to set up an hotmail account I no longer use but for some reason I am unable to set my gmail account. Does anyone know how to fix this?