Calculating  if overdue

Hello,
I have a scenario that I need to pull from one table information pertaining to a proficiency test by the date it was last preformed and if it is over due -only print out if over due and those due within 3 months. Resulting in name, date of last test and when new date to be completed. I have the following:
SELECT emp_fname||''||emp_initial||'. '|| (emp_lname) "PILOT" ,
PIL_PT135_DATE "LAST PT TEST DATE",
ADD_MONTHS(PIL_PT135_DATE,3) +90 "NEW DUE DATE",
ADD_MONTHS(PIL_PT135_DATE,3) "DUE WITHIN 3 MONTHS"
FROM hartmar.employee
JOIN hartmar.pilot ON
employee.emp_num = pilot.emp_num
I know aI need an if statement in there to indicate that if the pil_pt135_date is > sysndate for it not to print. But if the pil_pt135_date is <= sysndate to print and to calculate to date it is to be completed by. As well as print out those that are due within 3 months of the sysndate.
I can spell it out what Iwant to do ubut cannot seem to get it in sql language or formatt.
Please help..
Thanks

I think you are mixing SQL implementations, in that I have not seen this style of JOIN in Oracle. Try the following:
<br>
<b>SELECT</b> emp_fname||''||emp_initial||'. '|| (emp_lname) "PILOT" ,
<br> PIL_PT135_DATE "LAST PT TEST DATE",
<br> ADD_MONTHS(PIL_PT135_DATE,3) +90 "NEW DUE DATE",
<br> ADD_MONTHS(PIL_PT135_DATE,3) "DUE WITHIN 3 MONTHS"
<br><b>FROM</b> hartmar.employee, hartmar.pilot
<br><b>WHERE</b> employee.emp_num = pilot.emp_num
<br><b>AND</b> pil_pt135_date is <= ADD_MONTHS(PIL_PT135_DATE,3)
<br><br>
This should at least get you an executable Equi-Join statement.
<br>
Hope this helps.<br>
Craig...

