Query for fully payment made against invoice

Dear,
We have requirement to find out those invoices which payment has not been fully made. Here I mentioned query, please verify either is correct or need to add any other criteria.
Select * from ap_invoices_all where invoice_amount <> amount_paid
--thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Hello.
You can achieve the same result by running the Accounts Payable Trial Balance.
Octavio

Similar Messages

  • Query for Daily Payment Records against Multiple Payment Means

    Hi Experts,
    I've got this query to show daily payment details which related today's invoice only, however, if there are multiple payment means which linked to one invoice then it just shows last payment record only. Let say, Invoice no. 1 paid by three cheques and query shows last row of cheque amount only. Is it possible to shows multiple payment means against one invoice as well?
    Thanks in advance for any help.
    SELECT DISTINCT
    T0.DocDate as 'Posting Date',
    T0.DocNum as 'AR Invoice Number',
    T0.CardName,
    T1.DocDate as 'Payment Date',
    T1.DocNum as 'Incoming Payment Number ',
    T0.DocTotal as 'AR Invoice Total',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T0.DocTotal
    WHEN T1.TrsfrSum > 0 THEN T0.DocTotal - T0.PaidToDate
    WHEN T1.CashSum > 0 THEN T0.DocTotal - T0.PaidToDate
    WHEN T1.CreditSum > 0 THEN T0.DocTotal - T0.PaidToDate
    WHEN T1.CheckSum > 0 THEN T0.DocTotal - T0.PaidToDate
    ELSE T0.DocTotal
    END AS 'AR Sum',
    CASE
    WHEN T0.ObjType = 13 THEN 'ARIV'
    WHEN T0.ObjType = 14 THEN 'ARCR'
    ELSE 'N/A'
    END AS 'Doc Type',
    CASE
    WHEN T1.Series = 12 THEN 'IPAY'
    WHEN T1.Series = 15 THEN 'OPAY'
    ELSE 'N/A'
    END AS 'Doc Series',
    T0.ObjType,
    T1.Series,
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.TrsfrSum - T1.TrsfrSum
    WHEN T1.CheckSum > 0 THEN '0'
    WHEN T1.CashSum > 0 THEN '0'
    WHEN T1.CreditSum > 0 THEN '0'
    WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'TrsfrSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.CashSum - T1.CashSum
    WHEN T1.CheckSum > 0 THEN '0'
    WHEN T1.TrsfrSum > 0 THEN '0'
    WHEN T1.CreditSum > 0 THEN '0'
    WHEN T1.CashSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'CashSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.CheckSum - T1.CheckSum
    WHEN T1.CashSum > 0 THEN '0'
    WHEN T1.TrsfrSum > 0 THEN '0'
    WHEN T1.CreditSum > 0 THEN '0'
    WHEN T1.CheckSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'CheckSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.CreditSum - T1.CreditSum
    WHEN T1.CashSum > 0 THEN '0'
    WHEN T1.TrsfrSum > 0 THEN '0'
    WHEN T1.CheckSum > 0 THEN '0'
    WHEN T1.CreditSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'CreditSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.TrsfrSum - T1.TrsfrSum
    WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T1.TrsfrSum
    END  'Paid To Date',
    T1.JrnlMemo
    FROM OINV T0
    LEFT JOIN ORCT T1 ON T0.ReceiptNum = T1.DocEntry
    LEFT JOIN RCT2 T2 ON T1.DocNum = T2.DocNum AND T0.DocEntry = T2.DocEntry
    Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
    WHERE DateDiff(D,T0.DocDate,GetDate())=0
    ORDER BY T0.DocDate, T1.DocDate, 'CreditSum', 'CheckSum', 'CashSum', 'TrsfrSum', 'AR Sum'
    Edited by: Won Gyu (Gerald) Lee on Feb 22, 2012 7:15 AM
    Edited by: Won Gyu (Gerald) Lee on Feb 22, 2012 7:15 AM
    Edited by: Won Gyu (Gerald) Lee on Feb 22, 2012 7:17 AM

    Hi Gordon,
    Thanks for reply and I've got your book which is being very helpful.
    I tried and it seems to shows multiple payment list, however, there are all same value in 'CashSum', 'CheckSum', 'CreditSum', 'TrsfrSum' columns.
    For example, if invoice link with one payment mean (cash:$10.00) then it shows like this.
    'CashSum', 'CheckSum', 'CreditSum', 'TrsfrSum'
            10.00                   10.00             10.00          10.00
    SELECT DISTINCT
    T0.DocDate as 'Posting Date',
    T0.DocNum as 'AR Invoice Number',
    T0.CardName,
    T1.DocDate as 'Payment Date',
    T1.DocNum as 'Incoming Payment Number ',
    T0.DocTotal as 'AR Invoice Total',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T0.DocTotal
    WHEN T1.TrsfrSum > 0 THEN T0.DocTotal - T0.PaidToDate
    WHEN T1.CashSum > 0 THEN T0.DocTotal - T0.PaidToDate
    WHEN T1.CreditSum > 0 THEN T0.DocTotal - T0.PaidToDate
    WHEN T1.CheckSum > 0 THEN T0.DocTotal - T0.PaidToDate
    ELSE T0.DocTotal
    END AS 'AR Sum',
    CASE
    WHEN T0.ObjType = 13 THEN 'ARIV'
    WHEN T0.ObjType = 14 THEN 'ARCR'
    ELSE 'N/A'
    END AS 'Doc Type',
    CASE
    WHEN T1.Series = 12 THEN 'IPAY'
    WHEN T1.Series = 15 THEN 'OPAY'
    ELSE 'N/A'
    END AS 'Doc Series',
    T0.ObjType,
    T1.Series,
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.TrsfrSum - T1.TrsfrSum
    WHEN T1.CheckSum > 0 THEN '0'
    WHEN T1.CashSum > 0 THEN '0'
    WHEN T1.CreditSum > 0 THEN '0'
    WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'TrsfrSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.CashSum - T1.CashSum
    WHEN T1.CheckSum > 0 THEN '0'
    WHEN T1.TrsfrSum > 0 THEN '0'
    WHEN T1.CreditSum > 0 THEN '0'
    WHEN T1.CashSum > T0.DocTotal THEN T2.SumApplied
    ELSE T2.SumApplied
    END AS 'CashSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.CheckSum - T1.CheckSum
    WHEN T1.CashSum > 0 THEN '0'
    WHEN T1.TrsfrSum > 0 THEN '0'
    WHEN T1.CreditSum > 0 THEN '0'
    WHEN T1.CheckSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'CheckSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.CreditSum - T1.CreditSum
    WHEN T1.CashSum > 0 THEN '0'
    WHEN T1.TrsfrSum > 0 THEN '0'
    WHEN T1.CheckSum > 0 THEN '0'
    WHEN T1.CreditSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T2.SumApplied
    END AS 'CreditSum',
    CASE
    WHEN T1.JrnlMemo = 'Cancelled' THEN T1.TrsfrSum - T1.TrsfrSum
    WHEN T1.TrsfrSum > T0.DocTotal THEN T0.PaidToDate
    ELSE T1.TrsfrSum
    END  'Paid To Date',
    T1.JrnlMemo
    FROM OINV T0
    LEFT JOIN ORCT T1 ON T0.DocNum = T1.DocNum
    LEFT JOIN RCT2 T2 ON T0.DocEntry = T2.DocEntry
    Left Join OSLP T3 ON T3.SlpCode= T0.SlpCode
    WHERE T0.DocDate = [%0]
    ORDER BY T0.DocDate, T1.DocDate, 'CreditSum', 'CheckSum', 'CashSum', 'TrsfrSum', 'AR Sum'

  • Query for Vendor Payment in SAP

    Hello All,
    I am a sap abap developer with little knowledge in SAP MM and SAP FI modules.
    As per some requirement of my company ,i have created a PO then its GR and finally IR.
    Now when i checked EKBE table (History per Purchasing Document) , i found two record in this table out of which one with
    VGABE = 1 (Good Receipt) & another with  VGABE = 2 (Invoice Receipt) .
    Now my requirement is ,i want a entry in this table with VGABE = 5 (Payment) but i don't know how to do payment of vendor in sap so that this table will populate with a entry for payment type.
    Please help me and let me know what will be the flow with tcodes to do the vendor payment in sap.
    Please reply ASAP.
    Thanks in advance.
    Regards.
    Abhinav Goel.

    Hello Mr.Raman,
    Thanks for your response to my query.
    As per my company requirement i have to track duplicate payment made to the vendor against same PO.
    So for that after completing the cycle PR-PO-GR-IR-F-53 finally i found two records in BSAK table out of which :
    One record was  with my accounting document no from my invoice receipt of type RE.
    Another record was with the vendor payment clearance document with type KZ.
    Now again i have done payment to the vendor using F-53 tcode and now i found one more record with belnr = last payment document no and augbl = new payment document no. with type KZ.
    So if i use below mentioned logic to track for duplicate payments made to the vendor ,then it will be fine or if not can you suggests me the needful changes in the logic.
    1.) Check If record exists for my belnr no from invoice recipt in bsak.
    2.) Take AUGBL No for this BELNR No and check if record exists for this AUGBL with type KZ.
    Note:Means payment is done to the vendor upto this logic.
    3.) Now if with the found record with type KZ any other record found with type KZ it can be taken of as duplicate payment made to the vendor.
    Please suggest me if above mentioned logic is fine.
    Regards.
    Abhinav Goel.

  • Public API/Interface name to import the payment information against invoice

    Hi,
    I want to get the Oracle supported Public API/Interface name to import the payment information against invoices(because there is a need to importing payment data against closed invoices from 11.5.5 to R12). Since I am not getting any standard oracle supported method, I am using the API AP_PAY_INVOICE_PKG.AP_PAY_INVOICE but while running it I am getting the following error:-
    Payment API Error =ORA-20001: APP-SQLAP-10000: ORA-28115: policy with check option violation
    occurred in
    AP_AIP_TABLE_HANDLER_PKG.Insert_Row <-AP_PAY_INVOICE_PKG.ap_pay_insert_invoice_payments<-AP_PAY_INVOICE_PKG.ap_pay_invoice<-.
    Regards,

    The below query will meet your requirement, but payment amount won't matches with some cases see below .
    1) Check Payment/EFT Payment for more than one invoice we will pay that time invoice amount is
    not equal to payment amount, Payment amount is greater than Invoice Amount.  This will be controlled in Report level.
    if you develop report using this query, there you can control this issue.
    SELECT aia.vendor_id, aps.vendor_name, aia.invoice_id, aia.invoice_num,
           aia.invoice_date, aia.invoice_currency_code, aia.payment_currency_code,
           aia.invoice_amount, aia.amount_paid, aia.payment_method_lookup_code,
           aia.payment_method_code, aia.SOURCE, aia.invoice_type_lookup_code,
           aia.voucher_num, aca.amount payment, aca.bank_account_name,
           aca.check_id, aca.check_number, aca.currency_code,
           aca.payment_method_lookup_code, aipa.accrual_posted_flag,
           aipa.cash_posted_flag, aipa.posted_flag
      FROM ap_invoices_all aia,
           ap_checks_all aca,
           ap_invoice_payments_all aipa,
           ap_suppliers aps
    WHERE aia.invoice_id = aipa.invoice_id
       AND aca.check_id = aipa.check_id
       AND aia.vendor_id = aps.vendor_id
    if it's meet your requirement pls check the Correct/Helpful Answer for your question.
    you can modify this query here and there as per your required fields.
    Thanks
    Hari

  • Missing Functionality - Reconciling payment made against downpayment requst

    Hi All,
    I have the following scenario as supplied by the support team for downpayment requests:
    1. Create downpayment request.
    2. Create outgoing payment based on downpayment request.
    3. Process AP invoice.
    When i attempt to reconcile the payment to the transaction, i get an error stating that "payments made against against a downpayment request cannot be reconciled here"
    I am currently on SAP Business One Version : 2007, SP 00, Patch 35.
    I have attempted this on patch 39 with no resolve.
    Regards,
    Kiran

    Hi Amol,
    I recommend you to create Journal Entry for reconcile after input AR Invoice.
    For example;
    1) Input AR Downpayment Request
    no Journel Entry
    2) Input Incoming payment
    Cash $100 / Advance AR $100
    3) Input AR Invoice
    AR $100 / Sales Revenue $100
    4) Input Journal Entry <== you need it
    Advance AR $100 / AR $100
    5) Reconciliation
    for each Advance AR account, AR account
    I hope above sample helps you...
    Thanks,
    Kaori

  • FI user is unable to track these payments made against the PO unless he maintains a manual reference

    Dear Experts,
    I have a requirement as below -
    Usually when a Purchase Officer makes a Downpayment request in F-47, and the Finance user posts the downpayment using F-48, the transaction is visible in the PO History.
    But if the payment is not a down-payment and if the payment is actually an outgoing payment (sometimes partial payments) posted using F-53, the transaction is not available in PO history..
    That is to say that the FI user is unable to track these payments made against the PO unless he maintains a manual reference.
    Can you please suggest the dataflow for this so that these transactions are visible in the PO history and if we need to make any changes in order to achieve the link between the payment and the PO.
    Kindly share your valuable ideas how we can achieve this requirement.

    Hi Rahul,
    PO history never update, if DP not made against PO. Normal payments always with respect to Invoices not PO number's. It may possible one invoice posted agaisnt several PO's also. Technically there is no feasible to update normal payments in PO history. You may go for one single report where you can get PO wise payment details. Simple Z report can help you.
    Use mentioned FI tables to develop the same.
    1. RSEG table to get Invoice Number & PO number's
    2. BKPF table to get FI document ,Year with above invoice number ( AWKEY in BKPF table)
    3. BSAK table to get payment details along with payment document (Clearing document)
    4. BSIK table to get partial payment details and DP details.
    Please note no standard report available
    Regards
    Mani

  • WH Tax - Down payment clearing against invoice

    Dear Experts,
    This is regarding the down payment clearing against invoice where WH tax is involved in Down payment as well as in Vendor Invoice. we also deduct Work Contract Tax Z1 on vendor invoice.
    the process is as follows :
    Step 1 - Down payment to Vendor through TC # F-48
    Entry : Vendor A/c Dr 2200.00
    To Bank 2178
    To TDS 22.00 @ 1%
    Step 2 - Vendor Invoice Booking through TC # FB60
    Entry : Expenses Dr 4400.00
    To Vendor 4180
    To TDS 44.00 @ 1%
    To WCT 176.00 @ 1%
    Clearing down payment against the invoice posted using FB60.
    Step 3 - Down payment Clearing through TC # F-54
    Entry : Vendor Dr 1980.00
    To Vendor 2200.00
    To TDS 44.00
    To WCT 176
    But in this process, it clearing WCT tax code also which i dont want in this. And if i adjust amount and do not clear whole amount available amount then after simulating it showing difference coming and debit and credit amount of line items.
    But if i dont include WCT tax code in whole process then its working fine no problem coming in it, but want it also to include in clearing process of down payment against invoice.
    Best Regards
    Arun Rai

    Dear,
    i am following the SAP standard process for deducting TDS on down payment and invoices.
    First i deduct the TDS on down payment and Then again full TDS amount on invoice not adjusted it in WHT tab in base amount after adjusting Advance payment.
    in next process f-54 i cleared the advance payment against invoice so it reverse the invoice TDS amount to adjust the tds as per advance payment TDS.
    In img i confiured the WHT for payment posting as by selecting "Central inv. prop." option in Central invoice option.
    Regards
    Arun Rai

  • Internal Reconc. against Incoming payment made against down payment request

    Internal Reconc. against Incoming payment made against down payment request
    Dear Experts,
    Scenario: An incoming payment made against down payment request and create an A/R invoice when i try to reconcile both of them using Internal Reconciliation. It gives an Error: "Payment tranaction applied to down payment requests cannot be reconciled here".
    Can somebody please guide me, how can I reconcile both the documents mentioned above. (i.e. incoming payment made against down payment request and AR invoice).
    Thanks & Regards,

    Hi,
    You cannot reconcile the Incoming Payment and the AR Downpayment Request in the Internal Reconciliation window.
    AR Downpayment needs to be paid through the Payment window.
    There is a Note as well explaining the working. Note No. :1121093.
    Kind Regards,
    Jitin
    SAP Business One Forum Team
    Edited by: Jitin Chawla on Dec 7, 2011 2:15 PM

  • Payment made against the PO's

    Dear All,
    Our Client want a report in which what are all the payments made against the Purchase orders.
    Is there any std report available?
    Please advice what to do if std report not available.
    Regards

    Dear friend,
    you can use ME2M standard report, by selecting the scope list ALV it will give the clear picture about what are the pos created
    if this report will not satisfy your requirement at the time use the following  tables like EKKO, EKPO, eket, ekbe, and genrate the report
    Regards
    Pramod

  • Query for Incoming Payments

    Hi Guys,
    I written a query for incoming payments  for some particular account heads and i have tried this.
    But did not achieved the  desired result.
    Anybody please modify the query.
    SELECT T1.[DocNum], T0.DocNum,  T0.AcctCode, T0.SumApplied,  T0.AcctName ,
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='355102'),
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='211417'),
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='355103'),
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='211436')
    FROM RCT4 T0 
    Left outer  JOIN ORCT T1 ON T0.DocNum = T1.DocEntry INNER JOIN NNM1 T2 ON T1.Series = T2.Series
    WHERE T2.[SeriesName] ='Spares' and t1.docdate between [%0] and [%1]
    Regards,
    Vamsi

    Hi Vamsi,
    Try this:
    SELECT T1.DocNum, T0.DocNum,
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='355102') AS '355102',
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='211417') AS '211417',
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='355103') AS '355103',
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='211436') AS '211436'
    FROM RCT4 T0
    INNER JOIN ORCT T1 ON T0.docnum = T1.DocEntry
    INNER JOIN NNM1 T2 ON T1.Series = T2.Series
    WHERE T2.SeriesName ='Spares' and t1.docdate between [%0\] and [%1\]
    Thanks,
    Gordon

  • An global maximum amount limit for single payments made via the ACH

    Hi
    Can any one guide how to config the gobal maximum amount limit for a single payments made via the ACH  (Automated Clearing House) network.
    Pl do the needful.
    thank you.

    Hi Tony,
    Not exactly the solution, but going forward you can try split the invoices and process it separately at the time of invoicing itself. Otherwise you can try the option installment payment terms, but there may be at least one day difference in payment.
    Warm regards,
    Murukan Arunachalam

  • Payment made against cost booked in costcenter

    We assign the costcenter for expenses,is there any report we can know in Costcenter accounting ,the payment made for these expenses posted to costcenter.

    Hello
    If document splitting proper customization is there then  the payment line item will pick the same profit center .
    If it is not so , then you have to track it through the GL only.
    Thanks
    alok

  • Query for details of  Sale order , Invoice and COGS

    I Need the report cointing following based on month & Business partner
    Sale order, Sale Amount, Due date, Invoice Amount, Last Invoice date, COGS amount

    Hi Anantha,
    Please check below link and modify according to your requirement.
    Sales Order Query for  in SAP B1
    Query - Sales Orders linked to Deliveries
    My Top SQL Queries for SAP Business One
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Approval Query for Outgoing Payment

    Hi All Experts,
    I have to Create Approval for Outgoing Payment where payment means is Cash,Cheque or Bank Transfer but not Credit Card.
    In other words approval should be raised for all payment means other than Credit card payment means.
    For which I have Created Query as follows
    select Distinct 'true' FROM dbo.OVPM T0
    Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
    WHERE  T0.CreditSum=0 And T1.CreditAcct is null
    payments goes for approval but Credit Card payment also goes for Approval which is not required.
    Please Help me to Correct the Query.
    Regards,
    Gayatri Shukla.

    Hi,
    Little modification to your query. Try this.
    select Distinct 'true' FROM dbo.OVPM T0
    Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
    WHERE  T0.CreditSum = 0
    Regards,
    Amrut Sabnis.

  • Query for allowed payment methods of BP

    Hi there,
    i would like to make a query where i get all allowed paymentmethods of a BP. Unfortunatly i do not know in which table i can find this information. The query for checking the standard paymentmethod is quite easy but i do not know in which table i get the information of the allowed (checked) paymentmethods.
    thx for your help.
    best regards
    Manuel

    Another question: is there an easy way to update all BP (so that it is allowed) with a paymentmethod without using DTW?
    If I try it with an update query i think it is not the right way because it is not really an update of an existing record it's adding a new allowed paymentmethod.
    br
    Manuel

Maybe you are looking for