Query - link between AR SO and AR INV

Hi Support
Need some assistacne wrting a query.  Basically I need to report on AR Sales Orders completed, having a delivery date date range "from" & "to" parameter & displaying related Target AR Invoice information ie. Document number, date  etc.  I am unsure how or what table it is that links these two document together.  I do not want to display all S/Orders on the once completed havign  a target invoice number.
You help is greatly appreciated.
regards
Kelly

Hi Kelly,
Try this,
SELECT DISTINCT D0.DocNum AS 'Delivery #' ,D0.DocStatus AS 'Status', D0.DocDate, D0.DocDueDate, D0.DocTotal,
I0.DocNum AS 'AR Invoice #' ,I0.DocStatus AS 'Status', I0.DocDate, I0.DocDueDate, I0.DocTotal, I0.PaidToDate
FROM
((ODLN D0 INNER JOIN DLN1 D1 ON D0.DocEntry = D1.DocEntry)
FULL OUTER JOIN (OINV I0 INNER JOIN INV1 I1 ON I0.DocEntry = I1.DocEntry)
ON (I1.BaseType=15 AND D1.DocEntry = I1.BaseEntry AND D1.LineNum=I1.BaseLine))
WHERE
(D1.BaseType=17 AND D1.BaseRef='[%0]') OR (I1.BaseType=17 AND I1.BaseRef='[%0]')
OR (I1.BaseType=15 AND I1.BaseEntry IN (SELECT Distinct DocEntry FROM DLN1 WHERE BaseType=17 AND BaseRef='[%0]'))
OR
SELECT  T0.DocNum as 'SO. No.',
T0.DocDate as 'SO. Date',
T2.DocNum AS 'Del.Doc.No.',
T2.DocDate AS 'Delivery Date',
M.DocNum as 'A/R Invoice No.',
M.DocDate as 'Inv. Date',
M.CardName as 'Vendor Name',
M.NumAtCard as 'Bill No. & Date',
ISNULL(L.ItemCode,'Service Item') as 'Item Code',
L.Dscription,
L.Quantity,
M.DocTotal as 'Total (Rs.)'
FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN ODLN T2 ON T2.DocEntry = T1.TrgetEntry
INNER JOIN DLN1 T3 on T3.DocEntry = T2.Docentry
INNER JOIN OINV M ON M.DocEntry = T3.TrgetEntry
LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
WHERE M.DocDate >= '[%0]' AND M.DocDate <= '[%1]'
GROUP BY
T0.DocNum,T0.DocDate,T2.DocNum,T2.DocDate,M.DocNum,M.DocDate,M.CardName,
M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,
M.DocEntry,M.[DiscSum],M.DocTotal
ORDER BY
T0.DocNum,T0.DocDate,T2.DocNum,T2.DocDate,M.DocNum,M.DocDate,M.CardName,
M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,M.DocEntry,M.[DiscSum],M.DocTotal
Regards,
Madhan.