Similar Messages

  • Interest calculation on overdue amount payable to vendors

    hi gurus
    i have a doubt on interest calculation on overdue amount payable to vendors,can you tell me interest calculation procedure.

    hope below link are useful"
    http://www.sap-basis-abap.com/sapfj001.htm
    http://help.sap.com/bestpractices/BBLibrary/Documentation/J03_AR_BPP_05_EN_SG.doc
    pls assign points as way to say thanks

  • Interest calculation on overdue customer open items

    Hi.
    I need to calculate the interest on the customer overdue open items. for that i have configured the following steps.
    OB46 - Interest Settlement Calculation Type
    OB82 - Interest Terms 
    OBAC - Define Reference Interest Rates 
    OB83 - Enter the Reference Interest Rates Value 
    OB81 - Define Time Dependent Terms 
    OBV1 - Prepare Interest on Arrears Calculation
    I have assigned the interest inidicator in the customer master record.
    Now when i run the interest calculation using FINT, it is giving me the error " Problem class very  important" and showing as "No records selected".
    Can anyone help me in this issue.
    Regards,
    Padmavathi

    Dear Mauri,
    Now i got the issue solved.
    In the step Prepare item interest calculation, i have given the ref date as 3 - positng date so only system is not picking the open items.
    Now i changed it to 4 - Payment baseline date. its done.
    Thanks.
    Regards,
    Padmavathi

  • Calculating Stock Overdue

    HI all,
    I have a report requirement for a Stock Report. The scenario is to calculate the stock qty from last year. but the requirement is as follows:
    1) the User input is in Week, For Ex the 25th Dec is thursday and this belongs to 52nd week ie. 522008.
    So the user inputs in the week selection as 522008.
    2) the logic must start calculating from the first cal day of the week, i.e Monday 22nd Dec 2008.
    3) The logic must give YTD values of the stock from 22nd Dec 2007 till 21st Dec 2008.
    So this gives the complete stock overdue from vendors from 22nd Dec 2007 till 52nd week of 2008 ie. 21st Dec 2009.
    Please tell me how shud i proceed.
    Thanks

    Hi Raihaan,
    You can try writing a customer exit for 0caldate or for the date object in your report.
    Use step type 2, and code under the variable name to populate the variable with the required range.
    Before you start this I recommend you to go to se37 and key in the following function modules and press run and try and test run them. The remaining part is just normal ABAP substraction.
    Function module:-
    DATE_GET_WEEK. Will return the week for the date entered.Check the format of the date that is required.I think yyyy/mm/dd.
    Once you get the week use WEEK_GET_FIRST_DAY.
    This will return the first dae of the week.
    Subtract one from this date to get the previous day.
    Take this date in a character variable and then play with seperation , addition and concatenation to prepare the date of the previous year.
    Note while doing subtraction of dates use variables of type date, so that it calculates the correct day-1 for 1s day of the month(01.01.2009 say).
    Regards,
    Sunmit.

  • Interest calculation on overdue,credit balance & cash dicount

    Hi gurus
    we need to calculate the over due interest, interest on credit balance & cash discount on the customer balance thru system. What are the configuration settings required& also for reporting purpose what we need to do.Please explain in details
    Thanks
    shivaji

    To be able to post cash discounts, you must define an account determination for cash discount taken and cash discount granted.
    For cash discount taken, choose:
    Financial Accounting ® Accounts Receivable and Accounts Payable ® Business transactions ® Outgoing payments ® Outgoing payments Global Settings ® Define accounts for cash discounts taken
    For cash discount granted, choose:
    Financial Accounting ® Accounts Receivable and Accounts Payable ® Business transactions ® Incoming payments ® Payments Receipt Global Settings ® Define accounts for cash discounts granted
    Please refer to the R/3 library and the IMG documentation for more details.
    You may also want to use payment terms suitable for you business processes to trigger the automatic calculation of cash discount amounts

  • Interest calculation on due date

    Hi
    I want interest calculation from duedate (which is 30 days from invoice date). In one of the step of configuration, i defined Interest calculation indicator as VK. In that there is a option which says from where interest needs to be calculated. There are options:
    Value Date (or Baseline Date for Net Payment)
    Document Date
    Posting Date
    Payment Baseline Date
    There is nothing as due date. Please let me know how to do this.
    Is Value date the due date ?

    HI Deepak,
    You do not need to select that interest should be calculated on overdue items which means from due date,,,this is standard settings...
    Regards,
    Chintan Joshi

  • ZAP_AGE - Vendor Payment History with OI Sorted List

    Hi,
    I am suggesting this report to my client as Vendor ageing report.
    This report is calculating the overdue values from the document date of the vendor invoice, However, my client wants to calcuate the values from the Due date of the Invoice.
    Is there any option to do this in this report?
    Regards

    it's a customer specific report, not a standard SAP one. Talk to your programmer.

  • Calculation of Interest on overdue witholding taxes

    In my scenario the interest needs to be calculated on the overdue payments that have not yet been paid by the client to the goverment of TDS so deducted by the system. The interest needs to be calculated from the 7th of next month till date the amount is actually paid. The tds so deducted in the period 1-7th of the month will not be liable for interest calculation. Again in the next month the same cycle needs to be repeated for interest calculation.
    Can anyone help me out if how to achieve the same.
    Regards,
    Anurag Gupta

    Hi
    You may like to check the config from the below angles :
    1) interest payment is produced if the credit interest (because of interest calculated on items paid before the due date) is greater than the debit interest.
    2) Calculate interest on items paid before due date
    Indicator which means that credit interest is calculated for items paid prior to their due date, provided that the item paid was not subject to a cash discount. Interest is calculated using credit interest rates.
    Note
    The system calculates credit interest only on those clearing transactions where all payments were made before the due date. If you do not select this option for those transactions then the items are ignored.
    This option has no effect in the case of clearing transactions where payments are made both before and after the due date. For transactions such as these, interest is always calculated on the basis of debit interest.
    For partial payments and down payment offsetting items that are made before the due date of the invoice, interest is calculated from the document date if this indicator is set. If it is not set, interest is calculated from the due date of the invoice.
    3) Calculate Interest as of Due Date for Net Payment
    Indicator which means that interest is calculated as of the due date for net payment; otherwise, you pay interest as of the settlement period lower limit (if the due date for net payment is before it) or as of the date of the last (according to the master record) interest caluclation (if the corresponding parameter is set).
    Regards
    S

  • FINT interest calculation on cust overdue items from net due date required

    Hi.
    I am running FINT option i am running interest calculation from net due date onwards whereas the system is calculating the interest from Next date of due date.
    For example: Customer invoice is raised on 01.01.2011 and Net due date is 01.01.2011. I gave the option in the interest calculation - SPRO - FINANCIAL ACCOUNTING(NEW) - ACCOUNTS RECEIVABLE AND ACCOUNTS PAYABLE - BUSINESS TRANSACTIONS - INTEREST CALCULATION - PREPARE ITEM INTEREST CALCULATION, Ref date as as 1 - Value date (Baseline date from Net Payment).
    Still the system is calculating the interest from 02.01.2011 instead of from 01.01.2011.
    Can anyone help me in this regard.
    Regards,
    Padmavathi

    Hi,
    We can calculate interest on items cleared with in the calculation period.
    When you are calculating interest on open items, system will check open items as on the Calculation Date.
    But if you want to calculate Interest on items cleared with in the calculation period., you have to check Calculate Interest on Cleared Items also.
    For Instance: If you are calculating Interest on 31st July for the period of 01.07.2009 to 31.07.2009, in this case
    some open items are already cleared with in this calculation period, even though you have to calcuate interest for those cleared items for that many days. System will calculate interest for that many days.
    Try with this option, still if you need any help please let me know.
    Thanks
    Chandra

  • Calculating Overdue Payment

    Need to find field or calculate if an item is overdue for payment.
    e.g. from transaction fb5ln (BSID)
    Is there a table which stores this field?  If not how hard is it to calculate?

    Yeah its just open customer items i need to deal with therefore just BSID entries.
    Is there any functions or something I can use to work out if the item is overdue?  Or do I just look at the due date and terms of payment?
    Thanks

  • Overdue amount calculation

    hi all,
    how to calculate overdue amount for account statments.
    is there any function module to calculate the overdue amount .
    regards,
    deepthi

    Loop on the items and find the difference between
    PSNG_DATE of each item and SY-DATUM which gives the
    number of days from which it is open.
    If the days is between 1-30 add the amount (LC_AMOUNT) to this cap else check if the days between 30-60 and add amount and so on for opther two caps.

  • Interest Calculation on Cleared Open Items

    Hi,
    I have the following scenario:
    We have a receivable to a customer. Posting date of the transaction is June 01, baseline date is also June 01 and due date is on July 15.
    Entry is (Exhibit a)
    A/R-Customer 1
       A/R-CEWT
    At the same time, we have also CM to the customer with July 01 as posting date and July 01 as baseline date.
    Entry is (Exhibit 2)
    A/R-CEWT
        A/R-Customer 1
    In order for the customer not to pay anymore the A/R-, we did automatic clearing for the AR and CM with July 1 as posting date of the clearing.
    Entry is
       A/R-Customer 1 (Exhibit 2)
         A/R-Customer 1 (Exhibit 1)
    But why is that when i run the interest on July 25, interest was still computed for the AR (Exhibit 1) when there should be none because it was already cleared on July 1, 14 days before it become overdue.
    Is it because clearing is also customer?
    Thank you

    Hi,
    We can calculate interest on items cleared with in the calculation period.
    When you are calculating interest on open items, system will check open items as on the Calculation Date.
    But if you want to calculate Interest on items cleared with in the calculation period., you have to check Calculate Interest on Cleared Items also.
    For Instance: If you are calculating Interest on 31st July for the period of 01.07.2009 to 31.07.2009, in this case
    some open items are already cleared with in this calculation period, even though you have to calcuate interest for those cleared items for that many days. System will calculate interest for that many days.
    Try with this option, still if you need any help please let me know.
    Thanks
    Chandra

  • Difference between FINT and F.24 for interest calculation

    Hi all!
    I am currently configuring the calculation of interest on arrears. To be more specific - an interest has to be calculated only on overdue items cleared with a payment. SAP advises to use F.24 transaction in this case. The problem is that F.24 doesn't produce a normal report where the clerks could see the invoices in a list (before actually posting the interest) - it produces the 'mail format' pages.
    I wonder what FINT transaction is for? Can I use it for calculating the interest on arrears? In SAP I didn't find any good documentation on this.
    Could you please help me by describing the main purpose of using the FINT? What is it for? Can it be used in my case?
    Thank you very much in advance!

    This is probably not as detailed as you would like but FINT is the replacement for F.24.  Both are still supported however there are several reporting advantages with FINT over F.24 specifically program RFINTITSHOW.  FINT also has additional selection capabilities and generally is an improved interest calculationprogram over F.24.  I can't off the top of my head think why they'd suggest to use F.24 now instead of FINT.  FINT I think also uses Smartforms where F.24 uses SAPScript (and can probably be made to use Smartforms) .
    Hope that helps somewhat.

  • Interest Calculation on customer balance

    Hi
    I need to calculate interest on customer overdues (on net balance after deducting advance received from there).
    There are three types of interest calculation:
    1. Balance interest calculation
    2. Item Interest Calculation
    3. Arrears Interest
    Please let me know which one i need to select for the same.

    Hi Deepak,
    I will provide you some information about this matter:
    Please, notice that the program RFINTITAR (tr. FINT) isn't used for balance interest calculation. It is used for customer overdue item interest calculation. Please check the documentation available for this program. I believe that this is the option that you should use.
    In case of Special G/L transactions:
    Check IMG- Financial Accounting (New)-  Accounts Receivable and Account Payable- Business transactions-
    Interest calculation - Prepare special G/L transaction interest calculation.
    As described in the documentation of the customizing node, the assigning of new interest indicators according to the special G/L transaction is evaluated by balance interest calculation only.
    Please see the documentation:
    "In this step, you define an alternative interest indicator for special G/L transactions. The specifications only apply to the account balance interest calculation."
    I hope that this answer your inquiry.
    Best Regards,
    Vanessa Barth.

  • Interest calculation in Dunning Wizard

    Hi All,
    I have a question with regard to the calculation of Interest amount via Dunning wizard.
    Let us say I have a dunning term that issues Dunning Letter 1, 30 days past the due date. Dunning Letter 2 is issued 30 days past the dunning letter 1. The interest to be charged is 10% per anum.
    Let us say I have an invoice of $1000. 30 days past the due date when I run the dunning wizard, it would show an interest of 8.33. As SAP does not post the interest amount automatically in the form of a journal entry, we manually pass this journal entry for receivables of $8.33.
    Next time, when I run the dunning wizard after 30 days of running the first dunning wizard, I will see that the date of last dunning run is updated. When I check the Interest amount, it will show me 16.67. This interest amount is a cumulative i.e 8.33 (last dunning run) and 8.33 of this run.
    Now, if we pass a journal entry for 16.67, it will be wrong as I have already passed a previous journal entry for 8.33. Is there a way we can make the system count the interest days from the last dunning run to give me the incremental interest amount of $8.33. Currently the interest days are calculated from the due date of the invoice.
    Is there a UDF that can be created in the dunning wizard and can have a formatted search assigned to it?
    Thank you very much for your input.
    Regards,
    Payal

    Hi Payal,
    Please check the following information from the Dunning documentation and see if it is of any help regarding your issue :
    The interest will be calculated as follows:
    Open Sum * Annual Interest Rate * Number of Days Overdue / (Number of days in Year * 100)
    o Open Sum u2013 This value will be calculated according to the calculation method defined in the previous window (Calculate Interest Value on Remaining Sum or Calculate Interest Value on Original Sum).
    o Annual Interest Rate u2013 This value is taken from the Annual Interest Rate field in the Define Dunning Terms window.
    o Days Overdue u2013 The number of days that passed from date of payment as defined in the Invoice to the day of running the Dunning Wizard (see explanation on the Dunning Wizard below).
    If a month passed since the defined day of payment, and a value was entered into the field Number of Days in Month (for example 30 days), this value will be taken into account as follows:
    1. If the number of days in the past month was more or
    less than the number of days defined in Number of
    Days in Month field (for example if 31 or 29 days have
    passed and 30 days were defined for a month), then the
    value defined for calculation of interest will be used (in
    the example above, the value will be calculated
    according to 30 days and not 29 days).
    2. If the number of days in the past month is less than the
    number of days defined in the Number of Days in Month
    field (for example if 29 days passed and 30 days were
    defined for a month), the value defined for calculation of
    interest will be used (in the example above, the value
    will be calculated according to 30 days and not
    according to 29 days).
    3. If a month has not yet passed from the day of payment
    and the number of days overdue is less than the
    SAP Business One Dunning System in Release 2004 A
    January 2005 Page 11 of 29
    number of days defined for that month (for example 14
    days), the calculation will be done according to the
    number of days overdue (14 days), and not number of
    days in a month.
    Check if this helps.
    Regards,
    Jitin
    SAP Business One Forum Team

