Report to show average days it takes customers to pay their invoices

I am wondering if there is a report in SAP that can help me determine the average days it takes customers to pay their invoices?

Hi,
Try this for date range
declare @from as datetime
Declare @to as datetime
Set @from = /* Select min(T5.DocDate) from OINM T5 where T5.DocDate= */ '[%0]'
Set @to = /* Select max(T6.DocDate) from OINM T6 where T6.DocDate= */ '[%1]'
Select A.CardCode, A.CardName, Avg(A.Diff) [AverageDays] from
(SELECT T2.[CardCode], T2.[DocEntry],
T2.[CardName], max(T2.DocDate)[Inv], max(T0.DocDate) [Pay],
datediff(dd, max(T2.DocDate), max(T0.DocDate)) [Diff]
FROM ORCT T0 
INNER JOIN RCT2 T1 ON T0.DocEntry = T1.DocNum
inner join OINV T2 on T1.DocEntry = T2.DocEntry
where T2.DocDate between @from and @to
Group by  T2.[CardCode], T2.DocEntry, T2.[CardName]) A
Group by A.CardCode, A.CardName
Regards,
Bala

Similar Messages

  • A report which shows the purchase order MM and the linked vendor invoice

    Hi All,
    I wonder if ther's a SAP standard report which shows the purchase order MM and the linked vendor invoice (the FI document)  with the Net due date.
    Could anyone help me?
    Thanks
    G.Rossi

    Hi,
    ME80FN with PO History View
    ME2N with Scope of List "ALLES"

  • Calculate result as average in the report not showing average for all

    Hello,
    I have a calculated key figure in the query where its result should show average. I have made a setting for this calculated key figure as:
    1. Calculations tab: Calculate result as "average" and calculate single value as "nothing defined"
    2. Aggreagation tab: exception aggregation: Total and reference char: []
    Now coming to report, BEX it showing correct average for all cells but when i run it in portal few values it is showing correct average but for few it is showing as blank. I exported this to excel then cell shows blank but cell has some values in the custom format and display values when i change the format to general from "format cells" option.
    Please help me in resolving the issue- why portal not showing value for all.
    Thanks,
    Vijaya

    SAP note solved the purpose.
    Thanks & Regards,
    Vijaya

  • Average Days to Pay for Customers

    In 2007A I thought there was a place where you can get the average days a customer pays. Whether it was on the Dunning reports or the aging but I thought it was there....I cannot seem to find this, was it removed from 2005A?
    Anyways, I am  looking for a report that will show the average days a customer pays...if it is not on 2007A can someone help me with a simple query to create a report?
    Thanks a million!!

    Here you go Grace - this shows the number for ALL invoices...we created a Formatted Search (FMS) that resides on the Business Partner Master Data window
    And now on to the detail for each individual invoice!   Let me know if you need that also
    Hope this helps...
    Zal
    --FMS 6BP Average Lapsed Days Ver 1 ZP 2010 07 21
    --DESCRIPTION:  SQL shows AVERAGE days between the posting of an invoice and the
    --application of the customers payment for an FMS on Business Partner.
    --AUTHOR(s):
    --Version 1 Zal Parchem 2010 07 21
    SELECT
    (SUM(DateDiff(DD, T4.DocDate, T1.DocDate))/COUNT(T4.DocNum))
    FROM OCRD T0
    INNER JOIN ORCT T1
    ON T0.CardCode = T1.CardCode
    INNER JOIN RCT2 T3
    ON T3.DocNum = T1.DocNum
    INNER JOIN OINV T4
    ON T4.DocEntry = T3.DocENtry
    AND T3.InvType = '13'
    WHERE
    T4.CardCode = $[$5.0.0]

  • ABAP report for caluculating the average days between invoice day  &posting

    Hi All,
    i have a requirement where in  i should create a report for caluculating average days between the invoice days and posting days.  By counting the total day in a month for which invoice were generated and counting the days on which payements were recived,i should difference those days and take a average for a month. anybody who is having any idea either interms of code or interms of links please help me.

    Hello,
    See this thread [Calculation Of Days|Calculation Of Days;
    Thanks
    Chandran

  • Calculating Average Days in Crystal Reports using a Visual FoxPro driver

    Post Author: sher
    CA Forum: Crystal Reports
    I use the following code in a crystal XI report to calculate average days between two dates using the sql server driver.  It worked fine.  I used the same code in a crystal XI program using a visual FoxPro driver.  It does not work.  Can someone help me with code needed to calculate average days using a visual foxpro driver?
    cast ( Avg( DateDiff( DD, CREDENTIALING.APPLICATION_RECEIVED, ENTITYASSIGNMENTS.STATUSASOF )) As int ) AS AvgDaysFromReceipt,
    cast ( Sum( DateDiff( DD,CREDENTIALING.APPLICATION_RECEIVED, ENTITYASSIGNMENTS.STATUSASOF)) As int )  AS TotDaysFromReceipt

    Not sure if this is any simpler but you could save this as a custom function, that way you will have to modify it once a year for the holidays.
    numbervar days;
    datevar date1 := minimum({?My Parameter});
    datevar date2 := maximum({?My Parameter});
    days := DateDiff ("d", date1, date2) -
    DateDiff ("ww", date1, date2, crSaturday) -
    DateDiff ("ww", date1, date2, crSunday);    // this will give you the number of business days
                                                        // (excluding Saturdays and Sundays) for a given date range.
    // then, for each holiday, you can enter lines like this
    if date(2008,01,01) in {?My Parameter} then days := days - 1;
    // The final tally of DAYS should give you the total business days in a date range.
    totext(days,0);
    where {?My Parameter} is the date range.

  • Report to correct FD33 report is showing incorrect values ??

    Hi Guys,
    Will appreciate your help on below issue.
    The "RVKRED88 - Reorganization of SD credit data after updating errors" report is showing incorrect values.
    It is specially observed for invoice correction requests that are credit blocked.
    The doc flow is like  Order (say value  1000 $), delivery, shipment, Picking, GI, billing, accounting all cleared/complete.
    The invoice corrrection req (say value  -ve 50$)  was then created with reference to the billing doc.
    The RVKRED88 report shws the original order as open and also shows an open delivery value of 1000$ + 50$= 1050$.
    Is this behaviour correct? If not what might be the cause of this? and how to correct it?
    Regards,
    Naminator
    Edited by: Naminator on Jul 7, 2009 6:22 PM

    I am not sure, how come you are getting correct numbers for UK plant if BX is not loaded. You can get numbers correctly only in one situation which is your initial stock at that plant was ZERO, which is practically not possible.
    You said you are loading for Denmark only.
    Was the BF init done only for UK?
    How come you are loading BF Delta for UK only?
    Did you check properly that BX is not loaded into production by changing the date range. Make sure you put the lowest date range in the from field. I would put 01/01/1000
    As you said ISS is coming right because those are movements and they dont have to do anything with initial stock, but initial stock and movements affec your Total Stock Key Figure.
    - Danny

  • A customer average days to pay report

    In 2007A I thought there was a place where you can get the average days a customer pays. Whether it was on the Dunning reports or the aging but I thought it was there....I cannot seem to find this, was it removed from 2005A?
    Anyways, I am  looking for a report that will show the average days a customer pays...if it is not on 2007A can someone help me with a simple query to create a report?
    Thanks a million!!

    I had been looking for a solution to this, but instead of a report I wanted to update the Business Partner Master Data field under the Payment Terms tab called Average Delay.
    I came across the following code and I posted it on my blog here:
    Link: [http://www.tellme747.com/?p=312]
    If you install the storproc code I have posted here you can then use a simple query or report to print the data.

  • Report to display Average time taken for processing payments".

    Hi,
    I have been asked to develop a report for "Report to display Average time taken for processing payments".
    Could any one guide me technically what are the different tables i need to take to generate the report. Treat this is very urgent. Pls provide sample code too....
    Thanks in advance....

    Given below is the set up for credit card payment processing:
    Set Up Credit Control Areas:
    Define Credit Control Area
    Transaction: OB45 
    Tables: T014
    Action: Define a credit control area and its associated currency.  The Update Group should be ‘00012’.  This entry is required so the sales order will calculate the value to authorize
    Assign Company Code to Credit Control Area
    Transaction: OB38
    Tables: T001
    Action: Assign a default credit control area for each company code
    Define Permitted Credit Control Area for a Company
    Code
    Transaction: 
    Tables: T001CM
    Action: For each company code enter every credit control area that can be used
    Identify Credit Price
    Transaction: V/08
    Tables: T683S
    Action: Towards the end of the pricing procedure, after all pricing and tax determination, create a subtotal line to store the value of the price plus any sales tax.  Make the following entries:
    Sub to:  “A”
    Reqt:  “2”
    AltCTy:  “4”
    Automatic Credit Checking
    Transaction: OVA8
    Tables: T691F
    Action: Select each combination of credit control areas, risk categories and document types for which credit checking should be bypassed.  You need to mark the field “no Credit Check” with the valid number for sales documents.
    Set Up Payment Guarantees
    Define Forms of Payment Guarantee
    Transaction: OVFD
    Tables: T691K
    Action: R/3 is delivered with form “02” defined for payment cards.  Other than the descriptor, the only other entry should be “3” in the column labeled “PymtGuaCat”
    Define Payment Guarantee Procedure
    Transaction: 
    Tables: T691M/T691O
    Action: Define a procedure and a description. 
    Forms of Payment Guarantee and make the following entries Sequential Number  “1” 
    Payment Guarantee Form “02”
    Routine Number   “0”    Routine Number can be used to validate payment card presence.
    Define Customer Payment Guarantee Flag
    Transaction: 
    Tables: T691P
    Action: Define a flag to be stored in table. 
    Create Customer Payment Guarantee = “Payment Card Payment Cards (All Customers can use Payment Cards)”.
    Define Sales Document Payment Guarantee Flag
    Transaction: 
    Tables: T691R
    Action: Define the flag that will be associated with sales document types that are relevant for payment cards
    Assign Sales Document Payment Guarantee Flag
    Transaction: 
    Tables: TVAK
    Action: Assign the document flag type the sales documents types that are relevant for payment cards.
    Determine Payment Guarantee Procedure
    Transaction: OVFJ
    Tables: T691U
    Action: Combine the Customer flag and the sales document flag to derive the payment guarantee procedure
    Payment Card Configuration
    Define Card Types
    Transaction: 
    Tables: TVCIN
    Action: Create the different card types plus the routine that validates the card for length and prefix (etc…) 
    Visa , Mastercard, American Express, and Discover 
    Create the following entries for each payment card 
    AMEX  American Express ZCCARD_CHECK_AMEX Month
    DC  Discover Card  ZCCARD_CHECK_DC  Month*****
    MC  Mastercard  ZCCARD_CHECK_MC  Month
    VISA  Visa   ZCCARD_CHECK_VISA  Month
    The Routines can be created based on the original routines delivered by SAP. 
    *****SAP does not deliver a card check for Discover Card. We created our own routine.
    Define Card Categories
    Transaction: 
    Tables: TVCTY
    Action: Define the card category to determine if a
    payment card is a credit card or a procurement card.
    Create the following two entries
    Cat Description  One Card  Additional Data
    CC Credit Cards  No-check  No-check
    PC Procurement Cards No-check  Check
    Determine Card Categories
    Transaction: 
    Tables: TVCTD
    Action: For each card category map the account number range to a card category.  Multiple ranges are possible for each card category or a masking technique can be used.  Get the card number ranges from user community.  Below is just a sample of what I am aware are the different types of cards. 
    Visa Credit  Expires in 7 days. 
        400000   405500
        405505   405549
        405555   415927
        415929   424603
        424606   427532
        427534   428799
        428900   471699
        471700   499999
    Visa Procurement  Expires in 7 days.
        405501   405504
        405550   405554
        415928   415928
        424604   424605
        427533   427533
        428800   428899
    Mastercard Credit Expires in 30 days
        500000   540499
        540600   554999
        557000   599999
    Mastercard Procurement Expires in 30 days
        540500   540599
        555000   556999
    American Express Credit Expires in 30 days
        340000   349999
        370000   379999
    Discover Card Credit Expires in 30 days
        601100   601199
    Set Sales Documents to accept Payment Card Information Transaction: 
    Tables: TVAK
    Action: Review the listing of Sales Document types and enter “03” in the column labeled “PT” for each type which can accept a payment card
    Configuration for Authorization Request
    Maintain Authorization Requirements
    Transaction: OV9A
    Tables: TFRM
    Action: Define and activate the abap requirement that determines when an authorization is sent.  Note that the following tables are available to be used in the abap requirement (VBAK, VBAP, VBKD, VBUK, and VBUP).
    Define Checking Group
    Transaction: 
    Tables: CCPGA
    Action: Define a checking group and enter the
    description.  Then follow the below guidelines for the remaining fields to be filled.
    AuthReq Routine 901 is set here.
    PreAu  If checked R/3 will request an authorization for a .01 and the authorization will be flagged as such. (Insight does not use pre-authorization check).
    A horizon This is the days in the future SAP will use to determine the value to authorize
    (Insight does not use auth horizon period).
    Valid  You will get warning message if the payment card is expiring within 30 days of order entry date. 
    Assign Checking Group to Sales Document
    Transaction: 
    Tables: TVAK
    Action: Assign the checking group to the sales order types relevant for payment cards
    Define Authorization Validity Periods
    Transaction: 
    Tables: TVCIN
    Action: For each card type enter the authorization validity period in days.
    AMEX American Express 30
    DC Discover card  30
    MC Master card  30
    VISA Visa   7
    Configuration for clearing houses
    Create new General Ledger Accounts
    Transaction: FS01
    Tables: 
    Action: Two General Ledger accounts need to be created for each payment card type.  One for A/R reconciliation purposes and one for credit card clearing.
    Maintain Condition Types
    Transaction: OV85
    Tables: T685
    Action: Define a condition type for account determination and assign it to access sequence “A001”
    Define account determination procedure
    Transaction: OV86
    Tables: T683 / T683S
    Action: Define procedure name and select the procedure for control.  Enter the condition type defined in the previous step.
    Assign account determination procedure
    Transaction: 
    Tables:
    Action: Determine which billing type we are using for payment card process.
    Authorization and Settlement Control
    Transaction: 
    Tables: TCCAA
    Action: Define the general ledger accounts for reconciliation and clearing and assign the function modules for authorization and settlement along with the proper RFC destinations for each.
    Enter Merchant ID’s
    Transaction: 
    Tables: TCCM
    Action: Create the merchant id’s that the company uses to process payment cards
    Assign merchant id’s
    Transaction: 
    Tables: TCCAA
    Action: Enter the merchant id’s with each clearinghouse account

  • Report for showing pending (ageing) quantity according to store location w

    dear ABAP Gurus,
    I have made a roport for showing pending (ageiing) quantity acc to location wise.
    and i m sending here the code i made for same.Tell me if sme amendments required.
    Report for showing pending (ageing) quantity according to store location wise:   
    1.     Fields on selection screen (input screen) : Plant code From to , Material code From to , Current date, Numbers of days(for display the ageing(pending) balance for a given period,Storage locations from to.
    2.     Field in the output List : Material code , Material descriptions, Balance quantiy,Balance value ,Consumptions date. 
    the code is:
    REPORT  ZAGEIN_SUDHA.
    TABLES: mara,mseg,makt.
    TYPES: BEGIN OF t_mara,
    matnr LIKE mara-matnr,           "material number
    maktx LIKE makt-maktx,           "material description
    ersda LIKE mara-ersda,           "material creation date
    lgort like mseg-lgort,           "storage location
    bwart like mseg-bwart,           "goods received or issued
    menge like mseg-menge,           "value at movement type
    werks like mseg-werks,           "plant
    END OF t_mara.
    DATA: i_mara TYPE STANDARD TABLE OF t_mara with header line,
          itab type standard table of mara with header line,
    *wa_mara TYPE t_mara,
    v_date TYPE i,                      "age in days
    GI type mseg-menge,                 "goods issued
    GR type mseg-menge,                 "goods received
    bal type mseg-menge,                "balance
    total type i,
    grace type i,
    g_quan type mseg-menge.
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECT-OPTIONS: p_matnr FOR mara-matnr.
    select-options: p_werks for mseg-werks.
    select-options: p_lgort for mseg-lgort.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    REFRESH i_mara.
    SELECT mr~matnr                        "mara-matnr
    mk~maktx                               "makt-maktx
    mr~ersda                               "mara-ersda
    mg~lgort                               "mseg-lgort
    mg~bwart                               "mseg-bwart
    mg~menge                               "mseg-menge
    INTO corresponding fields of table i_mara
    FROM mara AS mr INNER JOIN
    makt AS mk
    ON mrmatnr = mkmatnr INNER JOIN mseg AS mg on mkmatnr = mgmatnr
    WHERE mrmatnr IN p_matnr and mgwerks IN p_werks and mg~lgort IN
    p_lgort.
    total = 0.
    IF sy-subrc = 0.
    *CLEAR wa_mara.
    LOOP AT i_mara.
    if i_mara-bwart = '101' .
    GR = total + i_mara-menge.
    total = GR.
    elseif
    i_mara-bwart = '102' or i_mara-bwart = '122'.
    GR = GR - i_mara-menge.
    endif.
    if i_mara-bwart = '261'.
    GI = total + i_mara-menge.
    elseif i_mara-bwart = '262'.
    GR = GR + i_mara-menge.
    endif.
    bal = GR - GI.
    if bal GE  GR.
    grace = 30.
    else.
    grace = 10.
    endif.
    g_quan = bal - GR.
    v_date = sy-datum - i_mara-ersda.
    endloop.
    WRITE: / i_mara-matnr ,i_mara-maktx,' is ',v_date,' ,days old  and
    stored at' ,i_mara-lgort ,   ' with balance =', bal ,'the grace time is
    ', grace, 'and' ,'grace quantity is ' ,g_quan.
    *ENDLOOP.

    Hi,
    That sounds like a nice report.  What about it?!
    Gareth.

  • Report to show Document Templates linked to what business partners

    Hi all,
    I want to write a report to show what default document print templates are linked to what business partners. eg. InvoiceTpye1 is used by Customers 1,6,and 8 etc etc. 
    However I am not aware of what tables hold this info.  Does anyone know?
    Many thanks in anticipation
    Damian

    Hi Damian,
    The table you are looking for is: RDFL
    Thanks,
    Gordon

  • Report for showing pending (ageing) quantity according to store location wi

    Report for showing pending (ageing) quantity according to store location wise:   
    Fields on selection screen (input screen) : Plant code From to , Material code From to , Current date, Numbers of days(for display the ageing(pending) balance for a given period,Storage locations from to.
    Field in the output List : Material code , Material descriptions, Balance quantiy,Balance value ,Consumptions date.

    Hi,
    That sounds like a nice report.  What about it?!
    Gareth.

  • Oracle Discoverer Desktop Report output showing unicode characters

    Hi,
    Oracle Discoverer Desktop 4i version Report output showing the below unicode characters.
    kara¿ah L¿MAK HOLD¿NG A.¿
    We ran the same query in sql at that time the data showing correctly.
    Please let me know, is there any language settings/ NLS settings are need to set
    Thanks in Advance.

    Hi
    Let me give you some background. In the Windows registy, every Oracle Home has a setting called NLS_LANG. This is the variable that controls, among other things, the numeric characters and the language used. The variable is made up of 3 parts. These are:
    language_territory.characterset
    Notice how there is an underscore character between the first two variables and a period between the last two. This is very important and must not be changed.
    So, for example, most American settings look like this: AMERICAN_AMERICA.WE8MSWIN1252
    The second variable, the territory, controls the default date, monetary, and numeric formats and must correspond to the name of a country. So if I wanted to use the Greek settings for numeric formatting, editing the NLS_LANG for Discoverer Desktop to this setting will do the trick:
    AMERICAN_GREECE.WE8MSWIN1252
    Can you please check your settings? Here's a workflow:
    a) Open up your registry by running Regedit
    b) Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
    c) Look for the Oracle Home corresponding to where Discoverer Desktop is installed. It's probably called KEY_BIToolsHome_1
    d) Clicking on the Oracle Home will display all of the variables
    e) Take a look at the variable called NLS_LANG - if it is correct Exit the registry
    f) If its not correct please right-click on it and from the pop-up select Modify
    f) Change the variable to the right setting
    g) Click the OK button to save your change
    h) Exit the registry
    Best wishes
    Michael

  • Report Request - Tickets by day of the week

    So there are plenty of reports that show data based on past X days, but as far as I can see, none break it up into by days of the week.
    Example, For the last month, how many tickets were closed on Monday, Tuesday, by what Tech, in which Category/Location/Custom attribute.
    Could someone better than I make this happen?
    This topic first appeared in the Spiceworks Community

    I am not sure about your help.  Text variable is part of the header of a column and how is it possible to use the text variable as part of the result area.  I want the day to be part of the line item in the report.
    Appreciate if any one can provide their thoughts and input.
    Regards
    Sundar

  • Reports only showing up in local admin console?

    Ok, so I am stuck. I have installed SCCM 2012 without issue and installed the Reporting Services point using the same system as the SRS server. Everyhting at first appeared to be great. Using the local console on the server all the reports show up and run
    fine.
    However, when I use a console on a remote workstation (same login as server) everything works fine except reports, the reports always show up as "No Items Found." I can use the same credentials and browse to the report server and run reports through IE all
    day long, but nothing I have tried can get them to show up in the console on the remote workstation. This client has quite a few people who will need to access reports this way, has anyone else seen anything like this?
    Thanks,
    Karl Koehler, mcitp, mct
    P.S. I teach the MOC SCCM 2012 classes, the reports frequently do not show in the local console and a reboot fixes it. So this one really has me stumped.

    Thanks for the replies, to answer your questions:
    There is nothing special about the dB or SRS setup, everything is set to the default.
    The systems running the remote consoles are in the domain, and have tried it on systems with UAC turned off completely.
    I am able to access the reports through the reporting website without issue, but I haven't added the certificate to the clients (they do not have an internal CA and so it's using the self-signed.)
    Do we think the console only uses HTTPS? Because that could be the issue. I'll add the cert and see what happnes and post back.

Maybe you are looking for

  • How can I remove all photos and directories from iPhoto?

    How can I remove all photos and directories from iPhoto as if it was a brand new install? I am new to iPhoto and was unaware of how it works, honestly I still am a little confused as to when pics I am using 1/2 the time, some from iPhoto and some fro

  • How to hide part of search results to particular users?

    Hi, Is it possible to hide part of search results to particular users? If it possible can you please tell how to implement?  Thanks, Chinnu

  • Writing a string

    how to write a large string in java . here is the example: "select region_id, country_code, product_id,"+ "prov_activity_grp_name, process_order , prov_activity_id,"+ "prov_activity_name, is_merged, is_critical, group_id, group_name, precedessor_id,

  • SAP certification for BA

    hi thr, if a banker with 10 yrs exp wants to switch to IT industry as BA, then SAP certification will be helpful or not?'[ Message was edited by: Colleen Lee - moving to the Certifications space

  • 250MB expires in 30 days?

    So if I sign up for the 250 data package and I do not use the entire 250 within the 30 days does it go bye bye? And I say do not renew monthly. And along with that if I sign up for the repeating subscription and I dont use all my data does it add ano