Incoming Payment detail query include CM

Hi Gurus,
I'm new to SAP B1 and I'm stuck to create query for following requirement.
u2022     Report to show daily payments and outstanding invoices by different payment methods (example below). The purpose of this report is to check sales made during the day and payments u2013 received for those sales
Incoming Payment No.     Outstanding     Paid      Cheque     Bank Transfer       Credit Card     Cash.
                12001                   0             100         100                 
                12002                   0                200                        200     
                12003                300               0                       
                12004                     0                400                                                400
                12005                    500                0                       
Current query is following.
SELECT
T0.[DocDate],
T0.[DocNum] AS 'Incoming Payment No.',
T0.[CardName] AS 'Customer Name',
T0.[TrsfrSum],
T0.[CashSum],
T0.[CheckSum],
T0.[CreditSum],
T0.[DocTotal]
FROM ORCT T0
WHERE T0.[DocDate] >=[%0] AND  T0.[DocDate] <=[%1]
I want to link sales invoice no. for each rows and show credit amount history as well as sales invoice.
Anyone could help this?
Thanks,
Gerald

Thanks Gordon,
However, I have error message like 'The milti-part identifier "T2.DocEntry, T2.SumApplied and etc' could not be bound.
I found your previous post at Query to include payment status cash / cheque for payment received.
Now, I updated query followings.
SELECT
T0.DocDate as 'Posting Date',
T0.DocNum as 'AR Invoice Number',
T1.CardName,
T1.DocDate as 'Payment Date',
T1.DocNum as 'Incoming Payment Number ',
T0.DocTotal as 'AR Invoice Total',
T1.TrsfrSum,
T1.CashSum,
T1.CreditSum,
T1.CheckSum,
T2.CheckNum as 'Cheque Number'
FROM OINV T0
INNER JOIN ORCT T1 ON T0.ReceiptNum = T1.DocEntry
LEFT JOIN RCT1 T2 ON T1.DocNum = T2.DocNum
Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
where T0.DocDate >=[%0] and T0.DocDate <=[%1]
I need one more column for AR Invoice Amount which payment has not been received'
Could you help me this out?
Thanks

