Skip to Content
author's profile photo Former Member
Former Member

Date

Hye techies,

I have 2 requirements.

1. I want to know the current week in a year if i input a date. Example if i enter 01.01.2007 then the output should be 1.

2. I want to knw the day for the entered date.

thanks in advance.

Regards,

Imran.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

13 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:19 AM

    Hi,

    With the help of this function you can get the current week according to date...

    data: date1 type sy-datum.

    date1 = '20080205'.

    data: week1 type scal-week.

    CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'

    EXPORTING

    DATE = date1

    IMPORTING

    WEEK = week1.

    • MONDAY = monday1

    • SUNDAY = sunday1.

    write:/ week1 .

    Thanks & Regards

    Ashu Singh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 25, 2008 at 07:13 AM

    hi Imran,

    1. HRIQ_DATE_GET_WEEK (for the aboe example you'll get 200701)

    2. ISP_GET_WEEKDAY_NAME (you have to add the language as well)

    hope this helps

    ec

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 25, 2008 at 07:14 AM

    Hi,

    Check these FM's.

    GET_WEEK_INFO_BASED_ON_DATE or DATE_TO_DAY

    DATE_TO_DAY

    thanks,

    Ananth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:14 AM

    Hi,

    1] Date_Get_Week FM which will give output as yearweek

    2] Date_to_dat FM which will give output day.

    Thanks

    Sudharshan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:15 AM

    Hi Imran,

    Check these funciton modules.

    DATE_GET_WEEK : Returns week for a date

    DATE_TO_DAY : Returns the Day for the entered date.

    DATE_COMPUTE_DAY : Returns weekday for a date

    Hope this helps you.

    Regards,

    Chandra Sekhar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:16 AM

    Hi,

    Use these FMs

    1) GET_WEEK_INFO_BASED_ON_DATE

    2) DAY_IN_WEEK

    \[removed by moderator\]

    Bhupal

    Edited by: Jan Stallkamp on Jul 25, 2008 11:03 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 25, 2008 at 07:17 AM

    hi,

    For your requirements use the following function modules.

    GET_WEEK_INFO_BASED_ON_DATE or DATE_GET_WEEK for week.

    DAY_IN_WEEK for day.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:18 AM

    Hi,

    To get the Day of particular Date use

    FM

    Date_compute_day.

    For Week use FM

    Date_get_week.

    Regards,

    Sujit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:18 AM

    Hi Imran,

    Chk the FM's:

    RH_GET_DATE_DAYNAME

    return the day based on the date provied

    DATE_GET_WEEK

    will return the week that a date is in.

    DAY_ATTRIBUTES_GET

    Return useful information about a day. Will tell you the day of the week as a word (Tuesday), the day of the week (2 would be Tuedsay), whether the day is a holiday, and more

    With luck,

    Pritam.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 07:25 AM

    Hi,

    Check the following Functional modules,it will help you.

    DATE_GET_WEEK : Returns week for a date

    DATE_TO_DAY : Returns the Day for the entered date.

    Hope it is helps.

    Regards,

    T.D.M.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.