FM for getting all days of week

Hi,
When I enter todays date FM should bring up all dates in a week.
Eg: today if user enters 02/04/2009
It should give me values 3/29 , 3/30 , 3/31, 01/04,02/04 etc..
Do we have any FM for this?
Rgds
Praveen

Hi Praveen
In the below mentioned funtion modules you can get almost all type of days & weeks calculations...
For your requirement just do this
"To calculate week Start & End date
        CALL FUNCTION 'HRWPC_BL_DATES_WEEK_INTERVAL'
          EXPORTING
            DATUM                = SY-DATUM " Current date (ITAB DATE)
            WEEK_PST             = '0'
            WEEK_FTR             = '0'
         IMPORTING
           BEGDA                = STR_WEEK_DATE  " Week start date
           ENDDA                = END_WEEK_DATE. " Week end date
then
day1 = STR_WEEK_DATE
day2 = day1 + 1.
day3 = day2 + 1.
till day7...
"To calculate week no for  particular date
    CALL FUNCTION 'DATE_GET_WEEK'
      EXPORTING
        DATE         = SY-DATUM " any date
      IMPORTING
        WEEK         = WEEK_NO ." Week no for particular date
"To calculate week Start & End date
        CALL FUNCTION 'HRWPC_BL_DATES_WEEK_INTERVAL'
          EXPORTING
            DATUM                = SY-DATUM " Current date (ITAB DATE)
            WEEK_PST             = '0'
            WEEK_FTR             = '0'
         IMPORTING
           BEGDA                = STR_WEEK_DATE  " Week start date
           ENDDA                = END_WEEK_DATE. " Week end date
"To calculate Months ending date
          CALL FUNCTION 'BKK_GET_MONTH_LASTDAY'
            EXPORTING
              I_DATE = SY-DATUM " Any date
            IMPORTING
              E_DATE = END_MONTH_DATE. " Month's ending date
"to calculate particular day No for any give date.
    CALL FUNCTION 'DATE_COMPUTE_DAY'
      EXPORTING
        DATE = SY-DATUM " any date
      IMPORTING
        DAY  = DAYNO1. " particular day no.
"To calculate particular day name with the day no
    CALL FUNCTION 'BKK_GET_DAY_OF_WEEK'
      EXPORTING
        I_DAY       = DAYNO " week day no.
      IMPORTING
        E_WDAY      = CURRENT_DAY_NAME. " Week day name for the week day no.
" to Calculate the next week
    CALL FUNCTION 'NEXT_WEEK'
      EXPORTING
        CURRENT_WEEK = WEEK_NO "Current week,
      IMPORTING
        NEXT_WEEK    = WEEK_NO. " Next week
" to calculating starting date of the week
    CALL FUNCTION 'WEEK_GET_FIRST_DAY'
      EXPORTING
        WEEK = WEEK_NO "week No
      IMPORTING
        DATE = STR_WEEK_DATE. " Starting date of the particular week
"To Calculate particular day No for any given date
        CALL FUNCTION 'DAY_IN_WEEK'
          EXPORTING
            DATUM = STR_WEEK_DATE " Any date
          IMPORTING
            WOTNR = DAY. " Day no for a giveN date
Hopw this solves your Problem
Thanks & regards,
Dileep .C

