‎2006 Jul 27 11:29 AM
Can any body tell me how to change the sap internal date format to charformat.
ex: 20061231 -> 31 Dec 2006
‎2006 Jul 27 11:32 AM
Hi pavan,
1. we can use the FM CONVERSION_EXIT_SDATE_OUTPUT
2. it will output the date in
dd-mon-yyyy format only.
regards,
amit m.
‎2006 Jul 27 11:32 AM
Hi pavan,
1. we can use the FM CONVERSION_EXIT_SDATE_OUTPUT
2. it will output the date in
dd-mon-yyyy format only.
regards,
amit m.
‎2006 Jul 27 11:32 AM
HI,
this is FM to do it.
<b>
data: out(20).
data: date type sy-datum value '20061231'.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = date
IMPORTING
OUTPUT = out.</b>output will be 31 Dec 2006
Regards,
Wasim Ahmed
Message was edited by: Wasim Ahmed
‎2006 Jul 27 11:33 AM
hi,
Use Fm <b>'CONVERSION_EXIT_SDATE_OUTPUT'</b>
data: date type sy-datum, text(20).
date = sy-datum.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = date
IMPORTING
OUTPUT = text
.
‎2006 Jul 27 11:32 AM
‎2006 Jul 27 11:33 AM
1)use table t247 with elect logic...
parameters: date like sy-datum.
data: begin of itab occurs 0,
SPRAS type SPRAS,
MNR LIKE T247-MNR,
KTX LIKE T247-KTX,
LTX LIKE T247-LTX,
end of itab.
DATA : month LIKE T247-MNR.
DATA: YEAR(4).
DATA: FINAL(18).
DATA: DAY(2).
DAY = DATE+6(2).
MONTH = DATE+4(2).
YEAR = DATE+0(4).
select SINGLE * from t247 into itab where mnr = month
AND SPRAS = 'E'.
APPEND ITAB.
CONCATENATE DAY ITAB-KTX YEAR INTO FINAL SEPARATED BY '-'.
WRITE: FINAL.
2)WRITE SY-DATUM DDMMMYYYY.
?
<b>There are various conversion exits you can use, search SE37 with 'CONVERSION_EXIT_DAT_OUTPUT'.</b>
‎2006 Jul 27 11:33 AM
hello,
Use FM: MONTH_NAMES_GET
then do the concatenate.
regards,
Naimesh