2007 Oct 15 8:07 PM
wantto convert date format into April 16,2007. from the system date in smartforms , can any one write code for the above quration
example system date is 05/05/2007(any format) into April 16,2007.
2007 Oct 15 8:08 PM
Hi,
Check out this code ... might be of some help
DATA: V_INPUT(8) VALUE '20112006'.
DATA: V_CHAR(25).
data: date type sydatum.
DATA: MONTH_NAMES LIKE T247.
SELECT SINGLE * FROM T247
INTO MONTH_NAMES
WHERE SPRAS = SY-LANGU
AND MNR = V_INPUT+2(2).
CONCATENATE V_INPUT(2) MONTH_NAMES-KTX V_INPUT+4(4)
INTO V_CHAR SEPARATED BY SPACE.
write: / V_CHAR.
Regards,
Santosh
2007 Oct 15 8:10 PM
Hi,
Please check Rich's sample code.
report zrich_0001.
data: it247 type table of t247 with header line.
data: output type string.
parameters: p_datum type sy-datum.
call function 'MONTH_NAMES_GET'
tables
month_names = it247.
read table it247 with key mnr = sy-datum+4(2).
concatenate it247-ltx 'X' sy-datum+6(2) ',' 'X' sy-datum+0(4)
into output.
translate output using 'X '.
write:/ output.
Regards,
Ferry Lianto