Similar Messages

  • Function Modules to get First day of week, month, Year

    Can anyone name the Function Modules for getting First day of week, month ,year.

    to get first day of week use this function;   WEEK_GET_FIRST_DAY
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
               EXPORTING
                    WEEK         = '201107'
               IMPORTING
                    DATE         = l_date
               EXCEPTIONS
                    WEEK_INVALID = 1
                    OTHERS       = 2.
    with DATE_COMPUTE_DAY function you can get date number in week.
    CALL FUNCTION 'DATE_COMPUTE_DAY'
           EXPORTING
                DATE = workdate
           IMPORTING
                DAY  = day_of_week_num
           EXCEPTIONS
                OTHERS  = 8.
      CASE day_of_week_num.
        WHEN 1.
          hold_day_of_week = 'Monday'.
        WHEN 2.
          hold_day_of_week = 'Tuesday'.
        WHEN 3.
          hold_day_of_week = 'Wednesday'.
        WHEN 4.
          hold_day_of_week = 'Thursday'.
        WHEN 5.
          hold_day_of_week = 'Friday'.
        WHEN 6.
          hold_day_of_week = 'Saturday'.
        WHEN 7.
          hold_day_of_week = 'Sunday'.
        WHEN OTHERS.
          hold_day_of_week = 'invalid'.
      ENDCASE.

  • Adding reminders to my calendar items is no longer an option after the software upgrade.  I also can't get to day and week view, only month view.  What's a possible solution?

    Adding reminders to my calendar items is no longer an option after the software upgrade.  I also can't get to day and week view, only month view.  What's a possible solution?  I'm using Andriod version 4.4.2 with kernal 3.4.0.

        @MaloneTP
    Thanks for keeping me updated!  Do you see the screen options displayed in the following link: http://bit.ly/T2koBL for changing the calendar view options in Kies Air?  Also, let me know if you're able to add a Reminder by following these steps: http://bit.ly/T2l9dY.  Keep me posted.  Thanks!
    AnthonyTa_VZW
    Follow us on Twitter @VZWSupport

  • Why isn't my iPad 2 giving me alerts for my all-day events?

    Why isn't my iPad 2 giving me alerts for my all-day events?  I have alerts set-up for 2 days prior.  My alerts work for other calendar entries where they are set-up for 15mins prior.

    The laptop has a more powerful wifi radio then the iPad. Try getting closer to the location where iPad can connect.

  • I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.   Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.
    Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • Query for getting all function and procedure inside the packages

    hi All
    Please provide me Query for getting all function and procedure inside the packages
    thanks

    As Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
    If you are looking for the packaged procedures and functions source then use user_source data dictionary
    select a.object_name,a.procedure_name from user_procedures a,
                  user_objects b
    where a.object_name is not null
    and a.procedure_name is not null
    and b.object_type='PACKAGE'        
    and a.object_name=b.object_name

  • Function module or BAPI for getting all the Idoc numbers of a sales order

    Hi Folks,
    Is there any function module or BAPI exists for getting all the Idoc numbers which are generated for a Sales order.
    Thanks in advance.
    Regards,
    Sarath.....

    Hi Sarath,
    try this function module...
    BAPI_IDOCAPPL_DISPLAY
    Regards,
    Prabhudas

  • Does anyone besides me find it odd that calendar.app assigns a start time for an all day event?

    Does anyone besides me find it odd that calendar.app assigns a start time for an all day event?

    Hi SharpBud,
    The date for all day event stored in SQL in GMT time, the start time for an all day event returns the start time in GMT time, which is not the current time most likely.
    This is a confirmed issue, as a workaround, I would suggest you to use a calculate column for the event for the column, using the following format:
    IF(TEXT(([End Time]-[Start Time])-TRUNC(([End Time]-[Start Time]),0),"0.000000000")="0.999305556",IF([Start Time]=ROUND([Start Time],0),[Start Time],DATE(YEAR([Start Time]),MONTH([Start
    Time]),DAY([Start Time])+1)),[Start Time])
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Function module for getting starting day of a week form current data

    Hi ,
    Is there any function module that gives starting day of week when we give a particular date
    eg: today date is 19-12-2007
    if i give this date as input i should get 16-12-2007 because this is starting day of this week .

    Hi,
    Use FM  GET_WEEK_INFO_BASED_ON_DATE
    You will get the first day of the week in export parameter MONDAY
    Lokesh

  • How do i get all day events to show up in iOS7 notification center?

    Hi,
    How can I get events designated as "All Day" in Calendar to show up in my notification center on iOS7? I'm using an iphone 5 and all other features seem to be working. Thanks much.
    Adam

    Try going to settings - notification center - and turn on Daily calendar view

  • How do I get all day events to show back up in my notification center after iOS8 update?

    I have a iPhone 5, with iOS 8, 16GB
    OK, none of my calender events are showing up in my notification center, and I have all type's of events on my calender, I have tried going in to my settings < then notifications < then calender < now, on this screen it shows that I am allowing notifications, so I went to upcoming events < and everything on this screen is on, I don't know what to do. How do I fix this? Can someone please help me?

    Unfortunately, iOS 7 and iOS 8 do not show All-day-events in the Notification Centre.
    Try to do a search within the forums or just google it and you will see that this is how ios7 and 8 have been designed from the start, and a major issue in my opinion.
    How do you add your All-Day calendar events to Notification Center in iOS 7?
    iOS 7 Notification Center does not show all-day events
    How do I see my all-day events in Notification Center?
    http://forums.macrumors.com/showthread.php?t=1751494
    http://forums.macrumors.com/showthread.php?t=1594792

  • Can I leave the display open for say all day while downloading torrent file

    Sometimes it takes all day to download a torrent file can i leave the display on or should i turn it off and will my macbook keep downloading the file thank you

    It's fine to leave it on but you can also just set the display to go to sleep and let your computer keep working. The settings are under *System Preferences* in *Energy Saver*. I usually have mine turn off after 15 minutes so it will rest while my download or other work continues.

  • Getting last-day-of-week dates within certain date range

    Hi all,
    I have the following Challenge:
    I want to know the dates of the last day of all the weeks within a certain range of dates.
    For instance if my range would be 01-jun-2002 - 31-jun-2002
    then the returned days should be (lastday of the week is sunday):
    . 02-jun-2002
    . 09-jun-2002
    . 16-jun-2002
    . 23-jun-2002
    . 30-jun-2002
    I want to accomplish this by only using sql (no pl/sql) in a ora 8.0.x rdbms
    How would I do this? (if it's possible)
    Tia,
    Martin

    Christian's solution returns
    01-JUN-02
    08-JUN-02
    15-JUN-02
    22-JUN-02
    on my system. The first day of the week is dependent on NLS settings.
    SELECT MAX(realdate)
    FROM (
    SELECT TO_CHAR(TO_DATE('31-may-2002','dd-mon-yyyy') + ROWNUM,'IW') weekno,
           TO_DATE('31-may-2002','dd-mon-yyyy') + ROWNUM realdate
    FROM all_objects
    WHERE rownum <= TO_DATE('30-Jun-2002','dd-mon-yyyy') - TO_DATE('01-Jun-2002','dd-mon-yyyy')
    GROUP BY weeknoThe IW format model give ISO standard week numbers and a week always starts on Monday.

  • How do I get the day of week labels back in ICal 5.0.1?

    In "Week" view the day of the week is no longer displaying under the date. I can't find a preference setting to get it to display. Any ideas? Thanks.

    If the issue is limited to your user account try starting up in Safe Mode  (It will take more time to startup because it runs a directory check.)
    If your apps functions correctly that way, go to System Preferences >> Accounts >> Login Items and remove them. Boot normally and test. If not go to/Users/yourname/Library/Contextual Menu Items and move whatever is there to the desktop. Then do the same with /Library/Contextual Menu Items. Lastly, try moving/Users/yourname/Library/Fonts to your desktop.
    * Go to your Finder "Go" menu hold the option key to choose "Library"
    Log out/in or restart, if that sorts it start putting items back one at a time until you find the culprit.

  • Script for getting all windows Drives freespace information

    Hi All,
    Any can post the batch script to get the disk drives freespace info for multiple servers.
    Cheers,
    Govind

    This is not an Oracle Database question, so it really does not belong in this forum. You can query the WMI database in each server to find the information. Try the following search on Google:
    hey scripting guy free disk spaceCharles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

Maybe you are looking for

  • Unable to find BP properties

    Hi i am trying to create Business Patrner using DIAPI. How can i set the following properties? Field                   Tab Alias Name              General Unified Federal Tax ID  General Holidays                Payment Terms Title                   C

  • Setting up a New Site and Having Issues with Flash SWF's

    Hello.  I just set up a new site definition, with a testiing server using MAMP Pro, and everything seems to be functioning properly, except that my swf's are not showing up when you publish to a browser from dreamweaver, instead you get the place hol

  • How can I prevent sudden shutdown of my BlackBerry Bold 9780 during cmaera usage?

    My BlackBerry shuts down after taking 2 or 3 photos. Don't think battery is the issue as there's no problem with normal usage for calling or texting. Can usually last a few days without charging.

  • More info about Jdev 10g, where to get

    Hi all, I have done some jDev 10g tutorials for jsp, j2ee, struts. When i started to write some code on my one many problems appeared. So i am interested, where to get info, documentation or how to work with jdev 10g. To get questions like : -What is

  • Error in Connection BAM from JDEV

    Hi: I am trying to connect BAM through JDeveloper. I am able to create the connection but when I am trying to create a sensor action (to get the data objects from the server) , I am getting the error "Cannot Open The Connection" . I am accessing the