Join between AP_bank_account_uses_all and Po_vendors in r12

Hello,
Actually yesterday i posted the same question, but it was deleted. I really dont know the reason though.
But, i have a cursor that has these conditions that run in 11i.
Can anyone please help me to re-write the following query with the joins in r12.
AP_BANK_ACCOUNTS.BANK_BRANCH_ID = AP_BANK_BRANCHES.BANK_BRANCH_ID
AND AP_BANK_ACCOUNT_USES_ALL.VENDOR_ID = PO_VENDORS.VENDOR_ID
AND AP_BANK_ACCOUNT_USES_ALL.VENDOR_ID = PO_VENDOR_SITES_ALL.VENDOR_ID(+)
AND AP_BANK_ACCOUNT_UESES_ALL.VENDOR_SITE_ID = PO_VENDOR_SITES_ALL.VENDOR_SITE_ID(+)
Truly appreciate your help.
Thank you in advance.
Edited by: 933951 on May 15, 2012 2:09 PM

Please see these links.
Re: Supplier Bank Info in AP
Re: APPS (Vendor Bank Details)
http://erpconsultingstore.com/19.html
http://avkoracleapps.blogspot.ca/2011/07/query-for-supplier-bank-details.html
http://oracleappsquery.wordpress.com/category/query/page/3/
Thanks,
Hussein

