cancel
Showing results for 
Search instead for 
Did you mean: 

function module that gives day if u enter the date

Former Member
0 Kudos

cud any one pls tel me function module that gives day if u enter the date

Accepted Solutions (0)

Answers (7)

Answers (7)

former_member787646
Contributor
0 Kudos

Hi

FM: DATE_TO_DAY

Hope it helps.

Murthy

former_member387317
Active Contributor
0 Kudos

Hi praveen kumar,

PARAMETERS : P_DATE1 LIKE SY-DATUM.

DATA : DATTEXT1 TYPE HRVSCHED-DAYTXT.

CALL FUNCTION 'RH_GET_DATE_DAYNAME'
  EXPORTING
    LANGU                     = 'E'
    DATE                      = P_DATE1
*   CALID                     =
 IMPORTING
*   DAYNR                     =
   DAYTXT                    = DATTEXT1
*   DAYFREE                   =
 EXCEPTIONS
   NO_LANGU                  = 1
   NO_DATE                   = 2
   NO_DAYTXT_FOR_LANGU       = 3
   INVALID_DATE              = 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 : P_DATE1 , DATTEXT1.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

Former Member
0 Kudos

Date, Month and Popup Related Function Modules

Date/Month Related Function Modules:

DATE_COMPUTE_DAY u2013 Finds day of the month

DATE_CONV_EXT_TO_INT - user formatted date is converted to system date

DATE_GET_WEEK - convert date into year + week format

DATE_TO_DAY u2013 gives weekday from date

DATE_IN_FUTURE u2013 takes number of days and date - gives future date in user format and system format

MONTH_PLUS_DETERMINE u2013 add or subtract month from a date

RP_CALC_DATE_IN_INTERVAL or

RP_CALC_DATE_IN_INTERVAL_SG u2013 add/subtract year/month/days from a date

WEEK_GET_FIRST_DAY u2013 take input as YYYYWW and it gives first day of the week.

MONTH_NAMES_GET u2013 language is only parameter. Returns internal table with months.

MONTH_PLUS_DETERMINE u2013 subtract months from date

Former Member
0 Kudos

Hi!

Use these function modules

DATE_COMPUTE_DAY

DATE_TO_DAY

Regards

Abhijeet

Former Member
0 Kudos

Date_compute_day

Check the link for sample code-

http://www.saptechies.com/fm-to-get-the-day-for-a-particular-date/

Former Member
0 Kudos

Hi

USe function module

DAY_ATTRIBUTES_GET

Also go through the link given below :

https://www.sdn.sap.com/irj/sdn/forums#

With Regards

Nikunj Shah

Former Member
0 Kudos

Hi Praveen,

Check this FM:

RH_GET_DATE_DAYNAME

return the day based on the date provied

with luck,

pritam.