‎2008 Jul 07 6:28 AM
Hi all,
My requirement is to print thae date in following format .
Tuesday, April 15, 2008
Is there any function module for the same?
Or i ll have to write the code for the same.
Please gimme the logic for the same.
Points will be rewarded .
Thanks in advance,
Amruta.
‎2008 Jul 07 6:30 AM
Use FM: CONVERSION_EXIT_LDATE_OUTPUT for your requirement.
Regards,
Dara.
‎2008 Jul 07 6:34 AM
Hi,
Use FM CONVERSION_EXIT_LDATE_OUTPUT.
Put input date as YYYYMMDD. You shoud get the desired output.
Regards,
Lalit
‎2008 Jul 07 6:37 AM
you can use two fn modules . Here I am giving some example code it may be helpful for you
data : dateout(30),
day like DTRESR-WEEKDAY .
parameters : p_date like sy-datum.
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
INPUT = p_date
IMPORTING
OUTPUT = dateout .
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
DATE = p_date
IMPORTING
WEEKDAY = day
.
.
write : / day , dateout.
‎2008 Jul 07 6:40 AM
Hi Amruta,
the below FM definitely gives you the perfect solution.
Use the FM as below..
data:
l_wa_date type casdayattr,
l_i_date type standard table of casdayattr initial size 0.
call function 'DAY_ATTRIBUTES_GET'
exporting
date_from = sy-datum
date_to = sy-datum
language = sy-langu
tables
day_attributes = i_date
exceptions
factory_calendar_not_found = 1
holiday_calendar_not_found = 2
date_has_invalid_format = 3
date_inconsistency = 4
others = 5.
after executing this code you will get the day, month and year of SY-DATUM in the table i_date. Then use below code....
read table l_i_date into l_wa_date index 1.
in the 'l_wa_date' use the 'day_string' which has string as 'Monday, July 07, 2008'.
Please rewards if it helps....