‎2006 Jul 28 8:08 AM
Hi experts,
Is there any FM existing to convert
25-APR-06 this date format to <b>25.04.2006</b>.
Reward guaranteed
thanks
kaki
‎2006 Jul 28 8:19 AM
Use these function module
25-APR-06.. separator here should be in ur own system format
CONVERSION_EXIT_SDATE_INPUT
to convert to sy-datum format..
now pass the this date to
CONVERSION_EXIT_PDATE_OUTPUT
to get 25.04.2006 format
Regards,
Viven
‎2006 Jul 28 8:11 AM
Hi kaki,
1. There is no direct FM for it.
2. But using some logic, we have to
convert it by ourselves.
3. The main tricky part
is getting the MONTH NAME
4. This code will help u a little,
for getting atleast, the month name.
5.
MONTH_NAMES_GET
This is the FM
try this code ( just copy paste)
REPORT abc.
DATA : mname(10) TYPE c.
PARAMETER : d TYPE sy-datum.
PERFORM getmonth USING d mname.
WRITE 😕 mname.
&----
*& Form getmonth
&----
text
----
-->M text
-->MNAME text
----
FORM getmonth USING d mname.
DATA : month_names LIKE t247 OCCURS 0 WITH HEADER LINE.
DATA : m(2) TYPE c.
m = d+4(2).
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
IMPORTING
RETURN_CODE =
TABLES
month_names = month_names
EXCEPTIONS
month_names_not_found = 1
OTHERS = 2
.
READ TABLE month_names INDEX m.
IF sy-subrc = 0.
mname = month_names-ltx.
ENDIF.
ENDFORM. "getmonth
regards,
amit m.
‎2006 Jul 28 8:12 AM
CHECK...
<b>CONVERSION_EXIT_SDATE_INPUT</b>
EX-
give input as 20nov2006
output-20112006
‎2006 Jul 28 8:19 AM
Thanks for all the replies...
Thank you viven chandar
fullpoints alloted
cheers
kaki
‎2006 Jul 28 8:12 AM
‎2006 Jul 28 8:19 AM
Use these function module
25-APR-06.. separator here should be in ur own system format
CONVERSION_EXIT_SDATE_INPUT
to convert to sy-datum format..
now pass the this date to
CONVERSION_EXIT_PDATE_OUTPUT
to get 25.04.2006 format
Regards,
Viven