Similar Messages

  • Query report for details of incoming payment received based on invoice

    Hi expert
    Can any one Improve this query !!!
    SELECT T0.DocNum as 'AR Invoice Number',T0.DocDate as 'Posting Date', T1.CardCode, T1.CardName,  
    T0.DocTotal as 'AR Invoice Total',T0.VatSum as Tax,T1.CashSum, T1.TrsfrSum, T2.DocNum as 'Incoming Payment Number ', T2.DueDate as 'Check Due Date' ,
    T2.CheckNum as 'Check Number', T2.CheckSum as 'Amount'
    FROM OINV T0 INNER JOIN ORCT T1 ON T0.ReceiptNum= T1.DocEntry Left JOIN RCT1 T2 ON T1.DocNum = T2.DocNum ;  
    where T0.DocDate >=[%0] and T0.DocDate <=[%1]
    For one particular invoice no 88  Amount INR 1345  the customer paid  two cheques of amount INR 1000 ( Incomining payment no 21) dated 10/10/2009 and INR 345( Incoming payment no 25)  dated 12/10/2009.
    But My problem is this query showing only last one that is amount INR 345 of incoming payment no 25 of date 12/10/2009
    Regards
    Arun K Singh

    Hi Arun,
    Couple of things
    RCT2 is the table which has links to the Invoices associated with a incoming payment, so you need to include that.  Also the relation is between OINV and RCT2..so check this query
    NOTE: You date range for selection in the WHERE statment is Invoice Date.  You should consider using T1.DocDate which will be receipt rate. 
    The SQL below is just to show you the relationship between the tables.  Based on the results requirement you will need to work with your JOINS
    SELECT T0.DocNum as 'AR Invoice Number',T0.DocDate as 'Posting Date', T1.CardCode, T1.CardName,
    T0.DocTotal as 'AR Invoice Total',T0.VatSum as Tax,T1.CashSum, T1.TrsfrSum, T2.DocNum as 'Incoming Payment Number ', T2.DueDate as 'Check Due Date' ,
    T2.CheckNum as 'Check Number', T2.CheckSum as 'Amount'
    FROM [dbo].[ORCT] T1
    INNER JOIN [dbo].[RCT1] T2 ON T2.DocNum = T1.DocNum
    INNER JOIN [dbo].[RCT2] T3 ON T3.DocNum = T1.DocNum
    INNER JOIN [dbo].[OINV] T0 ON T0.DocEntry = T3.DocEntry
    WHERE T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]'
    Suda

  • Invoice details in Incoming Payment

    Dear All,
    we are making incoming payment against invoice. In Pld for incoming payments i want details of invoice (Invoice Number and Invoice Amount) against which receipt entry is made.
    Ex:
    Account Code...........Account Name......................................................Amount
    A0001.....................ABC
    ..............................Invoice Number 12..................................................1000  
    .....................................................13..................................................1500
    and so on ...
    I have tried in PLD but not able to get the OINV table in PLD. Is there any other option to get this details.
    Swapnil
    Edited by: SWAPNIL PATIL on Mar 20, 2009 9:50 AM

    Dear Friend,
    Which query u sended that working fine for Incomeing Payments. But ih this ur matching
    T1.DocEntry = T2.DocEntry. Means suppose in Income Payment entry there is no Invoice entry then it is not showing. But i want to show that entry also. Please refer the following formatt.
    SELECT T0.DocNum, T0.DocDate, T0.CardCode,T2.DocNum,   T1.SumApplied FROM [dbo].[ORCT]  T0 INNER JOIN RCT2 T1 ON T0.DocNum = T1.DocNum INNER JOIN OINV T2 ON T1.DocEntry = T2.DocEntry
    Formatt:
    Account Code...........Account Name......................................................Amount
    A0001.....................ABC
    ..............................Invoice Number 12..................................................1000
    .....................................................13..................................................1500
    and so on ...
    .................................................................................Total...................2500
    In that suppose Invoice not available in that then Total is not showing. But i want to show Total for Incomeing Payment. Can u plz tell me how to solve that proble.
    Swapnil

  • Include the Journal entry created in Incoming Payments PLD

    Hello Experts!!!
    Is there a way to include the journal entry created in the Incoming Payments PLD?

    hi jennifer,
    You can create query print layout designer report using query.
    SELECT
    T0.TransId, T0.BaseRef, T0.RefDate,
    T1.Account, T1.ShortName, T2.AcctName,
    T1.Debit, T1.Credit
    FROM OJDT T0  INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId and
    T1.TransType = 24 INNER JOIN OACT T2 ON T1.Account = T2.AcctCode
    WHERE
    T0.BaseRef = '[%0]' or  T0.RefDate = '[%1]'
    Jeyakanthan

  • Pending Incoming Payments Query

    I'm new in this Forum.
    My problem is to get the same information from "Banking -> Incoming Payments -> Incoming Payments (Documents for Payment)" in a query.
    I tried to know these tables through "Debug Information" but in these case I couldn't obtain them.
    Does anyone know which tables I need to retrieve these information from?
    Any reply will be welcome. Thanks a lot.

    Hi Josep,
    I think the table you are after is RCT2. The table structure for Incoming Payments is as follows:
    ORCT - Incoming Payment (header)
    RCT1 - Checks
    RCT2 - Invoices
    RCT3 - Credit Vouchers
    RCT4 - Account List
    RCT5 - Receipt VAT adjustment
    RCT6 - Withholding Tax
    RCT7 - Document Tax Amount
    If you have access to the SDK then this includes the database schema amongst the help files (in later versions of the SDK this can accessed through the SDK Help Center).
    Hope this helps,
    Owen

  • Query: Incoming Payments

    Hi all,
    I came up with the query below to capture details of Incoming payments as well as give out the names of the users who posted them into SAP. I linked OUSR with OINV hence it gives out the users' names only where the payment is linked to an Invoice. I would like the user name to appear even for payments on account. Kindly assist on the best way of achieving this.
    SELECT
    T1.DocNum Doc,
    T4.[U_NAME] name,
    T1.CardCode code,
    T1.CardName Customer,
    T1.TrsfrSum Transfer,
    T1.CashSum Cash,
    T1.CheckSum Chck,
    T1.CreditSum Credit,
    sum(T1.TrsfrSum + T1.CashSum + T1.CheckSum + T1.CreditSum) Total
    from ORCT T1
    left JOIN RCT1 T2 ON T1.DocNum = T2.DocNum
    left outer join oinv t3 on t1.DocEntry=T3.ReceiptNum
    left outer join ousr t4 on t3.usersign=t4.userid
    WHERE (T1.DocDate>='[%0]' And T1.DocDate<='[%1]')
    group by
    T1.DocNum,
    T1.CardCode,
    T1.CardName,
    T1.TrsfrSum,
    T1.CashSum,
    T1.CheckSum,
    T1.CreditSum,
    T4.[U_NAME]
    Thank you in advance.
    Rgds,
    Henry

    Hi Henry,
    Welcome you post on the forum.
    Try:
    SELECT
    T1.DocNum Doc,
    T4.U_NAME name,
    T1.CardCode code,
    T1.CardName Customer,
    T1.TrsfrSum Transfer,
    T1.CashSum Cash,
    T1.CheckSum Chck,
    T1.CreditSum Credit,
    sum(T1.TrsfrSum + T1.CashSum + T1.CheckSum + T1.CreditSum) Total
    from ORCT T1
    left JOIN RCT1 T2 ON T1.DocNum = T2.DocNum
    left outer join oinv t3 on t1.DocEntry=T3.ReceiptNum
    left outer join ousr t4 on t1.usersign=t4.userid
    WHERE T1.DocDate>='[%0\]' And T1.DocDate<='[%1\]'
    group by
    T1.DocNum,
    T1.CardCode,
    T1.CardName,
    T1.TrsfrSum,
    T1.CashSum,
    T1.CheckSum,
    T1.CreditSum,
    T4.U_NAME
    Thanks,
    Gordon

  • Incoming payment rows details in Crystal report

    Hi Xperts
    I want to create Payment Advice print layout in Crystal Report.  Can anybody tell me which table is related Incoming payment Row wise details in SAP.
    I need following Details in SAP (Row Details)
    Document No,  Document Date, Document Total
    Any body help me out regarding this
    Thanks
    Balaji

    Hi Balaji,
    Check this link.
    [Crystal Generic samples from SAP|https://websmp204.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000635012009E&]
    It consists of most of all the documents in SAP.
    Hope this helps.
    Regards,
    Bala

  • Query Print Layout - Incoming Payment

    Hi All,
    I have done the query print layout for incoming payment. but it cannot show the correct A/R invoice: document number. When I only make the payment for 1 invoice it seems to be correct, but when I choose 2 invoices to be paid, then the A/R invoice: document number for the second row is wrong ( if follows the first row).
    Below is the query:
    SELECT T0.DocNum, T0.DocDate, T0.DocCur, T0.DocTotal,
    T0.DocTotalFC, T1.DocNum, T1.CardCode, T1.CardName,
    T1.DocDate, T1.Comments,T1.TrsfrRef as 'Cheque No',
    T2.BankCode' 'T2.AcctNum as 'Bank Code' , T0.Address , T3.Phone1 , T3.CntctPrsn , T0.PaidToDate, T0.PaidFc , T4.AppliedSys , T4.AppliedFc
    FROM [dbo].[OINV]  T0 INNER JOIN ORCT T1
    ON T0.ReceiptNum = T1.DocEntry LEFT JOIN RCT1 T2
    ON T1.DocNum = T2.DocNum LEFT JOIN RCT2 T4
    ON T4.DocNum = T2.DocNum LEFT JOIN OCRD T3
    ON T1.CardCode = T3.CardCode
    WHERE T1.DocNum = [%0]
    ORDER BY T1.DocNum
    the fields that i want to display in repetitive area are: A/R invoice: Document date , A/R invoice: document number, Amount that they have paid ( partial payment / full payment) i used this database: Incoming payment - a/r invoice: paid, outstanding amount i used formula ( total document - paid to date), and document currency
    Thank you! hope you can help.
    Pauline

    Pauline,
    I've tested your query in B1 2007A SP00 PL30 and works fine. I even created PLD for the query and I can see 2 invoice paid by one incoming payment.
    Rgds,

  • Customer Aging Report Query (without invoices offset by incoming payment)

    Hi All Experts,
    May I know is there any field from JDT1 mention which invoices is already offset by the Incoming payment or AR Credit note? Because I do not want those invoices that already offset by incoming payment appear at the Customer Aging Report. Meaning, the data appear in the Customer Aging Report is only show those invoices that yet to pay by the customer. Kindly give some advise on it. Thanks a lot.
    Thanks and regards,
    Angie Ng

    Hi David,
    Thanks for your suggestion. I have try it, but all of my JDT1.IntrnMatch is in 0 value. Meaning in my situation it is none of any reconcilliation making. But from my SBO window, i manage to see that actually this incoming payment is pay for which invoices. Problem is it is difficult for me to do the possiblity logic that might be happen in my Customer Aging Report Query. Please give some advise that how to show only those invoices yet to pay? The current query will show all the data no matter the invoices or credit memo has been offset.
    select OCRD.cardcode 'Supplier Code',OCRD.cardname 'Name',sysdeb  'Debit GBP',syscred 'Credit GBP',
    case JDT1.transtype
    when '13' then 'INV'
    when '14' then 'AR CN'
    when '24' then 'INCOMING'
    else 'Other'
    end 'Type',
    Ref1,
    fccurrency 'BP Currency',
    CONVERT(VARCHAR(10), refdate, 103)'Posting Date' ,
    CONVERT(VARCHAR(10), duedate, 103) 'Due Date',
    CONVERT(VARCHAR(10), taxdate, 103) 'Doc Date' ,
    CASE
    when (DATEDIFF(dd,refdate,current_timestamp))+1 < 31
    then
    case
    when syscred <> 0 then syscred * - 1
    else sysdeb
    end
    end "0-30 days",
    case when ((datediff(dd,refdate,current_timestamp))+1 > 30
    and (datediff(dd,refdate,current_timestamp))+1< 61)
    then
    case
    when syscred <> 0 then syscred * - 1
    else sysdeb
    end
    end "31 to 60 days",
    case when ((datediff(dd,refdate,current_timestamp))+1 > 60
    and (datediff(dd,refdate,current_timestamp))+1< 91)
    then
    case
    when syscred <> 0 then syscred * - 1
    else sysdeb
    end
    end "61 to 90 days",
    CASE
    when (DATEDIFF(dd,refdate,current_timestamp))+1 > 90
    then
    case
    when syscred= 0 then sysdeb
    when sysdeb= 0 then syscred * - 1
    end
    end "90 + days"
    from JDT1,OCRD where JDT1.shortname = OCRD.cardcode and cardtype = 'c' and intrnmatch = '0'
    ORDER BY OCRD.CARDCODE, taxdate

  • Where should I fill the bank details of customer while getting the incoming payment ?

    Hi all
    Can any one advise me where I can fill the information of customer bank detail while creating incoming payment by Check ?
    User want to update the customer bank detail when we get the check from customer
    Thanks
    Rini

    Hi,
    By bank detail do you mean the Bank Name, Branch and Account? These information can be set in the business master data. In the Payment Terms tab there is a portion about Business Partner Bank.
    There you can add the bank details.
    See this help file for more information:
    http://help.sap.com/saphelp_sbo882/helpdata/en/1d/bbc2e2c0704b308577aabbae3ac25b/content.htm?frameset=/en/44/f3e883c4b80…
    once it is added by the time the payment means is selected the bank detail/s of the customer can be selected.
    hope this helps

  • How to Bring Payment means details in the Incoming payment PLD

    Kindly solve my issue as soon as possible.
    In Incoming payments PLD, i would like to get the details of the payment means - atleast the GL Account name from the Payment means.
    Do kindly hepl me.

    Hi Kesevan,
    If you need to print G/L Account Number from Payment Mean on Incoming Payments.
    Try this,
    ->> Create Database field in Page Header or Footer.
    Check Payment:
    Table -> ORCT
    Column -> CheckAcct
    Cash Payment:
    Table -> ORCT
    Column -> CashAcct
    Save and Run the Print Preview.
    Regards,
    Madhan.

  • Query for A/R payment details

    I would like to query the business one database for all of the payment details (what invoice(s)...) were paid on a specific check.  It would sound something like this:
    I can't seem to find the tables involved.
    select (all detail records where payment applied) where check number = 'X'
    I can find the check number and amount, but can not find how it is linked to invoices and/or credit memos.
    Thanks in advance, Sam

    The tables that may want to query are ORCT, RCT1 and RCT2.
    See the SQL example below
    SELECT T1.[DocNum] AS 'Payment Number', T1.[DocDate] AS 'Payment Date',
    T0.[CheckNum] AS 'Check Number', T0.[CheckSum] AS 'Check Amount',
    T0.[BankCode] AS 'Account No.', T3.[DocNum] AS 'Invoice No', T2.[SumApplied] AS 'Paid to Invoice'
    FROM  [dbo].[RCT1] T0  INNER  JOIN [dbo].[ORCT] T1  ON  T1.[DocNum] = T0.DocNum 
    INNER  JOIN [dbo].[RCT2] T2  ON  T2.[DocNum] = T1.DocNum
    INNER  JOIN [dbo].[OINV] T3 ON T3.DocEntry = T2.DocEntry
    Suda

  • Query for what incoming payments are linked to a/r downpayment invoices

    Dear all,
    Please advice on what query will give me the incoming payments linked to A/R Downpayment invoices in SAP business one 2005 pl 50
    Kind Regards,
    Monil

    Thanks Gordon,
    Please advice on which tables do I refer to?
    Monil

  • Query to view no of incoming payments for invoices.

    HI Experts,
    I want a query to see all the incoming payments(like payment1  and its cancellation and payment2 and its cancellation due to Bounce of cheque and subsequent new cheque, like that) for particular Invoices.
    For Instances.
    Like customer name,code, payment type, due date,cheque amount,check no ,status and such for all payments for the particular Invoice.
    Can anyone help me out in this ground.
    Thanks in advance,
    Regards,
    Dwarak.

    Hi Expert,
    You are almost near to my Requirement.
    Actually my Client Scenario is,
    there are few Customers who will give PDC(Post Dated Cheque) to the Invoice. and that cheque either will be asked to HOLD or Bounce from Bank during maturity.(this is usual with few customers)
    and again he will give new cheque1 and again that new cheque might also be bounced and another new cheque2 will be issued.
    So, here i want to see a quick list , where i can see Related Payment and its status for that Particular Invoice.This will give the related old cheques and its corresponding new Cheque.
    Examples:
    By Giving Invoice NO: 222666(Our Invoice no)
    Its Should List out,
    Customer Code - Customer Name - Payment1(with its due date, status, chq no, chq amount)- if its has payment2(and its due date, status, chq no, chq amount)- its should continue with the N number of payments to that Invoice.  
    Thanks in Advance, -:)
    Regards,
    Dwarak.

  • How to query a list of open Incoming Payment with its Payment Means

    Dear Experts,
    As subjected, can anyone throw some light onto writing a query which list Open Incoming Payment and its total and payment means.
    Much Thanks!
    Warmest Regards,
    Chinho

    Try this one to start:
    SELECT T0.CardCode Customer, T0.CardName 'Customer Name', CASE WHEN T0.CashSum > 0 THEN 'Cash' WHEN T0.CreditSum > 0 THEN 'Credit Card' WHEN T0.TrsfrSum > 0 THEN 'WIRE' ELSE 'Check' END AS 'Method', T0.DocNum, T0.DocDate
    FROM dbo.ORCT T0 
    WHERE DateDiff(DD,T0.DocDate,GetDate())< 31
    Thanks,
    Gordon

Maybe you are looking for