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

Function module

Former Member
0 Likes
587

Hi Gurus,

I have a requirement in my code where I need to find the day on which 2nd December falls in the year 1982, and likewise.

Is there any function module for this in SAP ?

Please reply.

Regards,

Binay.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
561

Yes, Use FM DATE_TO_DAY

<REMOVED BY MODERATOR>

Regards,

Tanmay

Edited by: Alvaro Tejada Galindo on Jan 9, 2008 8:31 AM

5 REPLIES 5
Read only

Former Member
0 Likes
562

Yes, Use FM DATE_TO_DAY

<REMOVED BY MODERATOR>

Regards,

Tanmay

Edited by: Alvaro Tejada Galindo on Jan 9, 2008 8:31 AM

Read only

former_member188829
Active Contributor
0 Likes
561

Hi

Use the function module..

DAY_ATTRIBUTES_GET

Read only

Former Member
0 Likes
561

Hello,

Check FM DAY_IN_WEEK.

Regards,

John.

Read only

Former Member
0 Likes
561

Hi,

Check below FM,

ISH_GET_WEEKDAY_NAME

Thanks and Regards

Read only

Former Member
0 Likes
561

Hi Shankar,

The following might help u out..

Use the FM 'DATE_COMPUTE_DAY' .

Example:

clear: hold_day_of_week.

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

WHEN OTHERS.

hold_day_of_week = 'invalid'.

ENDCASE.

<REMOVED BY MODERATOR>

Thankyou,

Regards.

Edited by: Alvaro Tejada Galindo on Jan 9, 2008 8:32 AM