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.

Similar Messages

  • Link between xla_distribution_links and ap_invoices_all

    SELECT SUP.VENDOR_NAME,
                  API.INVOICE_NUM,
                  SUM (NVL (AEL.ACCOUNTED_DR, 0) - NVL (AEL.ACCOUNTED_CR, 0)) "BALANCE"
    FROM xla.xla_ae_lines AEL,
             xla.xla_ae_headers AEH,
             (SELECT   XDL.AE_HEADER_ID,
                              XDL.AE_LINE_NUM,
                              XDL.APPLIED_TO_SOURCE_ID_NUM_1,
                              XDL.ALLOC_TO_SOURCE_ID_NUM_1,
                              APSI.INVOICE_NUM "ALLOC_TO_INVOICE_NUM",
                              XDL.EVENT_CLASS_CODE
                FROM APPS.XLA_DISTRIBUTION_LINKS XDL, AP.AP_INVOICES_ALL APSI
               WHERE XDL.APPLICATION_ID = 200
                     AND XDL.EVENT_CLASS_CODE IN
                            ('PREPAYMENTS', 'PREPAYMENT APPLICATIONS')
                     AND XDL.ROUNDING_CLASS_CODE = 'PREPAID_EXPENSE'
                     AND XDL.ALLOC_TO_SOURCE_ID_NUM_1 = APSI.INVOICE_ID
                     GROUP BY XDL.AE_HEADER_ID,
                              XDL.AE_LINE_NUM,
                              XDL.APPLIED_TO_SOURCE_ID_NUM_1,
                              XDL.ALLOC_TO_SOURCE_ID_NUM_1,
                              APSI.INVOICE_NUM,
                              XDL.EVENT_CLASS_CODE
                     ) dl, --------------VERY IMPORTANT---------------
             GL.GL_CODE_COMBINATIONS CC,
             AP.AP_SUPPLIERS SUP,
             AP.AP_INVOICES_ALL API
       WHERE     aeh.balance_type_code = 'A'
             AND aeh.ae_header_id = ael.ae_header_id
             ---hh
             AND aeh.ae_header_id = DL.ae_header_id
             AND ael.ae_line_num = DL.ae_line_num
             AND ael.ledger_id = 2022
             AND ael.code_combination_id = CC.CODE_COMBINATION_ID
             AND DL.APPLIED_TO_SOURCE_ID_NUM_1 = API.INVOICE_ID --------------VERY IMPORTANT-----------------
             AND CC.SEGMENT1 = '131061'
             AND AEL.PARTY_ID = SUP.VENDOR_ID
             AND SUP.VENDOR_NAME = 'COMPANY_NAME'
             AND TRUNC (AEH.ACCOUNTING_DATE) <= TO_DATE ('31-DEC-2012', 'DD-MON-YYYY')
    GROUP BY API.INVOICE_NUM,  SUP.VENDOR_NAME
    HAVING          SUM (NVL (AEL.ACCOUNTED_DR, 0) - NVL (AEL.ACCOUNTED_CR, 0)) <> 0
    Pleaes explain the above query. The result is the prepayment balance grouped by Vendor_name and Invoice_num. What I don't understand is the use of the inline view DL. Why would you need it? I tried to rewrite the above task as following.
    select  inv.vendor_id, INV.INVOICE_NUM, sum(AEL.ACCOUNTED_DR) - sum(AEL.ACCOUNTED_CR) balance
    from xla.xla_ae_lines ael,
            xla.xla_ae_headers  aeh,
            XLA.XLA_DISTRIBUTION_LINKS xld,
            AP.AP_INVOICES_ALL inv,
            ap.ap_invoice_distributions_all dist,
            AP.AP_SUPPLIERS sup
    where ael.ae_header_id = aeh.ae_header_id AND
                XLD.AE_HEADER_ID = aeh.ae_header_id AND
                inv.invoice_id = dist.invoice_id AND
                INV.vendor_id = SUP.VENDOR_ID AND
                INV.VENDOR_ID = 407012 AND
                AEL.APPLICATION_ID = 200 AND
                INV.INVOICE_NUM = '30'
    Group by inv.vendor_id, INV.INVOICE_NUM
    I linked AP_INVOICES_ALL to XLA_DISTRIBUTION_LINKS with APPLIED_TO_SOURCE_ID_NUM_1. But in the first query I posted, XLA_DISTRIBUTION_LINKS and AP_INVOICES_ALL were joined twice - first in the inline view DL using ALLOC_TO_SOURCE_ID_NUM_1, then in the main query using APPLIED_TO_SOURCE_ID_NUM_1. Oracle ETRM says nothing about the usage of ALLOC_TO_SOURCE_ID_NUM_1. So I am totally confused. Any hints would be appreciated    

    In the top query the detail level of information has been gathered from the sub query DL to make the query easy to understand but when one uses a sub query the performance takes a hit.
    Thanks&Regards
    [email protected]

  • 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 AP_INVOICE_PAYMENTS_ALL and AP_PAYMENT_SCHEDULES_ALL

    Guys,
    I am new to Oracle Financials, can you please let me know if my understanding of link between AP_INVOICE_PAYMENTS_ALL and AP_PAYMENT_SCHEDULES_ALL is correct or not?
    SELECT ai.invoice_id
    , ai.invoice_num
    , aps.due_date
    , aip.accounting_date
    , aip.amount, aip.payment_num
    FROM ap_invoices_all ai
    , ap_invoice_payments_all aip
    , ap_payment_schedules_all aps
    WHERE aps.invoice_id = ai.invoice_id
    AND aip.invoice_id = aps.invoice_id
    AND aip.payment_num = aps.payment_num

    plz look at seeded view AP_DOCUMENTS_PAYABLE
    FROM
    ap_invoices_all ai,
            ap_invoice_payments_all aip,
            ap_payment_schedules_all aps,
    WHERE
    AND aip.invoice_id = ai.invoice_id
    AND ai.invoice_id = aps.invoice_id
          AND aps.payment_num = aip.payment_num
    ...your code a bit different by
    AND aip.invoice_id = aps.invoice_idbut it's ok
    >
    AND aip.payment_num = aps.payment_num
    Is this correct?
    >
    yes

  • Link Between AR and GL

    Hi ,
    The query :-
    "Please tell me the link between AR and GL.. As i need to extract cost from GL for journal source Receivable."
    do i need to use both AR_ADJUSTMENTS_ALL and ar_distributions all within a seprate query while joining both with UNION ALL?
    How can i make use of GL_IMPORT_REFERENCES?
    Please reply

    Is it on R12 / 11i?
    If R12, please have a look at http://www.orafaq.com/node/2242
    By
    Vamsi

  • Link between AP and GL main tables in 11i

    Hello,
    Can anyone please provide the link between AP and GL main tables.
    I need a join between the AP_Invoices_All, AP_INVOICE_DISTRIBUTIONS_ALL, GL_JE_LINES, GL_JE_HEADERS.
    Actually, I found a query that is as below. I want to confirm if that is correct. I need to confirm if the right joins are necessary and are placed correctly.
    Thank you
    select *
    from gl_je_headers gjh,
    gl_je_lines gjl,
    ap_invoices_all aia,
    po_vendors pv,
    ap_invoice_distributions_all aida
    where gjh.je_header_id = gjl.je_header_id
    and aida.invoice_id(+) = gjl.reference_2
    and aida.distribution_line_number(+) = gjl.reference_3
    and aida.invoice_id = aia.invoice_id(+)
    and gjh.je_source = 'Payables'
    --and gjh.je_category = 'Purchase Invoices'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello,
    Any help.
    I have also found out that, in 11i, the Reference_2 column in the GL_JE_Lines table has the invoice_ID in it.
    So, does that mean that we can join the GL tables and the AP Invoice tables using this condition. I dont know if that is right. Please help
    select * from
    ap_invoices_all aia, gl_je_lines gjl
    where aia.invoice_id = gjl.reference_2

  • Link between Delivery and Sales Order Schedule Line

    Hi Gurus,
    I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
    For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
    Report should be something like this
    Sales Order    Item   Schedule Line    Delivery    Del Item   Confirmed Order Qty
    O1                 10      1                       D1           10            5
    O1                 10       2                      D2            10            5
    O1                 10       3                      D3            10            4
    How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
    We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
    Please help.
    Regards,
    Gaurav

    Hi,
    I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
    Sale order   Item    Schedule line  qty
    SO1            Item1     Sch1            10
    SO2            Item1      Sch2           10
    Delivery Item QTy
    DO1       IT1   15
    DO2       IT1    5
    In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
    So I am not sure if you can establish a one to one link, please check with your SD consultants.
    Regards,
    Ashwin G

  • Link between sd and pp

    hi all,
      i have a problem regarding relation or link between sales and production order. i have to fetch production order number related to sales order number. i have checked in the table AFPO that is production order item table , there is field AFPO-KDAUF and AFPO-KDPOS ie, sales order and sales item. but when i see these two fields there is no data into the field so how can i get data into the table related to production order.can anyone help me on this issue.

    Please refer to the below links -
    https://forums.sdn.sap.com/post!reply.jspa?threadID=309885
    Integration points with MM/IM and PP are some of the following -
    When a Production order is created and released a reservation gets created for the materials in BOM
    When the reservation is created and materials are posted against the reservation with mvt type 311 these are transferred to the respective location.
    When a GR is posted with mvt type 101, the Finished or Semifinished goods are posted to the respective storage location and inventorized.
    When a consumption is posted with mvt type 261 then stock will get reduced in resepective storage location.
    When a batch determination is done in a production order basing on the batch search strategy and sort rule material, quantity and batch are selected.
    If WM is configured an associated internal movement for all the above movement types will be posted.
    During MRP, BOM which is a master data for PP is used to calculate the dependent requirements of materials.
    During availabilty check of a production order basing on the availability check configured materials will be selected and checked.
    Hope the above may help you.

  • 'Is there a link between OLM and iProcurement'

    I have been asked 'Is there a link between OLM and iProcurement'? The person posing the question is wanting to create trainers as suppliers and I know that the supplier information is shared between OLM and the A/P, A/R and G/L modules and I presume that the link to iProcurement will be via one of these modules however is there a more direct vanilla link between OLM and iprocurement?
    Any help would be great
    Thanks
    DM

    I am afraid there is no link between the iProc and OLM.
    The closest that apps can offer you is that your learner/delegates can be of type external i.e. being an Organization or a Customer. Hence there exists a link for your delegate to be a customer(hz_parties).
    However this might be a future integration i.e. Trainers being suppliers. I am saying so because in 11.5.10 there is a table named OTA_VENDOR_SUPPLIES that has reference to vendor_id. Currently this table is not being used by OLM.
    You may look into the code of packages OTA_VSP_API, OTA_TEA_BUS & OTA_PLE_BUS and see if Oracle's future functionality will converge towards your business requirement.
    Thanks,
    Anil Passi
    http://oracle.anilpassi.com

  • Link between Project and Sales Order

    Apart from sales order can we have a link between project and customer master ??
    I know that WBS element assignment can be made in sales order but i want to have link between
    customer master and project. I don't want any user field or text field in sales order.
    Any idea ?
    Regards
    Ashish

    Yes Mr Ashish!
    As far as iam concern there is no link between Project & Customer Master, you have to link it with SALES order, I had check in XD03,XD01, the complete customer master, i didnt find any field in customer master which links with Project.
    I'll let you know if i find any links.
    Regards,
    ANSAR

  • Link between Item and delivery

    Hi ,
    I want to know the link between item and deliveyr. Like for example, an sales order item ( no. 10) containing 10 quantities can be delviered 5 times( each containing 2 quantities) and line item ( no. 20) can contain one single delivery. I am working on a report where i have to link all the line item to its delivery number. I am trying to achieve this through GENIl but i am not able to indetify as to how to differentiate the different deliveyr numbers. In other words, can some one help me as to how to link the delivery number to its corresponding items?

    Document flow is stored in the table VBFA in ECC.
    VBELV fied is the sales order number and in POSNV specify the line item number and speicfy VBTYP_N = J (Delivery).
    Regards,
    Bhanu

  • Link between GTM and FSCM (sales or purchase order hedging)

    Hi all,
    I am trying for a few days to have SAP GTM working (I am in an IDES ECC6 system, and as far as I know in EhP4 version). The main goal in fact is to test the currency hedging, and therefore to the link GTM and FSCM, either single-sided purchase or sales order, or two-sided . The flow I want is the following :
    -     I buy or sell a product, in GTM, through a trading contract which generates a purchase or sales order.
    -     Automatically a currency hedge is generated to cover the risk, in FSCM, I guess in exposure management.
    -     And then the financial products (derivatives) are generated as well.
    No problem to create the trading contract, no problem to generate the sales or purchase order. But in spite of the (very little) customizing I found in u201CSAP GTM => currency hedgesu201D, and some in FSCM, in u201Ctreasury and risk managementu201D, no way to have this link between GTM and FSCM, no additional document is generated like a Forward Exchange Transaction (I guess I should have this, and then a risk exposure in FSCM).
    Would you have an idea ? Is this customizing, or an additional Business Functions or Extension Set not activated ? SAP says : u201Cit worksu201D, but canu2019t find the way.
    Thank you very much for your help, I am quite looking for this link for a few days now u2026
    Best regards
    Patrick

    Yes Mr Ashish!
    As far as iam concern there is no link between Project & Customer Master, you have to link it with SALES order, I had check in XD03,XD01, the complete customer master, i didnt find any field in customer master which links with Project.
    I'll let you know if i find any links.
    Regards,
    ANSAR

  • What is the link between PO and Requisition in database side

    hello friends,
    please can any one tell me that what is the link between PO and Requisition in database side. means after creating the requisition we will go for create the PO based on that requisition.
    want to know that what is the link between both in database side.
    Thanks in advance
    krish.

    Hi,
    The link is at distribution level, between:
    PO_DISTRIBUTIONS_ALL.REQ_DISTRIBUTION_ID
    and
    PO_REQ_DISTRIBUTIONS_ALL.DISTRIBUTION_ID
    Hope it helps.

  • Link between PR and RFQ

    Hi all,
    I looking for a table where I got a link between e PR and the RFQ which refeer to that PR. We can see in ME53N in the Status tab the RFQ number. I want to fine a table where is that link between PR and RFQ.
    We can see the link in EKPO with the PO number  only if a PO is done from the RFQ (field BANFN).
    If I look in EKPO with the RFQ number, the field BANFN (PR number) is empty.
    I don't find a table with a link between the PR and the RFQ if the PO is not done (nothing interesting in EBAN)
    May someone help me ?
    Thanks all
    Regards
    Mathieu PAINEAU

    Hi all,
    I found by myself ! This link is done in the Table EKET.
    Regards
    Mathieu PAINEAU

  • Linking between PP and SD tables

    Hai friends,
    I want one link between PP and SD tables. My requirement is i have planned order PLAF table. i want to link Sales table. Please guide me.
    Thanks and Regards
    visvanath

    Hi
    You can simply link the Sales order No and ITEM
    VBAP-VBELN and VBAP-POSNR with the PP order item table
    AFPO-KDAUF and AFPO-KDPOS and get the Pp related info
    or in Sales tables there is a field called AUFNR in VBAP
    use that for PP order number
    SD tables
    http://www.erpgenie.com/abap/tables_sd.htm
    PP tables
    http://www.erpgenie.com/abap/tables_pp.htm
    Regards
    Kiran Sure

