Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

week text with input date

0 Likes
1,560

hi all,

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

output should be TUESDAY.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,499

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

12 REPLIES 12
Read only

Former Member
0 Likes
1,499

Hi,

use function module: DATE_TO_DAY

regards,

Prinan

Read only

GauthamV
Active Contributor
0 Likes
1,499

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.

Read only

Former Member
0 Likes
1,500

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

Read only

0 Likes
1,499

use FM : RH_GET_DATE_DAYNAME

this returns complete day name.

Read only

Former Member
0 Likes
1,499

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.

Read only

Former Member
0 Likes
1,499

Hi,

Check the fm: DATE_TO_DAY.

Naveen M.

Read only

Former Member
0 Likes
1,499

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

Read only

Former Member
0 Likes
1,499

Hi,

Use this FM - ISH_GET_DAY_OF_WEEK

Read only

Former Member
0 Likes
1,499

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

Read only

0 Likes
1,499

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

Read only

0 Likes
1,499

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

Then create Z FM like WEEKDAY_GET or write a simple logic to get the text

of the week based on week number according to your requirement.

Read only

0 Likes
1,499

helpful

thank you very much