Application Development 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: 

Fm to get week day

Former Member
0 Kudos

I want to get the week day (monday, tuesday etc) like that while give input as a date if there is any function module there to convert this things

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi use FM HRIQ_GET_DATE_DAYNAME.

Thanks,

rajinikanth

12 REPLIES 12

Former Member
0 Kudos

Hi use FM HRIQ_GET_DATE_DAYNAME.

Thanks,

rajinikanth

Former Member
0 Kudos

data:WEEKDAY type T246 .

parameters:p_test type sy-subrc .

data: it_WEEKDAY type t246 occurs 0 with header line .

CALL FUNCTION 'WEEKDAY_GET'

EXPORTING

LANGUAGE = SY-LANGU

IMPORTING

RETURN_CODE = p_test

TABLES

weekday = it_WEEKDAY .

write:/ it_weekday-LANGT .

/thread/270656 [original link is broken]

Former Member
0 Kudos

Use Function Module 'ISH_GET_DAY_OF_WEEK' . get the day in the parameter DAY_TXT.

sachin_mathapati
Contributor
0 Kudos

Hi John,

Try this FM

RH_GET_DATE_DAYNAME

Reward points if helpful.

Regards,

Sachin M M

Former Member
0 Kudos

Hi,

Use FM

'DATE_TO_DAY'

.,

For further info:

Regards,

Shailaja

Edited by: Julius Bussche on Jul 31, 2008 9:34 AM

Former Member
0 Kudos

try:

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.

Former Member
0 Kudos

Hi John,

Here IS the code to get the day of the particular date..

I hope it helps u..

data: date1 type SCAL-DATE.

data: day1 type SCAL-INDICATOR.

date1 = sy-datum.

CALL FUNCTION 'DATE_COMPUTE_DAY'

EXPORTING

date = date1

IMPORTING

DAY = day1.

write:day1.

Thanks & Regarsd

Ashu Singh

Former Member
0 Kudos

call function 'date_compute_day.
  import.
    date = w_date.
  export.
    day = w_day.
endfunction.

   case w_day
      when 1.
         w_day_1 = 'monday'.
......

     when 7.
         w_day_1 = 'sunday'.
   endcase.

regards

Sunil Kumar Mutyala

Former Member
0 Kudos

try this function module DATE_TO_DAY

Former Member
0 Kudos

Hi John,

Try the following:

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'.

ENDCASE.

Regards,

Chandra Sekhar

Former Member
0 Kudos

Hi John.

I would like to suggest,

RH_GET_DATE_DAYNAME

Input parameters - Language, Date, CALID.

CALID is not MANDATORY.

Output parameters - Day Number and Day Name.

You can test the function module by pressing Execute.

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Former Member
0 Kudos

Hi John,

Use FM "FTR_DAY_GET_TEXT"

Here give date in below format

Parameter PI_DATE = 31072008

Hope it will help you.

Regards,

Aparna