Similar Messages

  • Join between gl_import_references and ap_invoice_distributions_all in R12

    Please advice me how to join gl_import_references and ap_invoices_distribution_all in R12. I have understanding of join between gl_import_references and ap_invoices_all, but I am not clear how to join ap_invoice_distriutions_all to gl_import_references.
    Thanks

    Hi,
    we don't have direct link for GL_JE_LINES and AP_INVOICE_DISTRIBUTIONS_ALL.
    First join AP_INVOICE_DISTRIBUTIONS_ALL and GL_CODE_COMBINATIONS then link to GL_JE_LINES.
    Please see below eg:
    SELECT *
    FROM gl_code_combinations gcc,
    ap_invoice_distributions_all apd,
    gl_je_lines gjl
    WHERE gcc.code_combination_id = apd.dist_code_combination_id
    AND gcc.code_combination_id = gjl.code_combination_id;
    your case use apd.dist_code_combination_id instead of apd.po_distribution_id (>
    and apd.po_distribution_id = GJL.CODE_COMBINATION_ID Add -----------Problem here-----------)
    I hope this will help to you.
    Thanks,
    Prasad Raju

  • Link between XLA_AE_LINES and AP_INVOICES_ALL in R12

    Good day,
    Table AP_AE_LINES_ALL was replaced with XLA_AE_LINES in R12. There used to be a direct link in R11 between AP_AE_LINES_ALL and AP_INVOICES_ALL. Does anybody know what the link is between XLA_AE_LINES and AP_INVOICES_ALL in R12?
    Thanks for your help.

    Post it in Oracle Application related forum.

  • Join Between W_PERSON_F and W_POSITION_D

    Hi,
    I want to join W_PERSON_F fact table and W_POSITION_D dimension table. Database: Siebel DB.
    Is there any direct join or we want to join through some other table?
    Thanks,
    Satheesh

    As per my knowledge there is no direct join between w_person_f and w_position_d
    but you can create an alisa of w_person_d as contact(w_person_d) and join with w_person_f
    as below
    contact(w_person_d).row_wid = w_person_f.contact_wid
    please mark the ans if it is correct.
    Thanks

  • Join between SO and AR tables in Oracle Apps 11.0.3

    Hello,
    I am new to Order Management. Can anyone please suggest join between SO Tables and Receivables tables in Oracle Apps version 11.0.3.
    I am working on an Invoicing error during Autoinvoice Import Program and I am doing workaround on this issue. This error comes for specific SO only. The error causes all invoices for a org not be imported into AR. To find out a solution for the same we run Autoinvoice into batches by Sales Order using a process of elimination to determine the offending So transaction. From these offending SO then we determine the customer for these SO's. And then find out if there are any other accounts that have relationships with the offending customer and then turn off that relationship. Then rerun Autoinvoice for that SO. Most of the time SO will be imported successfully. Can anyone please suggest what must be the issue in Autoinvoice Program as I am new this.
    Thank You.
    Regards,
    Meghana

    Hi again;
    I found this please also check this:
    Price List Migration from 11.0.3 to 11.5.10/R12.
    Regard
    Helios

  • Join Between PO and Requisition

    Hi,
    I am trying to do a report in Disco (4.1.48) on all the Open Po's associated Req with the Req Amount and Amount receipted.
    I can get the info for the Req fine and the info for the PO's fine.
    But I cannot get the join between the Po and Req to work so all the data pulls onto one sheet.
    I keep getting an error "Join configuration cannot resolved as one detail folder uses non aggregated items"
    I have a Join between Po Distributions All.Req Distribution Id and Po Req Distributions All.Distribution Id
    Any Help Greatly appreciated
    Mick

    Hi,
    Personally, I would avoid custom folders. It sounds as though you are using a master and two detail folders in your report, and you are using an aggregation function (e.g. SUM) on an item in one of the detail folders. You may be able to resolve this by changing (using Discoverer Administrator) the join on the other detail folder to be a one-to-one join.
    Rod West

  • Best Practice - Outer Join between Fact and Dim table

    Hi Gurus,
    Need some advice on the below scenario
    I have an OOTB subject area and we have around 50-60 reports based on it. The related subject area Fact and Dim1 table are having inner join.
    Now I have a scenario for one report where outer join has to be implemented between Fact and Dim1. Here I am against changing the OOTB subject area join as the outer join will impact the performance of other 50-60 reports.
    Can anyone provide any inputs on what is the best way to handle this scenario?
    Thanks

    Ok. I tried this:
    Driving table : Fact, Left outer join -- didnt work.
    Driving table: Dimension D left outer join -- didnt work either
    In either the case, I see physical query as D left outer Join on Fact F. and omitting the rows.
    And then I tried this -
    Driving table: Fact, RIght outer join.
    Now, this is giving me error:
    Sybase][ODBC Driver]Internal Error. [nQSError: 16001] ODBC error state: 00000 code: 30128 message: [Sybase][ODBC Driver]Data overflow. Increase specified column size or buffer size. [nQSError: 16011] ODBC error occurred while executing SQLExtendedFetch to retrieve the results of a SQL statement. (HY000)
    I checked all columns, everything matched with database table type and size.
    I am pulling Fact.account number, Dimension.account name, Fact.Measures. I am seeing this error each time I pull Fact.Account number.

  • Select Query and Join Between int and Numeric(22)

    I have two tables
    tablea
    Field1 int
    tableb
    Field1 Numeric(22)
    I know this design is wrong but this is what I have ?
    tablea contains about 12M records
    Field1 in tablea is one to one related to Field1 in tableb
    Now I have Select Query
    Select tablea.* from tablea,tableb where tablea.field1=tableb.field1 and tableb.field2 > somrthing
    Query here is
    Does Join Between
    int type

    Yes, avinash said rightly.
    there is another way bit diffict.
    use the indexes properly as available in the mseg table and mkpf table even then it is diffcult
    else try using BAPI.
    some bapi will give the entire details of the MATERAIL DOCUMENT
    go to BAPI explorer tcode BAPI.
    where you can find the BAPI name like the 'GET_LIST'.
    Try this.
    hope this will serve your purpose.
    Thanks and regards
    Ramchander Rao.K

  • Join between Oracle and non-Oracle Database

    We are working at a project with the follow architecture:
    - 5 Databases (3 Oracle, 1 Sybase and 1 DB2);
    - Session Bean like Session Facade Pattern;
    - Entity Bean (BMP);
    - OC4J (Oracle Container for J2EE);
    The case is that we cannot make join between tables of different bases, for example, join with one table of Oracle and one other of DB2, therefore the customer does not possess tool midleware for this.
    The idea that appeared was: we make a query in table XXX of Oracle and return a HashTable with its respective VO�s and Keys (PKs from the first query that will serve of base for the second query), later we have access the DB2 that one second collection would return, to inside make join of the application.
    The problem is that with this solution, we will have fall in the performance. And we do not know if it is the best form.
    Do you have any idea???
    Thanks,
    Eric Sander

    Hi,
    If you have different databases then the join has to be done in the VM (either by the appserver or by you).
    If you want to do it yourself, I would try the following:
    -write one DAO per business object (at least one per database)
    -this DAO contains the specifics of its database
    -return a hashtable of keys and VOs from one DAO (as you say you do?)
    -in the other DAO, add a method "joinWith ( Hashtable foreignKeys )" that will return the join's result
    -implement the method along these lines:
    1. retrieve the candidate rows from the second DAO's tables (1 query execution)
    2. put the keys in a new Hashtable, say "candidateKeys" (meaning 1 iteration over all results)
    3. iterate over all elements of foreignKeys (1 iteration)
    4. for each element, check if a key exists in "candidateKeys" (1 hash lookup, very fast)
    5. add any such row to the result
    This is called a hash join (Oracle does it internally if you do a join).
    It is the fastest algorithm to do joins.
    Best,
    Guy
    http://www.atomikos.com - JTA transaction manager

  • Inner join between OBOE and OBOT

    Hi all,
    I am trying to query these tables, but for all the system displays data from these tables in only one windows, MSQL does not inner join this tables.
    So, we are looking for the relation in these two tables, or between OBOE and JDT1/OJDT would be enought.
    Thanks and regards,
    Javier Zapata

    Hi,
    i'm not sure but you can try to use the table BOT1 (Bill of Exchange Transactions details).
    Here you can find the field AbsEntry (related to the table OBOT) and the field BOENumber (related to OBOE table).
    Hope this helps
    Regards,
    Fabio Salucci

  • Join between hz_cust_site_uses_all and pa_agreements_all table

    What is the joining condition between hz_cust_site_uses_all and pa_agreements_all table? How hz_cust_site_uses_all and pa_agreements_all table can be joined?

    Hi,
    What happens if you simply use a DISTINCT clause, something like:
    SELECT DISTINCT pa.customer_id ,hcs.cust_acct_site_id
               FROM hz_cust_acct_sites_all hca,
              hz_cust_site_uses_all hcs,pa_agreements_all pa
              WHERE hcs.cust_acct_site_id = hca.cust_acct_site_id
            AND hca.cust_account_id       = pa.customer_id
    Thanks &
    Best Regards,

  • Creating a Join between VBAK and EKKO

    Hello
    I have to prepare a Sales Report for Third Party Orders....
    The Report takes fields from EKKO (PO DOC Header) and VBAK (Sales Order Doc).
    The Problem is that I cannot find anything to join these two Tables. The BSTNK Field in VBAK does not match with the EBELN field in EKKO.
    Anticipating a quick reply
    Thanks in advance
    Zubin Kurian

    Hi,
    You can use matnr as key.
    Look for the Keyfileds between two tables.If you can't found any key fields you can go for FM.
    Check it once.
    Reg
    Pra

  • Joins between transactions and sales order tables?

    Hi all,
    SELECT ott.NAME,
                 msi.organization_id
      FROM apps.mtl_material_transactions mmt,
                apps.mtl_system_items_kfv msi,
                apps.oe_order_headers_all ooha,
                apps.oe_order_lines_all oola,
                apps.oe_transaction_types_tl ott
    WHERE     mmt.transaction_type_id = 12
           AND mmt.inventory_item_id = msi.inventory_item_id
           AND mmt.organization_id = msi.organization_id
           AND ooha.header_id = oola.header_id
           AND oola.line_id = mmt.trx_source_line_id
           AND oola.inventory_item_id= msi.inventory_item_id
           AND ooha.order_type_id= ott.transaction_type_id
           AND mmt.inventory_item_id = 1234
           AND msi.organization_id = 20
    And i don't have inventory item id with this transaction_type_id = 12

    Transaction_type_id 12 is a "Receive from Intransit".  I don't think those will join to sales orders.  What are you trying to accomplish?

  • Dynamic SQL Joining between tables and Primary keys being configured within master tables

    Team , Thanks for your help in advance !
    I'm looking out to code a dynamic SQL which should refer Master tables for table names and Primary keys and then Join for insertion into target tables .
    EG:
    INSERT INTO HUB.dbo.lp_order
    SELECT *
    FROM del.dbo.lp_order t1
    where not exists ( select *
    from hub.dbo.lp_order tw
    where t1.order_id = t2.order_id )
    SET @rows = @@ROWCOUNT
    PRINT 'Table: lp_order; Inserted Records: '+ Cast(@rows AS VARCHAR)
    -- Please note Databse names are going to remain the same but table names and join conditions on keys
    -- should vary for each table(s) being configured in master tables
    Sample of Master configuration tables with table info and PK Info :
    Table Info         
    Table_info_ID    Table_Name    
    1        lp_order    
    7        lp__transition_record    
    Table_PK_Info        
    Table_PK_Info_ID    Table_info_ID    PK_Column_Name
    2                1    order_id
    8                7    transition_record_id
    There can be more than one join condition for each table
    Thanks you !
    Rajkumar Yelugu

    Hi Rajkumar,
    It is glad to hear that you figured the question out by yourself.
    There's a flaw with your while loop in your sample code, just in case you hadn't noticed that, please see below.
    --In this case, it goes to infinite loop
    DECLARE @T TABLE(ID INT)
    INSERT INTO @T VALUES(1),(3),(2)
    DECLARE @ID INT
    SELECT @ID = MIN(ID) FROM @T
    WHILE @ID IS NOT NULL
    PRINT @ID
    SELECT @ID =ID FROM @T WHERE ID > @ID
    So a cursor would be the appropriate option in your case, please reference below.
    DECLARE @Table_Info TABLE
    Table_info_ID INT,
    Table_Name VARCHAR(99)
    INSERT INTO @Table_Info VALUES(1,'lp_order'),(7,'lp__transition_record');
    DECLARE @Table_PK_Info TABLE
    Table_PK_Info_ID INT,
    Table_info_ID INT,
    PK_Column_Name VARCHAR(99)
    INSERT INTO @Table_PK_Info VALUES(2,1,'order_id'),(8,7,'transition_record_id'),(3,1,'order_id2')
    DECLARE @SQL NVarchar(MAX),
    @ID INT,
    @Table_Name VARCHAR(20),
    @whereCondition VARCHAR(99)
    DECLARE cur_Tabel_Info CURSOR
    FOR SELECT Table_info_ID,Table_Name FROM @Table_Info
    OPEN cur_Tabel_Info
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    WHILE @@FETCH_STATUS = 0
    BEGIN
    SELECT @whereCondition =ISNULL(@whereCondition+' AND ','') +'t1.'+PK_Column_Name+'='+'t2.'+PK_Column_Name FROM @Table_PK_Info WHERE Table_info_ID=@ID
    SET @SQL = 'INSERT INTO hub.dbo.'+@Table_Name+'
    SELECT * FROM del.dbo.'+@Table_Name+' AS T1
    WHERE NOT EXISTS (
    SELECT *
    FROM hub.dbo.'+@Table_Name+' AS T2
    WHERE '+@whereCondition+')'
    SELECT @SQL
    --EXEC(@SQL)
    SET @whereCondition = NULL
    FETCH NEXT FROM cur_Tabel_Info
    INTO @ID, @Table_Name
    END
    Supposing you had noticed and fixed the flaw, your answer sharing is always welcome.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Join between ekpo and lips

    Hi,
    this join is syntactically correct but because ekpo-ebelp is the type numc(5) and lips-vgpos is the type numc(6) it's not working.
    Example: ekpo-ebelp = 00010
                   lips-vgpos = 000010
    What should i do? Please someone help me.
    Thank you.
    SELECT SINGLE e~ebelp e~aedat e~matnr e~menge e~netpr  l~lfimg
        INTO CORRESPONDING FIELDS OF it_joindata
        FROM ekpo AS e LEFT JOIN lips AS l ON e~matnr = l~matnr AND
    e~ebeln = l~vgbel AND
    e~ebelp = l~vgpos AND
    l~vbeln = pa_vbeln
        WHERE e~ebeln = pa_ebeln AND e~idnlf = it_file-cod.
    Edited by: Dan M. on Nov 3, 2008 5:14 PM

    Hi Dan,
    You'll have to exclude the line item criteria from the join I'm afraid.
    I'd select both ebelp and vgpos into my internal table and then remove the unwanted ones after the select statement. You'll be able to use offsets to compare the two fields at this stage.
    Darren

Maybe you are looking for

  • SAP HR Structural Authorizations

    Hi Experts, I need a help regarding SAP HR Structural Authorizations. Currently our HR System is set with structural authorizations were in users will be accessing HR Org structure with different pd-profile and HR relationships (with Org units ex: as

  • Extraction of the data from R/3  to BW  using function module

    hi all,               i m extracting the data from SFLIGHT using fm RSAX_BIW_GET_DATA_SIMPLE  . Could you pls tell me that E_T_DATA is a structure (wa) or  table internal . rgds, Deepak.

  • [iOS] Advice on when to close events

    hi all just looking for some advice on when to close some events .. my problem is i am working on a iOS app that loads two large swf files and plays them both at the same time. i am loading in the video files on the first frame and adding them to the

  • Compiling c++ files for windows

    I have a c++ program that I would like to compile windows binaries for. I have tried installing mingw32-gcc, and using g++, but when I run the binaries (in wine or from windows), I get errors that certain .dll files are not found. Is there additional

  • Problem with column description in report

    Hi Guys, In one of the queries, I have time-characteristic 0FISCPER (restricted on 0I_FPER variable) in the columns section. I have few key figures in my rows section of the query. When i executed the query (filter char. - Fiscal year variant restric