Similar Messages

  • Link between table BSEG and BSET

    Helo All.
    Can you please tell me what is the link between tables BSEG and BSET in FICO?
    Regards

    Hi
    Please check below thread Ramesh answerd for same query
    Relation between RSEG Table and BSET Table
    Thanks,
    Syf

  • Link between billing document and accounting document number

    Hi Frnds,
    When i receive a partial receipt (of an invoice) from a customer using f-28, i am getting the link between invoice number and accounting document number from a table (BSEG), but when i am receiving the final settlement amount from the customer, i m not getting the link between the inv. no. and accounting document number. Can anyone tell me how can i get the same?
    I have tried table BSAD and BSID.

    Hi,
    I will give you two options.
    1)Goto FBL5n.Enter your customer number and company code.Select All items.
    Execute.
    Search for your billing document number using CTRL+F.Select that line.Click on display.
    Here you will find the reference number and clearing document number also.
    2)Goto VF02.
    Enter your billing document number.Enter.
    Press Shift+F4 or the path is:goto-->Accounting document.
    You will get the accounting document number here.
    3)Goto FB03.Key in the document number.Enter.
    Regards,
    Krishna.

  • Link between f-48 and Miro

    Hi
    I have posted advance payment in f-48
    and Invoice verification also over in MIRO
    Then how we can give link between f-48 and MIRO

    Hi,
    You have posted down payment, so this amount remains in separate recon. a/c with special GL indicator.
    First of all you have to transfer/clear this amount to normal GL account through transaction F-54.
    If you have received full inv. amount as advance, you can clear both Inv & Payment line items.(F-44)
    Otherwise you have to clear these line items when you receive remaining bal. amount of the invoice.
    Rgds
    Murali. N

  • Link between invoice number and accounting document number

    Hi Frnds,
    When i receive a partial receipt (of an invoice) from a customer, i am getting the link between invoice number and accounting document number from a table (BSEG), but when i am receiving the final settlement amount from the customer, i m not getting the link between the inv. no. and accounting document number. Can anyone tell me how can i get the same?

    hi
    try these tcodes
    FBL5N
    FB02
    regards

  • Table for link between Expense receipts and G/L account

    Hello,
    Could you give me the table where we we can see for all "expense receipt" the account of finance (G/L account associated to each expense)
    Thank you in advance

    Hi Tarek,
    Thatu2019s correct what Nandagopal is saying, there is no table where you can see all G/L account associated to each expense.
    However you can see the all your expense type relation to Wage type in view V_T706B4 and then respective wage type relation to symbolic account in view V_T706K.
    Then you can check the link of symbolic account to particular GL account at below IMG Path.
    Financial Accounting / Travel Management / Travel Expenses / Transfer to Accounting
    Please note that the link happens in below manner and we cannot get any direct link between Expense type and GL account.
    Expense Type -> Wage type -> Symbolic Account -> GL Account
    Do let us know for any query.
    Thanks,
    Vaibhav

  • How can i create link between ipad(xcode) and webserver?

    Hi, I'm a new to iPad development and i need help,
    i'm not good with english but i try to explain my question:
    how can i create link between ipad(xcode) and webserver?
    (the webserver ".NET" with driver odbc is connected with DB Oracle)
    so, how can my ipad application access to the Oracle DB?
    Create a webservice (.NET) to be place between iPad and DB, is this correct?
    how can i do it?
    which are libraries to include in the xcode's framework?
    thx

    I think the following URL will be your best answer:
    http://stackoverflow.com/questions/3510468/connecting-iphone-to-an-odbc-database

  • Link between Schedule lines and delivery quantity

    Hi all,
    At the item level in a sales order, can anyone tell me the link between schedule line data and delivered quantity.
    Schedule line data can be found in VBEP and delivery qty can be found in LIPS. But I want the link between the two. For which partcular date in the schedule line item the delivery qty is displayed.
    Thanks in advance.

    Hi Amol and Rahul,
    Actually I dont want the link between sale order and delivery, I want the link between schedule line dates and delivery qty.
    Hope I am clear.
    Thanks in advance.
    Edited by: Rajini R M on Sep 11, 2008 6:12 AM

  • Is there any link between movement types and documents

    hi
    is there any link between sales doc and movement types ?
    is it the only source dependig on schedule line movement type will determined?
    if with out order we are doing delivery how system will determine movement type
    Thanks in advance

    Hi,
    Deliveries that are created without reference to order , contained movement type because to process a delivery you need to have some of the control criteria that are copied from sales document header to delivery document header, as system processes delivery in that way ,that is why you will find default order type is assigned to the delivery document type ie DL. .which helps the delivery document to process without reference to sales document.
    In Addition to above information,
    In VOV4,
    DL+ NORM +   +    -&#61664;DLN
    In VOV5,
    For Itemcatagory DLN+        --&#61664;CN
    From this schedule line category CN,movement type 601 is taken during without reference to order –delivery creation.
    MCM

  • Link Between Service Notification and Sales Order

    Hi All,
    In our business process, we will create sales order from Service Notification and we can see the same in the Document flow. But when i check in the VBFA table, there are no entries. I would like to know how the document flow is updated without updating the VBFA Table or is there any other table gets updated for this flow.
    Please guide me.
    With Regards
    Vinu.N

    Hello Vinu
    For one Sales Order # figures in Notification header table- VIQMEL-VBELN.
    Similarly Notification # figures in Sales Order Header table- VBAK-QMNUM
    That is a solid link right there.
    I Also guess technical objects like Equipment, Serial number also form link between the Sales and Service Documents.
    Also check out the logic in document flow program RIBELF20, may be it will give you the clues to the problem.
    Hope this helps.

  • Link between process order and sales order for planning strategy 52

    Hello,
    I investigate the possibility of a link between "sales order" and "planned order / process order" for the usage of planning strategy 52 (planning w/o final assembly, make to stock).
    I know, this is not conform to the basics of planning strategies (EITHER make to order OR make to stock) and I suspect it would be a modification. Of course we have the alternative "make to order" - strategy 50, but we do not want to use individual customer stocks.
    Is anybody there with similar customer requirements or project experiences?
    Thanks in advance,
    Joerg
    Message was edited by:
            Jörg Demtschuk

    Hi Jorg,
    To my understanding if you need hard pegging then in SAP only Individual requirement is possible.
    Or else you need to create a custom transactions/table to identify Sale order and when ever a process order is created by selecting the sale order record, the process order detials should also get updated against that.
    You need to take the help of ABAP expert for this,
    Regards,
    Prasobh
    Reward points if this was useful

  • Link between Credit Memo and Dispute Case

    Hi,
    Please help me. How to Link between Credit Memo and Dispute Case
    Thaks,
    Vinod.

    Linking a credit note has nothing to do with EHP4 or 5. You have to do a config sertting:
    Dispute Management-Process Integration with Accounts Receivable Accounting-Assignment of Open Credits and Payments-Activate Assignment of Open Credits and Payments
    And make sure the business adapts the correct process:  When you reverse a charge on a debit invoice you have to make sure the credit is properly linked to the debit note.
    If this is the case then the credit will show up in the dispute case.
    Rgds,
    Richard

  • Link between Purchase order and Attachment list

    Hi All,
    I got a requirement like Purchase orders are from moved from one system to another system.There was a bug in BDC program
    so some Attachment list of the purchase orders are not moved properly to the another system.
                                                   Now my client want a report to generate the Purchase orders which is having attachment list.
    I did not find any table link between Purcahase order and Attachment list.
                                                  So Plz provide me the link between purchase order and attachment list.
    Thanks,
    Ram

    You mean service for object services?
    if yes then u have to create one custom report for Generic Object Services   ( like notes , attachment  , url )

  • Link between EKKO, EKPO and KONP

    Hi,
    can someone help me out to trace the link between EKKO, EKPO and KONP tables?
    regards,
    ravi.

    Hi Ravi
      KONP is conditions table.
      If we need the conditions(prices) of a purchase order, we can get it from EKKO, EKPO & KONV.
      1. Extract KNUMV from EKKO.
      2. Using EKKO-KNUMV - Extract conditions from KONV where KONV-KNUMV = EKKO-KNUMV.
      3. We can find item prices where KONV-KPOSN = EKPO-EBELP.
      Hope this helps you.
    Kind Regards
    Eswar

  • DB link between Oracle 9i and MS SQL server2000

    Hi,
    Is it possible to create a DB link between Oracle 9i and MS SQL server 2000.
    If it is possible what are the different ways of creating it.
    Is it possible without purchasing any propietery drivers.
    Thanks,
    Rohit

    I've never seen any documents stating that the enterprise edition is a requirement for the heterogeneous connectivity ....
    There are 2 ways to set up the connection with MS SQL - using generic connectivity driver (OLE DB or ODBC) or using the Oracle Transparent Gateway.
    The generic connectivity is free and comes with Oracle DB - it has several limitations - for example you can't call MS SQL stored procedures from Oracle.
    The Oracle Transparent Gateways are packaged , the MS SQL gateway is part of the Open System Gateways package ($15,000.00 per CPU license cost) and i has less restrictions.
    Overview:
    http://www.oracle.com/technology/products/oracle9i/datasheets/gateways/gateway_rel2_ds.html
    http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96544/toc.htm
    Chapter 4 - the Oracle Transparent Gateway
    Chapter 7 - the free Generic connectivity.
    Mike

Maybe you are looking for