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

day for the given date

Former Member
0 Likes
1,090

Hi all,

Is there any FM available to find the day (Ex. Thursday) for the given date (08.05.2008).

Regards,

Shanthi

Hi all,

Is there any FM available to find the day (Ex. Thursday) for the given date (08.05.2008).

Regards,

Shanthi

6 REPLIES 6
Read only

Former Member
0 Likes
1,050

Use fm DATE_TO_DAY.


DATA : V_DATE LIKE SY-DATUM,
       V_DAY LIKE DTRESR-WEEKDAY.


 V_DATE = SY-DATUM.

CALL FUNCTION 'DATE_TO_DAY'
  EXPORTING
    DATE          = V_DATE
 IMPORTING
   WEEKDAY       =  V_DAY
          .

WRITE : V_DAY. 

Regards,

Santosh

Read only

Former Member
0 Likes
1,050

USe the Function HRIQ_GET_DATE_DAYNAME,

Import parameters               Value

 LANGU                           E
 DATE                            20080508
 CALID                           01


 Export parameters               Value

 DAYNR                           4
 DAYTXT                          Thursday
 DAYFREE

Read only

Former Member
0 Likes
1,050

You can check this Function also.

ISP_GET_WEEKDAY_NAME

Import parameters               Value

 DATE                            20080508
 LANGUAGE                        E
 WEEKDAY_NUMBER


 Export parameters               Value

 LANGU_BACK                      E
 LONGTEXT                        Thursday
 SHORTTEXT                       TH

Read only

Former Member
0 Likes
1,050

Hello,

See the fm DAY_ATTRIBUTES_GET and WEEKDAY_GET.

Regards,

Read only

Former Member
0 Likes
1,050

Hi,

Have a look on the following code

data: date1(10) type c.

CALL FUNCTION 'DATE_TO_DAY'

EXPORTING

date = '20080508' "sy-datum

IMPORTING

WEEKDAY = date1.

Reward,if useful.

Thanks,

Chandu