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: 

function Module

Former Member
0 Kudos

How to get week day in text while give input as date

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use this FM DATE_TO_DAY

data : L_DAY(10).

CALL FUNCTION 'DATE_TO_DAY'

EXPORTING

DATE = P_BUDAT

IMPORTING

WEEKDAY = L_DAY.

I hope this will help you

4 REPLIES 4

Former Member
0 Kudos

Hi,

Use this FM DATE_TO_DAY

data : L_DAY(10).

CALL FUNCTION 'DATE_TO_DAY'

EXPORTING

DATE = P_BUDAT

IMPORTING

WEEKDAY = L_DAY.

I hope this will help you

Former Member
0 Kudos

you need to use two FM's

This Function Module DATE_COMPUTE_DAY will give you the Day from a date . This will be a no 0,1,2,3 etc

and then pass that value to

DAY_NAMES_GET

will give the name of the day

Regards

Santosh K

0 Kudos

to get the date you can use DATE_COMPUTE_DAY fm.

it takes date as >input.

and gives integer representing day as <output.

i am giving you the sample code.

hope i will help you.

DATA : DATE like SCAL-DATE,

DAY LIKE SCAL-INDICATOR.

DATE = '20050728'.

CALL FUNCTION 'DATE_COMPUTE_DAY'

EXPORTING

DATE = DATE

IMPORTING

DAY = DAY.

CASE DAY.

WHEN 1.

WRITE 😕 'MONDAY'.

WHEN 2.

WRITE 😕 'TUESDAY'.

WHEN 3.

WRITE 😕 'WEDNESDAY'.

WHEN 4.

WRITE 😕 'THURSDAY'.

WHEN 5.

WRITE 😕 'FRIDAY'.

WHEN 6.

WRITE 😕 'SATURDAY'.

WHEN 7.

WRITE 😕 'SUNDAY'.

ENDCASE.

Former Member
0 Kudos

Hi,

check these FM

DATE_GET_WEEK,DATE_TO_DAY,DATE_COMPUTE_DAY