Skip to Content

week text with input date

hi all,

plz help....if i give input date as 26.05.2009

output should be TUESDAY.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

10 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 06:37 AM

    Hi,

    Use this FM 'GET_WEEK_INFO_BASED_ON_DATE'

    DATE_TO_DAY

    Regards,

    Jyothi CH.

    Edited by: Jyothi Chinnabathuni on May 26, 2009 12:09 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 26, 2009 at 06:37 AM

    Use Fm DAY_IN_WEEK to get the numeric value of the day of the week.

    Then use FM WEEKDAY_GET to get the text of the week based on week number.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 26, 2009 at 06:48 AM

    hi

    use this function module

    in p_date u pass the input value which u hav given in selection screen

    CALL FUNCTION 'RH_GET_DATE_DAYNAME'

    EXPORTING

    langu = EN

    date = p_date

    IMPORTING

    DAYTXT = result

    .

    IF sy-subrc <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 06:53 AM

    Hi,

    Check the fm: DATE_TO_DAY.

    Naveen M.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 07:04 AM

    Hi,

    Use the Function module ISP_GET_WEEKDAY_NAME

    Translate the week name to upper case.

    data: v_date type sy-datum value '20090526',

    v_text type T246-LANGT.

    CALL FUNCTION 'ISP_GET_WEEKDAY_NAME'

    EXPORTING

    DATE = v_date

    language = 'E'

    IMPORTING

    LONGTEXT = v_text

    EXCEPTIONS

    CALENDAR_ID = 1

    DATE_ERROR = 2

    NOT_FOUND = 3

    WRONG_INPUT = 4

    OTHERS = 5

    .

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    write:/ v_text.

    translate v_text to upper case.

    write:/ v_text.

    Regards,

    Kumar Bandanadham

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 06:36 AM

    Hi,

    use function module: DATE_TO_DAY

    regards,

    Prinan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 07:13 AM

    Hi,

    Use this FM - ISH_GET_DAY_OF_WEEK

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2009 at 07:18 AM

    Hi Vamshi,

    You can try this

    *to calculate particular day No for any give date.
        CALL FUNCTION 'DATE_COMPUTE_DAY'
          EXPORTING
            DATE = SY-DATUM " any date
          IMPORTING
            DAY  = DAYNO. " 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.
    
    -------------------------Or---------------------------
    *To Calculate particular day No for any given date
            CALL FUNCTION 'DAY_IN_WEEK'
              EXPORTING
                DATUM = SY-DATUM " Any date
              IMPORTING
                WOTNR = DAY. " Day no for a giveN date
    

    Thanks & regards,

    Dileep .C

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 26, 2009 at 10:04 AM

    Hi all,

    Thanks for your valuable sollutions, but its not meeting my requirement exactly.....

    my exact requirement is to find the week no in that month with the given date.

    eg 25.05.2009 is date then it comes under 4th of the may nonth.

    but as per the requirement am

    calculating from saturday as 1st day and friday as 7th day of the week...

    kindly plz reply if any other way to get my result....

    thanks & regards

    vamsi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 26, 2009 at 10:20 AM

    helpful

    thank you very much

    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.