Maybe you are looking for

  • Problem mapping USB external drive connected to Airport Extreme on my PC

    I am having a problem mapping my USB external drive in my PC running WIndows Vista.   Here is what I have so far: USB External Drive connected to my AirPort Extreme which is connected to my Century Link modem/router. I have installed the USB drive us

  • Multiple layers for possible different final images= how do I save each final pic & not lose layers

    I have layers for different possible end picture effects. eg text in different colors some of it on slopes etc.  I would like to send the client a few different choices without having to flatten or "merg visible" layers.  If I do that then I loose th

  • Upgraded KDE, Now Doesn't Start

    I have just done a pacman --sync kde and upgraded KDE to current. Now it won't start! When I kick off KDE via the startkde command, I get a small popup window that says Could not start KDEINIT - check your installation Has anyone run into this before

  • IPhone Will Not Sync 'Events' from iPhoto

    My iPhone 3G will only load 'albums' from iPhoto, but not 'events'. I prefer to manage my photos using events, how do i ensure that when i load photos into my iPhone, that they are loaded as events. Currently, the only way i can access new photos is

  • Idoc Invoice

    Hi expert! I need an IDOC to create automatically an invoice on my system when I do "Post Goods Issue" from VL02N transaction. My System ---> "Post Goods Issue" from VL02N --->Idoc - > My System ---> Invoice Creation. What IDOC I have to use? Thanks