11-28-2007 5:49 AM
Can any one plz tell FM for converting date 01012007 to JAN-07 and so on.
11-28-2007 5:53 AM
SELECT SINGLE kTX FROM T247
INTO MONTH_NAME
WHERE SPRAS = SY-LANGU
AND MNR = SY-DATUM+4(2).
CONCATENATE SY-DATUM+6(2) MONTH_NAME SY-DATUM(4)
INTO DATE_CHAR SEPARATED BY SPACE.
or FM
CONVERSION_EXIT_SDATE_OUT.
Regards,
Amit
Reward all helpful replies.
11-28-2007 5:54 AM
Hi,
I am not sure whether there is FM. But you can do it manually.
Use case statment for month and assingn the MONTH in charaters and then concatenate all.
example.
data: l_MM type char2,
l_date type sy-datum.
move l_date+2(2) to l_mm.
Case l_mm.
when '01'.
l_month = 'JAN'.
....
Reward points if useful,
Regards,
Niyaz
11-28-2007 6:01 AM
Hi,
There is a FM CONVERSION_EXIT_SDATE_OUTPUT to do that.. just check it.
data: date type sy-datum, text(20).
date = sy-datum.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = date
IMPORTING
OUTPUT = text
.
Regards,
Omkar.