Invoice Payments By Date !

Hi i develop a query to get the Total of payments for every invoice by date and if there is an invoice in certain date without payment obtain the Total as 0, with this:
SELECT T2.[DocEntry] as 'Num Factura', T2.[CardCode] as 'Num Cliente', T3.[CardName], T4.[userID], T4.[U_NAME], T2.[DocTotal], SUM(T1.[SumApplied]) as 'Total a la Fecha'  FROM ORCT T0, RCT2 T1, OINV T2, OCRD T3, OUSR T4  WHERE T0.[DocNum] = T1.[DocNum] AND T1.[DocEntry] = T2.[DocEntry] AND T2.[CardCode] = T3.[CardCode] AND T2.[UserSign] = T4.[userID] AND T0.[DocDate] = '07/03/2007' GROUP BY T2.[DocEntry], T2.[DocTotal], T2.[DocNum], T2.[CardCode], T3.[CardName], T4.[userID], T4.[U_NAME]
But this query bring me just The Total of payments for every invoice, but my doubt is if i can get the invoices without payments in the same query.
I don't know how ... can someone help me please
best regards

This is the end version of my query, with this query gets the payment by invoice, even if the invoice not have a payment in certain date.
/* CREDITO */
SELECT DISTINCT
T0.[PaidSum],T0.[DocStatus],T0.[FolioPref],T0.[FolioNum],T0.[DocDate],T0.[NumAtCard],T0.[CardCode],T0.[CardName],T3.[userID],T3.[U_NAME],
CASE
WHEN
isnull((T0.[DocTotal] -
(SELECT
isnull(SUM(T6.[SumApplied]), '0') FROM ORCT T5, RCT2 T6 WHERE T5.[DocNum] = T6.[DocNum] AND T5.[DocDate] = @FECHA AND T6.[DocEntry] = T0.[DocEntry] AND T5.[Canceled] = 'N' GROUP BY T6.[DocEntry], T5.[CardCode], T5.[DocDate])
), '0') = 0 THEN T0.[DocTotal]
WHEN
isnull((T0.[DocTotal] -
(SELECT
isnull(SUM(T6.[SumApplied]), '0') FROM ORCT T5, RCT2 T6 WHERE T5.[DocNum] = T6.[DocNum] AND T5.[DocDate] = @FECHA AND T6.[DocEntry] = T0.[DocEntry] AND T5.[Canceled] = 'N' GROUP BY T6.[DocEntry], T5.[CardCode], T5.[DocDate])
), '0') > 0 THEN isnull((T0.[DocTotal] -
(SELECT
isnull(SUM(T6.[SumApplied]), '0') FROM ORCT T5, RCT2 T6 WHERE T5.[DocNum] = T6.[DocNum] AND T5.[DocDate] = @FECHA AND T6.[DocEntry] = T0.[DocEntry] AND T5.[Canceled] = 'N' GROUP BY T6.[DocEntry], T5.[CardCode], T5.[DocDate])
), '0')
END
as 'TOTAL','CREDITO' AS 'TIPO',0 AS totales,'TIPO_TOTALES' AS tipo_totales ,'VENTAS DE CREDITO' AS 'Tipo_Venta','' AS 'CheckNum','' AS
'DueDate','' AS 'BankName' ,'' AS 'Proteccion','' AS 'Autorizado Por','' AS 'No Tarjeta'
FROM OINV T0, ORCT T1, RCT2 T2, OUSR T3
WHERE T1.[DocEntry] = T2.[DocEntry] 
/*AND T1.[DocNum] = T2.[DocNum]*/
AND T0.[UserSign] = T3.[userID]
AND T0.[DocDueDate] >= T0.[DocDate]
AND T0.[DocDate] = @FECHA
AND T3.[U_NAME] = @USER
GROUP BY T0.[DocEntry], T0.[PAidSum],T0.[DocStatus],T0.[FolioPref],T0.[FolioNum],T0.[DocDate],T0.[NumAtCard],T0.[CardCode],T0.[CardName],T3.[userID],T3.[U_NAME],T0.[DocTotal]

