How to calculate last week of the month

i want calculate dollar on the basis of last week of the month.

Hi prashant,
try to filter with the required month. if this is not your question, explain little bit clear..so, that some one will help you if they have the solution with.
or do you want to create a variable and then filter prompts...
cheers...
Edited by: ManiEswar on 24-Jan-2011 12:59

Similar Messages

  • How to get last week of the month from a month

    Hello,
    I want to get last week of the month from a month. For example: If Input = April then Output = Week17. Is there any function module? Or what should be the logic inorder to meet such requirement?
    Thanks in advance for your answers.
    Nitin.

    Hi,
    Just cpoy and past this program, and see the result and apply for you requirements.
    Data: ZSCDATUM TYPE SCDATUM,
          ZKWEEK TYPE KWEEK,
          ZDAY TYPE SY-DATUM,
          ZLDAY TYPE SY-DATUM,
          ZWK(3) TYPE N,
          ZM(2) TYPE N.
          ZDAY = SY-DATUM.
          ZM = ZDAY+4(2).
          CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
            EXPORTING
              day_in                  = ZDAY
            IMPORTING
             LAST_DAY_OF_MONTH       =  ZLDAY
    *       EXCEPTIONS
    *         DAY_IN_NOT_VALID        = 1
    *         OTHERS                  = 2
          IF sy-subrc <> 0.
    *         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          ZSCDATUM = ZLDAY.
          CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
              date               = ZSCDATUM
           IMPORTING
             WEEK               = ZKWEEK
    *       EXCEPTIONS
    *         DATE_INVALID       = 1
    *         OTHERS             = 2
          IF sy-subrc <> 0.
    *         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          ZWK = ZKWEEK+4(2).
          WRITE: ZKWEEK.
          WRITE: ZWK.
    Thanks
    Reddy

  • Setting up the sender communication last week of the month

    Hi All,
    I am doing right now JDBC to RFC, now my problem is i need to featch the data in this way "daily during the last week of the fiscal month, and first few days of the following month" i need to extract the data and send it RFC as receiver.
    How can i schedule my JDBC Adaptor communication chennal..
    I have checked with Availability Time Planning  but i am not sure how i can do it.
    Could you pls give some info how can achive this.
    Thanks in advance
    Venkat

    Hi,
    the problem is that you can't trigger the JDBC Sender Adapter.
    There was already a similar discussion in this thread:
    How to trigger XI scenario from a SQLServer Database?
    Regards
    Patrick
    (Sorry it was a wrong link first)
    Edited by: Patrick Koehnen on Jan 19, 2009 12:25 PM

  • Report selecting last week of the last 12 months

    Hi,
    we're loading snapshots on a weekly basis into a cube, updating a 0calweek field from the loading date.
    The requirement for one of the reports is to have the data for the last week for each of the last 12 months, incl the current month (query filter contains calmonth restricted by variable 0CML12CM).
    For the current month, the last week available in the cube is to be selected.
    Thanks for help!
    Michel

    Add a characteristic to your cube, which shows if the week is the last week in the month. This char can be updated during data load, to either store a Y or a N.
    Then, in your query, you just get all the data where ZLASTWEEK = 'Y'
    Cheers,
    Andrew

  • Get first week of the month

    Hi,
    how to get first week of the month from the query
    i tried this but not gwtting
    SELECT TO_CHAR('09/30/2007','W') FROM DUAL
    thanks
    Edited by: 896398 on Jan 18, 2012 3:17 AM

    896398 wrote:
    how to get first week of the monthAssuming week starts Sunday:
    SELECT  GREATEST(TRUNC(TRUNC(your_date,'MM') + 1,'IW') - 1,TRUNCyour)date,'MM')) week_start_date,
            TRUNC(TRUNC(your_date,'MM') + 1,'IW') - 1 + 6) week_end_date
      FROM  dual
    / If week starts Monday:
    SELECT  GREATEST(TRUNC(TRUNC(your_date,'MM'),'IW'),TRUNCyour)date,'MM')) week_start_date,
            TRUNC(TRUNC(your_date,'MM'),'IW') + 6) week_end_date
      FROM  dual
    / SY.

  • BIP eBusiness Suite Dates - How to include the last day of the month?

    How can I get my report to include the last day of the month 'without' forcing my users to enter the non-intuitive first of the next month as a parm?
    I have a report that will generally be run for a month but can be run for any pair of dates representing the first and last date to be included in the report.
    When we pass the dates from Oracle Apps to the report it is truncating the date to midnight. This results in the last date entered 'NOT' being included in the report as the second date is marked as "midnight". When I attempt to simply add "=1" to the end date it fails due to formatting issues in apps (only). I have gotten this to work on our Enterprise edition server that we use for testing (only) but it fails in our apps environment.
    In APPs we input the date in the format "01-AUG-2007", and this is how it shows in the parm line before the report is submitted as well as in the "View Details" after the report is executed: http://home.swbell.net/grog1//work/req_details_5607586.jpg
    However it is odd in that we in the "View Log" entry it shows the date formatted as "2007/08/01 00:00:00": http://home.swbell.net/grog1/work/view_log_5607586.jpg
    Even odder is that under diagnostics, "View XML" the date is formatted third way as: "2007/08/01 00:00:00.0" (note it now includes tenths of a second): http://home.swbell.net/grog1/work/view_xml_5607586.jpg
    This of course makes it difficult to perform conversions and calculations on the date in the SQL.
    Is APPs doing some sort of 'timestamp' conversion?
    How can I get my report to include the last day of the month 'without' forcing my users to enter the non-intuitive first of the next month as a parm?
    Any feedback is appreciated,
    Scott

    No. The problem/error occurs long before the data is formatted into xml for presentation to the format template.
    The error occurs in the SQL in the 'data' template when I attempt to add a day to the date. It either does not like the implicit conversion with the "+1" and then the use of the "between" with another date or if I attempt to manually convert it has problems with the format mask.
    Scott

  • My left shift key on Macbook Pro Retina (15") is behaving like the F11 key (show/hide open windows).  The key behaves the same for the laptop keyboard and for an external Apple keyboard?  This just started in last week after 6 months of use

    My left shift key on Macbook Pro Retina (15") is behaving like the F11 key (show/hide open windows). 
    The left shift key behaves the same on the laptop keyboard and on an external Apple keyboard. 
    This just started in last week after 6 months of use.  The right shift key and other keys on the keyboard all appear to work correctly.
    Suggestions greatly appreciated.

    I have a solution to this issue now after a discussion with Apple Support.  Some where in the last few weeks, there was a change in the key that would do a Show Desktop under the Mission Control settings in the System Preferences.  Even though the key sequence that was shown for the Show Desktop setting did not include the Left SHift key, by changing this first to having no key sequence and applying that and then changing it back to the F11 key, the Left SHift key issue that I was having has cleared up.
    A second issue that was uncovered was that the SSD had some issues (uncovered when I ran Disk Utility using the Repair Disk key).  I had to restart and use the Disk Utility through the Command R sequence to get to the stand alone Disk Utility.  The SSD appears to be running better as a result as well.
    Hope that this is of use to someone else in the future.

  • Please help.........how can i get the last date of the month?????

    Hello....
    I want to get the last date of the month.
    For example, the last date of Jan is 31.
    How can I get the last date of the particular month and year ????
    Thanks for help.
    Gloria

    Hi Gloria
    1. How can I compare the date???date1.compareTo(date2)
    where date1 and date2 is a java.util.Date Object
    will return 0 if it is the same date
    or
    date1.after(date2)
    where date1 and date2 is a java.util.Date Object
    will return true if date1 is after date2
    (the same for date1.before)
    2. How can I change the date format into yyyymmdd format???? I just want the year, month and date.try the java.text.SimpleDateFormat Object
    new SimpleDateFormat("yyyymmdd").format(yourdate)
    Hope this help.
    Please also have a look at a calendar I wrote, (maybe it help)
    demo & source :
    http://www.geocities.com/globe_software/java/components/
    globe_sa

  • How to get last date of the week

    hi,
    how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
    thnx

    data : p_week type KWEEK,
    p_Date type SYDATUM.
    p_week = <incoming value in week of year>
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
    EXPORTING
    week = p_week
    IMPORTING
    DATE = p_date
    EXCEPTIONS
    WEEK_INVALID = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    To get the last day of the week.
    p_date = p_date + 6.
    You can find the available fm in the system from se37 transaction code.

  • How do I retrieve a older backup on itunes that I saved last week in the PC. Currently, it shows the latest backup was yesterday, but I need the backup I saved on 18.10.13. Can anyone help?

    How do I retrieve a older backup on itunes that I saved last week in the PC. Currently, it shows the latest backup was yesterday, but I need the backup I saved on 18.10.13. Can anyone help?

    It keeps only the last backup.

  • Object date - how to get the last day of the month?

    hi all,
    I have a date object in which I would like to get the last day of the month. any idea?
    eg AUG=31
    Feb = 28 (depends if a leap year)
    thanks

    Use java.util.Calendar
    Add 1 month to the day.
    Set the day of month to be 1.
    Subtract 1 day.
    Now you are on the last day of the month you wanted.

  • Week of the month !!

    Hi,
    how can i get the week of the month so i can use it on queries like a time characteristic ?.
    thanks in advance

    Hi,
    The function module DATE_GET_WEEK gives the week no in that year in 2 digits. By using this function module twice , you can find out the Week in the month.(i.e use FM to calculate week no for month starting date, and use it second time to calculate the week no of the date,and then findout the difference).
    With rgds,
    Anil Kumar Sharma .P

  • ICal 3.0: Last day of the month repeating event

    I am migrating back to iCal after a few years using Entourage. I am trying to set up calendar events and reminders for the last day of every month, but I can't figure out how to do it. In Entourage this was easy. Any advice? Thank you.

    I would like this to be an easy feature included in iCal as I get paid on the 16 and second to last day of the month. I want iCal to show the event in the calendar, not for me to set the event and have an alarm for 24 hours before. I tried the trick found at http://www.macworld.com/article/47872/2005/11/trickical.html but that does not work with iCal 3.0.
    Any help would be appreciated or maybe Apple adding this in the repeating section of the ical event seeing it is apart of the icalendar specification.
    tim

  • Terms of Payment to determine due date as last date of the month

    Hi Experts,
    Does any one know how to configure a Terms of Payment to determine due date as last date of the month ?
    I tried by puting fixed date as 31 in the Terms of Payment in FI but when I am creating in FI-CA it gives me an error "_Term of payment Z003 is inconsistent/not planned_"
    Please advice.
    Thanks & Regards
    Satyajeet

    Hi Satyajeet,
    It seems the settings that you have maintained in FI are correct.
    When you are assigning the payment terms in FI-CA, you need to assign a factory calendar as well to the payment terms in the following config-
    IMG->Financial Accounting ->Contract Accounts Receivable and Payable->Postings and Documents->Document->Maintain Payment Terms
    If you have already assigned the factory calendar and still the problem persists, can you give the message ID and the message number of the error that you are getting?
    Thanks,
    Amlan

  • SQL select Statement -first day and last day of the month - 1 year from now

    Hi,
    I need to write a SQL to get the dates in between first day and last day of the month one year from now.
    SELECT last_day(add_months(sysdate,12)) as lastday from dual
    What could be the Query to get the first day of the month one year from now..
    ie ..Sysdate - 3-DEC-2009
    Result - 1-DEC-2010
    thank you

    Hi,
    You can use TRUNC with 2 arguments to get the first DATE in a month, year, quarter, week, hour, minute, ISO year, ...
    SELECT  TRUNC ( ADD_MONTHS ( SYSDATE
                               , 12
                  , 'MONTH'
                  )     AS first_of_month
    FROM    dual
    ;The DATE returned will be in the same month, year, quearter, ... as the first argument.
    \We convered the last day of the month in [your previous question|http://forums.oracle.com/forums/message.jspa?messageID=3942939#3942939].
    At that time, I warded about using LAST_DAY as a cutoff point; TRUNC is a much better way.
    For example, to find all appointment_dates in the current month next year:
    SELECT  *
    FROM    appointments
    WHERE   appointment_date >= TRUNC (ADD_MONTHS (SYSDATE, 12), 'MONTH')
    AND     appointment_date <  TRUNC (ADD_MONTHS (SYSDATE, 13), 'MONTH')Note that
    the first part of the WHERE clause calls for dates on or equal to the beginning of the 12th month in the future, but
    the second part of the WHERE clause calls for dates before, not equal to , the beginning of the 13th month in the future.

Maybe you are looking for

  • Create Acctg Error: Intercompany balancing was unable to generate the inter

    hi, 12.0.4 Issue: There is an error in Create Acctg. of Cost management due to intercompany balancing was unable to generate the intercompany account. Please check the intercompany balancing rules setup. Ledger Star Appliance Center, Inc. Application

  • How can I determine the number and size of the items in a window?

    With operating systems before Mavericks, the number of items contained and the total size was displayed at the bottom of an open window.  This was valuable, for example, when assembling files and folders for burning to discs.  How can I quickly obtai

  • Syncing issues with iPhone 4 & iTunes

    Anyone else having problems with syncing between iPhone 4 and iTunes 9.2? Keep getting syncing error messages when I'm trying to add music - either required file not found or duplicate file name is specified. iTunes then hangs. Leaves me having to in

  • Logical host name Question

    Hi Iam in process of creating 2 node cluster on 2 domains.This is for FailOver Clustering I would appreciate if someone can throw some light and explain if Iam doing right and answer some of the Questions that I had We have created 2 RG and we are in

  • DPM 2012 R2 journal wrap error

    Hi, i try to backup my active directory Using DPM 2012 R2.Below error has occurred. A journal wrap error has occurred on the change journal, and therefore DPM is unable to track any more changes or may have missed some changes for the data source C:\