‎2007 Apr 30 9:28 AM
hi All,
I want to convert date from this format 01/2007 to January 2007. Is there any FM for performing this operation.
regards,
Navneeth.K
‎2007 Apr 30 9:30 AM
Hi,
u can use FM : <b>'CONVERSION_EXIT_PDATE_INPUT'</b>
<b>plz reward points if helpful or if it solves ur query.</b>
Thanks
Chinmay
‎2007 Apr 30 9:31 AM
hi
Check this info.
Use function module CONVERT_DATE_TO_EXTERNAL. This will convert the date to the user specific format. So if your user specific format is MMM YYYY, then this is all you need.
Look at the function moduel MONTH_NAMES_GET It returns all the month and names in repective language
Hope this resolves your query.
Reward all the helpful answers.
Regards
Nilesh
‎2007 Apr 30 9:32 AM
hi Naveen,
Try this
REPORT ychatest1.
TABLES : t247.
DATA : v_date(7) VALUE '01/2007',
v_ltx LIKE t247-ltx,
v_date1(25).
SELECT SINGLE ltx FROM t247 INTO v_ltx WHERE mnr EQ v_date+0(2) AND spras EQ sy-langu.
CONCATENATE v_ltx v_date+3(4) INTO v_date1 SEPARATED BY space.
WRITE : / v_date1.
‎2007 Apr 30 9:34 AM
hi,
try these fm's
CONVERSION_EXIT_LDATE_OUTPUT,
CONVERSION_EXIT_SDATE_OUTPUT,
CONV_EXIT_LDATE_OUTPUT_LANGU.
‎2007 Apr 30 9:35 AM
Hi Navneeth,
you can simply make use of offsets...
Example: v_date(7) type c,
v_year(4) type c.
v_year = v_date+3(4).
Regards,
Phani
‎2007 Apr 30 9:48 AM
Hi navneeth,
1. using some logic and the FM MONTH_NAMES_GET
(for month names in full),
2. we can write some small program for same.
regards,
amit m.
‎2007 Apr 30 9:49 AM
hi,
chk this.
DATA: DATE_CHAR(20).
DATA: DATE TYPE SY-DATUM.
DATA: MONTH_NAME LIKE T247-LTX.
DATE = SY-DATUM.
SELECT SINGLE LTX 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.
WRITE: / DATE_CHAR.
or use this FM
CACS_DATE_GET_YEAR_MONTH : To get the number of the month
MONTH_NAMES_GET: To get month description
Regards
Reshma
‎2007 Apr 30 9:52 AM
REPORT test.
TABLES : t247.
DATA : v_date(7) VALUE '01/2007',
v_ltx LIKE t247-ltx,
v_date_final(30).
SELECT SINGLE ltx
FROM t247
INTO v_ltx
WHERE mnr EQ v_date+0(2)
AND spras EQ sy-langu.
CONCATENATE v_ltx v_date+3(4) INTO v_date1 SEPARATED BY space.
WRITE : / v_date_final.
‎2007 Apr 30 10:01 AM
hi navneeth,
just copy and paste below code.
report zmahi9.
tables : t247.
data : itab like t247 occurs 0 with header line.
data : date like sy-datum,
vdate(15) type c.
parameter : v_date type t247-ltx default '01/2007'.
date = sy-datum+0(4).
select single * from t247
into itab.
concatenate itab-ltx date into vdate separated by space.
write : vdate.
thanks,
maheedhar.t