‎2007 Oct 12 7:02 AM
Hi all,
Please some one help me to come out of this situation,
On the o/p of the script i have the date format as
I have a date format in (12.10.2007) .
I want the date format should be (Friday,12 October 2007).
Please some one tell me its very urgent.
‎2007 Oct 12 7:05 AM
Hi,
You can use Edit Mask.
Try this FM also,
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = SY-DATUM
IMPORTING
DATE_EXTERNAL = W_DATUM.
You Can use this FM also,
<b>DATA V_MONTH(11).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
INPUT = SY-DATUM
IMPORTING
OUTPUT = V_MONTH.
WRITE:/ 'CURRENT MONTH IN WORDS:', V_MONTH+3(8).</b>
Thanks,
Reward If Helpful.
‎2007 Oct 12 7:12 AM
hi,
Use the fun module
DATE_TO_DAY to get the description of the DAY for that date
Use the fun Module
IDWT_READ_MONTH_TEXT to get the MONTH Text
regards
siva
‎2007 Oct 12 7:19 AM
Use the function module to get the day for the given date: DATE_TO_DAY
Use the Fm to get the month name: MONTH_NAMES_GET.
After getting the above values concatenate the values. If you have any queries please let me know.
‎2007 Oct 12 7:29 AM
hi,
use the both these function modules
convert_date_to_internal, and after that
CONVERSION_EXIT_LDATE_OUTPUT
you will get the desired result.
pls reward if useful..
‎2007 Oct 12 7:34 AM
Hi Niladri,
You can try this Fm "CONVERSION_EXIT_LDATE_OUTPUT".
But the Input Date format should be "20071010" and the output will be "10.October2007"
Use the function module to get the day for the given date: DATE_TO_DAY
Reward if useful!
Regards,
Chitra
‎2007 Oct 12 8:22 AM
Hi Niladri,
I have given u the code.Its working fine as u required.Try this.
REPORT YSP_TEST_PROGRAM_DATE LINE-SIZE 350.
TABLES : T247.
DATA : V_DATE LIKE SY-DATUM,
V_DATE_FULL(09),
V_MONTH(25),
V_DAY(10),
V_FINAL(45).
V_DATE = SY-DATUM.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = V_DATE
IMPORTING
OUTPUT = V_DATE_FULL.
SELECT SINGLE LTX FROM T247 INTO V_MONTH WHERE KTX EQ V_DATE_FULL+2(3)
AND SPRAS = 'E'.
IF V_DATE_FULL0(2) = '01' OR V_DATE_FULL0(2) = '31'.
CONCATENATE V_DATE_FULL+0(2) 'ST' INTO V_FINAL.
ELSEIF V_DATE_FULL0(2) = '02' OR V_DATE_FULL0(2) = '22'.
CONCATENATE V_DATE_FULL+0(2) 'ND' INTO V_FINAL.
ELSEIF V_DATE_FULL0(2) = '03' OR V_DATE_FULL0(2) = '23'.
CONCATENATE V_DATE_FULL+0(2) 'RD' INTO V_FINAL.
ELSE.
CONCATENATE V_DATE_FULL+0(2) ' ' INTO V_FINAL.
ENDIF.
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
date = sy-datum
IMPORTING
WEEKDAY = V_DAY.
CONCATENATE V_DAY ',' V_FINAL V_MONTH INTO V_FINAL SEPARATED BY SPACE.
CONCATENATE V_FINAL V_DATE_FULL+5(4) INTO V_FINAL SEPARATED BY SPACE.
WRITE : / V_FINAL.
Reward if useful.
Thanks,
Shanmugapriya