Hi,
just give 10252006 as the input in the parameter and execute the code .
*----
REPORT ZEX6 .
PARAMETERS: V_DATUM(11) TYPE C.
DATA: V_MON(3) TYPE C,
V_DAT(2) TYPE C,
V_YEAR(4) TYPE C,
V_MONTHNAME(10) TYPE C,
V_FULLDATE(30) TYPE C.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = V_DATUM
IMPORTING
DATE_INTERNAL = V_DATUM
EXCEPTIONS
DATE_EXTERNAL_IS_INVALID = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE V_DATUM+4(2) TO V_MON.
WRITE V_DATUM+6(2) TO V_DAT.
WRITE V_DATUM+0(4) TO V_YEAR.
SELECT SINGLE LTX FROM T247 INTO V_MONTHNAME
WHERE SPRAS = SY-LANGU
AND MNR = V_MON.
CONCATENATE V_MONTHNAME
V_DAT ',' v_YEAR
INTO V_FULLDATE SEPARATED BY SPACE.
WRITE:/ V_FULLDATE.
regards,
Vijay.
Kindly close the thread if ur query is over .
Hi,
Use the FUnction Module..
<b>CONVERSION_EXIT_SDATE_OUTPUT</b>
U will able to get the date in ur format..
25-Oct-2006.
Cheers,
Simha.
Hi,
CONVERSION_EXIT_SDATE_OUTPUT
u can use this fm to get the date as oct/25/2006
split the date as 0ct,
25,
2006
now u need to write a logic as
case when 'JAN'
move 'January' to var.
;;;
;;
when 'OCT' to
move october to var.
endcase.
concatenate var(month text) date ',' year into v_val.
now write v_val . october 25 , 2006
u need to go this way ..
hope this helps ,
Regards,
Vijay
Add a comment