Maybe you are looking for

  • Firefox crashes while starting up

    After having used Firefox for years on my iMac, today it won't even start but immediately crashes. I have tried starting from the safe modus and I have installed the latest software updates. Also I use the lates Mac OS X version. My safety program re

  • Optival RAM by Omni Technologies?

    Hello, I was considering adding 2gb of RAM to my Mac Pro and I found a good deal for some RAM called Optival by Omni Technologies. I never heard of this RAM but nothing looks wrong with it and its lesser than half the price of RAM for Mac Pros from A

  • Embedded file in PDF/Email

    Hello All, I have a PDF file (let's call it file 1) which I want to send by email. This PDF file has another PDF file (let's call it file 2) embedded in it. On my desktop, it works perfectly. I click on the link for file 2 file and it opens up. Howev

  • Sending a video from my computer to blackberry curve 9330

    I sent a video I made on my comp0uter to my blackberry via windows media player. When I go to show it on my phone it tells me that "this video portion of the media being played uses an unsupported format". I have a media card in the phone. Is there a

  • Aperture 2.1.1 Vault problem with external usb  disk

    I have just updated to 2.1.1 and now Aperture freezes every time I connect my usb external disk and try to create or update a vault. I have to force quit Aperture and remove the disk before I can use Aperture again. The only way I can create a vault