Similar Messages

  • Invoice payment due date.

    Dear all,
    I would like to display the invoice payment due date in my SAPscript. I've heard about the FI_TERMS_OF_PAYMENT_PROPOSE function module and thought that it could feet my need. But I'm wondering if there is no other way to proceed since I can't find documentation on the above function module. Also I'm surprise to do not find in standard among the structured tables the invoice payment due date data.
    Best regards.
    Nozome.

    Hi Nozome,
    You may look at the following post.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/forums/sdn_jive_forums/thread{74687265616449443d3731303434}.jspa
    Cheers
    Vinod

  • Invoice payment due date to friday if it falls on Weekend

    Hi All,
    I have an interesting requirements in payment terms due date calculation. Say we assign a payment term to customer and Invoice is done.  If the due date falls in the weekend ..say 2 july 2014 which is  a Saturday. Can we set the system so due date is set to 1Jul 2014 which is a Friday. Underlying business need is when a due date fall on the weekend it doesn't go to Monday but bring forward to Friday. One can argue that Friday is not 30 days but 29 days so this not right.
    Thanks

    Hi Dick,
    Please check below links.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70ccb4af-f7d0-2c10-a0b6-ae3f2738dda2?QuickLink=index&…
    Payment Terms Setup Help
    Due Date Configuration
    Hope this helps
    Regards::::
    Atul Chakraborty

  • How to generate 3 payment due dates& 3 posting against single invoice?

    Hello Experts,
    Kindly provides some inputs on below requirement.
    For example :- In the Utility Bill,
    Consumption months: June, July, August
    Meter Reading taken in August
    Billing Months: September, October, November
    Bill generated in August
    Consumer receives the bill on September month
    Payment Due dates: 12 Sep 2009, 12 Oct 2009 and 12 Nov 2009
    Issues-:
    1.How to generate three posting against single invoice?
    2.How to generate three payment due dates for above postings in three consecutive months since payment due date logic is incremental in nature here, e.g.
    1st due date = posting date + 15 days
    2nd due date = 1st due date + 30 days
    3rd due date = 2nd due date + 30 days
    Requirement description:-
    The utility generates bill quarterly for domestic consumers. For such consumers, the utility takes reading from the consumers premises after end of consumption period (quarterly ) and generates bill on the 1st billing month (here 1st billing month is September).
    In the bill the utility divides total consumption into three parts (considering each part for each consumption month) and calculates all charge heads separately on each part. It however, consolidates and generates a single bill having three rows, each row showing charge heads of each consumption month and also net and gross amount to be given for each consumption month.
    Moreover, three postings have to be generated in FICA against that single bill. Also, it provides three due dates to the consumer, each date falling in each billing month, to pay the above three net amounts respectively. Dunning and other activities should be triggered if the consumer fails to pay the stipulated amount by corresponding due date.
    Looking forward for valuable suggestions
    Thanks in advance
    Regards,
    Vaseem
    Moderator note - question reposted - OP notified of violation Issue on quarterly bill
    Edited by: William Eastman on Jun 3, 2010 3:25 PM
    Edited by: William Eastman on Jun 3, 2010 5:01 PM

    Hello Experts,
    Kindly provides some inputs on below requirement.
    For example :- In the Utility Bill,
    Consumption months: June, July, August
    Meter Reading taken in August
    Billing Months: September, October, November
    Bill generated in August
    Consumer receives the bill on September month
    Payment Due dates: 12 Sep 2009, 12 Oct 2009 and 12 Nov 2009
    Issues-:
    1.How to generate three posting against single invoice?
    2.How to generate three payment due dates for above postings in three consecutive months since payment due date logic is incremental in nature here, e.g.
    1st due date = posting date + 15 days
    2nd due date = 1st due date + 30 days
    3rd due date = 2nd due date + 30 days
    Requirement description:-
    The utility generates bill quarterly for domestic consumers. For such consumers, the utility takes reading from the consumers premises after end of consumption period (quarterly ) and generates bill on the 1st billing month (here 1st billing month is September).
    In the bill the utility divides total consumption into three parts (considering each part for each consumption month) and calculates all charge heads separately on each part. It however, consolidates and generates a single bill having three rows, each row showing charge heads of each consumption month and also net and gross amount to be given for each consumption month.
    Moreover, three postings have to be generated in FICA against that single bill. Also, it provides three due dates to the consumer, each date falling in each billing month, to pay the above three net amounts respectively. Dunning and other activities should be triggered if the consumer fails to pay the stipulated amount by corresponding due date.
    Looking forward for valuable suggestions
    Thanks in advance
    Regards,
    Vaseem
    Moderator note - question reposted - OP notified of violation Issue on quarterly bill
    Edited by: William Eastman on Jun 3, 2010 3:25 PM
    Edited by: William Eastman on Jun 3, 2010 5:01 PM

  • Creation of Vendor Invoice  - BADI to control "Payment Baseline Date field"

    Hi ,
    In SRM - Creation of Vendor Invoice  or Credit memo  -
    In the process of creation of vendor invoice in Header Data - Payment Data tab there is a field "Payment Baseline Date" and I want to populate custom value to this field using BADI. But I could not find any BADI to do this.
    Can any one please let me know if any idea what BADI I can use.
    I tried DOC_CHANGE_BADI and this one does not have this field in the ET_HEADER.
    Thanks in advance.
    Venkat

    Hi,
    Any ideas please?
    Thanks for ur time.

  • Update AP Invoice Payment Schedule (Due Date)

    Dear All,
    Is there any API for AP Invoice Payment Schedule (Due Date) in Oracle EBS R12.
    Please advice.
    Thanks

    Hi there,
    Im afraid there is no setting that will have the system post different payment terms in the invoice reduction
    than what is in the invoice. In MIRO, if you use PO reference to create the IV document, the payment terms are copied from the PO and not from the vendor master. The business reason is, that the PO represents the contract between vendor and customer including the terms of payment. Also check out note 322430 as this gives a good description of the proposal logic for the terms of payment.
    I hope this helps,
    Best regards,
    Adam.

  • Invoice payment made but document not displaying

    HI gurus ,
    I have made an invoice payment  but the document  is not displaying in FB03. How could I know if the posting went through properly or not?
    many thanks for your help
    regards
    cecile

    Hi,
    TIP 1]
    in F110 ( payment run ) you can find a icon Payment ( that one that looks like a paper scheet ). This is payment log and here you can also find which documents were posted by payment and also by which open postings positions. This requires by payment run addtional log check box and vendor/customer number.
    TIP 2]
    In FB03 you can find also by using dynamic selection and selection option Transaction with value "F110" than a list of documents posted in F110 will popup. With another dynamic seletion option it will be more accurately.
    TIP 3]
    Use FBL1N with specific select option to see cleared items to specific date. By generated list of line items you can find your invoice and clearing document as wrote Nitin abov.
    Hope it helps
    Jan

  • Query  for report to show Invoices, Payments and Discounts

    Hi All
    I am hoping someone can help me with this query.
    What the customer needs is the invoices for a specific date range, the payments applied to the invoices and the discount amount
    Eg...
    Invoice    payment   discount
    100         90              10   
    This would be easy to get from the ORCT and RCT2 tables.
    However, sometime the users add the payment on account and reconciles the invoices and a manual journal for the discounts.
    So it would be best to look at the OITR and ITR1 tables?
    This is what I have so far and it almost balances...
    I am using this query to create the report in crystal,
    To create the discount amount from the incoming payment window i said (T0.ReconSum - T3.TrsfrSum)
    I also took out the vat amount within that formula.
    With the amounts from the manual journal, i just took the amount as is.
    select T2.CardCode, T2.CardName, T0.SrcObjTyp, T0.SrcObjAbs, T0.ReconSum, T3.TrsfrSum, T4.ReconDate, T2.U_FundedNonFunded, (T5.Debit - T5.Credit), T6.PymntGroup
    from ITR1 T0
                 inner join OCRD T2 on T0.Shortname = T2.CardCode
                 left outer join ORCT T3 on T3.DocEntry = T0.SrcObjAbs  and T3.CardCode = T0.ShortName
                 inner join OITR T4 on T4.ReconNum = T0.ReconNum
                 left outer join JDT1 T5 on T5.TransId = T0.TransId and T5.ObjType = T0.SrcObjAbs and T0.ShortName = T5.ShortName
                 inner join OCTG T6 on T6.GroupNum = T2.GroupNum
                where T3.DocDate <= getdate() or T5.ContraAct = '1127331'
    the account 1127331 is the Discount GL account.
    Based on the example the Payment + discount = Invoices
    however not all the customers are balancing..
    any ideas? it looks like my query is getting only the invoices where a payment has been done. The amounts just dont seem to match.
    Thank you
    Jerusha

    hi
    I think your join with OJDT is wrong in this part : T5.ObjType = T0.SrcObjAbs
    you should write
    T5.ObjType = T0.SrcObjTyp
    (I think you don't need this part at all )
    try this:
    select T2.CardCode, T2.CardName, T0.SrcObjTyp, T0.SrcObjAbs, T0.ReconSum, T3.TrsfrSum, T4.ReconDate, T2.U_FundedNonFunded, (T5.Debit - T5.Credit), T6.PymntGroup
    from
    ITR1 T0
    inner
    join OITR T4 on T4.ReconNum = T0.ReconNum
    inner
    join OCRD T2 on T0.Shortname = T2.CardCode
    left
    outer join ORCT T3 on T3.DocEntry = T0.SrcObjAbs and T3.CardCode = T0.ShortName
    left
    outer join JDT1 T5 on T5.TransId = T0.TransId and T5.ObjType = T0.SrcObjTyp and T0.ShortName = T5.ShortName
    inner
    join OCTG T6 on T6.GroupNum = T2.GroupNum
    where
    T3.DocDate <= getdate() or T5.ContraAct =
    '1127331'
    please let me know if it works now
    shachar

  • In which package would I find the recalculate payment due date logic

    In R12 Invoice Workbench screen when you change certain fields the payment due date is recalculated.  I want to look at the logic behind that functionality.  I am looking at the code for the form but struggling as I haven't looked at Oracle forms in years and never anything this complex.  Can someone point me to the pl/sql package that contains the logic?  Thanks!

    The information comes from multiple tables.
    But you can get most of the information from mtl_material_transactions. It will give you transaction date, type, subinventory, quantity, uom , transaction value
    You will have to join the record with po tables to get PO#
    Hope this answers your question,
    Sandeep Gandhi

  • Function Module - FBL1 (Payment due date)

    Hi All,
    In FBL1n i notice that once an invoice is posted into system, the due date for payment is calculated based on the payment terms for the vendor. I would like to know which FM i can use to get the same functionality?
    Vivek

    Mr. Santosh,
    Thanks for the quick response. Well actually i need to build a customized report for a specific requirement. I will be reading in 2 different dates & then I want to calculate the due date of payment as on those dates
    eg: Vendor payment terms 30 days.
    Case 1:
    Date 1: 3.4.2008
    Case 2:
    Date 2: 15.4.2008
    I want to pass these 2 dates individually into the FM & then the output should read me
    Case 1:
    Payment Due on: 3.5.2008
    Case 2:
    Payment Due on: 15.5.2008
    I hope i was able to put across my need clearly.
    Addition:
    Is there any function module or any other way to calculate the payment due date depending on baseline due date(ZFBDT) and payment terms(ZTERM)?
    Edited by: Vivek on Apr 23, 2008 10:04 PM

  • Reg: Payment Due date

    Hi,
    I need to display the report PO RELEASE TO INVOICE TIME TRACKING. I have strucked in finding the 'payment due date'.  Could any one help me out.
    Regards
    Chandu

    Hi
    please check below whether it helps
    if it_bseg-koart = c_k or it_bseg-koart = c_d.
    if it_bseg-zfbdt is initial.
    it_bseg-zfbdt = it_bkpf-bldat.
    endif.
    if not it_bseg-zbd3t is initial.
    w_refe = it_bseg-zbd3t.
    else.
    if not it_bseg-zbd2t is initial.
    w_refe = it_bseg-zbd2t.
    else.
    w_refe = it_bseg-zbd1t.
    endif.
    endif.
    it_data-zfbdt = it_bseg-zfbdt + w_refe.
    endif.
    regards
    Srinivas

  • Payment terms should calculate Payment due date based on working days

    Hi Experts,
    As we know that standard SAP calculates Payment due date= base line date + number of days maintained in payment terms. In this payment days are considered as calendar days and not the working days.
    Example: If base line date is Thursday, payment terms says 3 days then payment due date is calculated as Sunday ( which is not a working day as per the factory calendar I use). The requirement is that payment date should be calculated as following Tuesday considering Satuarday and Sunday are not working days as per the calendar.
    Can you please suggest how can we achieve this?
    Thanks,
    Ravi

    You can not acheive from config pooint of view but you can use BADI and get the solution
    use BAdI MRM_PAYMENT_TERMS to set terms of payment
    You can use this Business Add-In to change the following fields for the 
    terms of payment in the invoice document header:                        
    o  ZFBDT: Base date for due date calculation                            
    o  ZBD1T: Discount days 1                                               
    o  ZBD1P: Discount percentage 1                                         
    o  ZBD2T: Discount days 2                                               
    o  ZBD2P: Discount percentage 2                                         
    o  ZBD3T: Deadline for net condition                                    
    o  ZLSPR: Key for payment block

  • Payment due date in billing

    Hi,
    We want the system to pick the date of next working day if the payment due date is falling on non working day during billing.
    There is a functional module 'DATE_CONVERT_TO_FACTORYDATE' available. I donu2019t know where to use this FM so that it can work accordingly.
    Can some body plz give some input here.
    Thanks in advance.

    Invoice user exit: RV60AFZZ
    USEREXIT_ACCOUNT_PREP_KOMKCV
    USEREXIT_ACCOUNT_PREP_KOMPCV.
    Also please check this link: https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
    Regards
    Sai
    Edited by: Sai on Apr 9, 2010 10:41 AM

  • AP Invoice incorrect due date

    Hi SAP B1 experts:
    When the user is going to create a AP Invoice does not matter what payment term appears in the document the due date is the same (03012010) format DDMMAAAA. It is like the system seems not to take this configuration in order to calculate the due date neither if you change the posting date to differents days.
    At the moment to create e AR invoice the due date is calculated correctly, so is strange taking that the payment terms are the same for all the BP`s.
    I do not know any configuration related with this, so I will appreciate whatever information.
    Thanks in advance,
    Manuel Barrero

    Hi Manuel,
    the due date calculation is influenced by a few factors.
    Please have a look in the EES 'Dates in SAP Business One 2005A Sp01'. You'll find it in the archives of the psd calendar.
    https://psd.sap-ag.de/PEC/calendar/
    In that session most date calculations are explained in detail, including the due date. If you are an end customer, please contact your partner to make the presentation available to you.
    All the best,
    Kerstin

  • Regarding Payment Terms date in MIR0 Transaction

    Hi,
    This is regarding payment terms date in MIR0 Transaction.
    Actual Scenario : Pay on the 25th of the next month following the delivery, or if the 25th of the next month following the delivery has been exceeded,pay 10 days from the invoice date.
    Help required with immediate attention
    Brief Description Example wise:
    Case1:
    We have a delivery in our hand for that the billing date is consecutive month's 25th, briefly we can say that, If you raise a delivery in this month(any day of the month,i.e.,1 to 30 of the month) the payment must be done on the very next month's 25th.
    Case2:
    Invoice is generated and it must get fired after 10days.
    If the date(Payment) is (After 10days) Less than 25th April then prefer25th
    If the date(Payment) is (After 10days) Greater than
    25th April then prefer higher date(>25th April).
    How to include this logic in the MIRO Transaction. For this any UserExit is available please let me know.

    You can do that in transaction "Manager Business Partners" / BBPMAININT. Add the purchasing org and you will be able to complete this.
    Regards
    Kathirvel

Maybe you are looking for

  • Installation of Oracle 11g R2 in Linux.........Step By Step

    Oracle 11g R2 installtion in Linux Author: Arun For Reference: http://www.morganslibrary.org/reference/linux_oracle_inst11gR2.html Operating System Configuration 1.As root: Install RPM’s For RHEL 5 (32-bit): rpm -Uvih binutils-2* rpm -Uvih compat-lib

  • LMS 3.2 Campuss Data Collection Does Not Start

              I Discovered devices correctly in CS>DCR . Initially there was no problem in running data collection in Campuss Manager. But now when i try to run data collection manually or by a scedule, it does not start. Although the notification appear

  • Using AirPort Utility 5.3.1 or later to make a copy of the Time Capsule disk

    Can I use AirPort Utility 5.3.1 or later to make a copies of specific folders within the Time Capsule disk? http://support.apple.com/kb/HT1281 I see this link that explains how you can make an archive of TC files directly to an external USB (greatly

  • Quering database with word containing apostrophe

    hi all, hopefully someone can help me with this, i am trying to query an sql database with a word containing an apostrophe from within my .jsp file. How do i go about replacing the " ' " with " '' " for all query's made? any help would be great, than

  • Reset BO4.0 - CMC Administrator Password

    Hi Experts, I got this situation. I forgot CMC Administrator account password and I tried to reset using the resolution steps provided SAP. Symptom: The password for the administrator password is lost and there is no other account with administrator