2007 Aug 20 6:29 AM
what r the fmodules DATE_CONV_EXT_TO_INT and
CONVERT_DATE_TO_EXTERNAL used for.
2007 Aug 20 6:35 AM
Hi,
DATE_CONV_EXT_TO_INT convert char type date to date type date format.
Rewards points if it is possible.
2007 Aug 20 6:35 AM
HI,
DATE_CONV_EXT_TO_INT will convert the date given by the external system or user input in date field in screens to ur system date format.
CONVERT_DATE_TO_EXTERNAL will convert the internal date format to ur screen date field format.
rgds,
bharat.
2007 Aug 20 6:39 AM
DATE_CONV_EXT_TO_INT - user formatted date is converted to system date
data: date_intern type d,
date_extern(10).
date_extern = 28.03.2000.
CALL DATE_CONV_EXT_TO_INT ID DATINT FIELD date_intern Intern Date ID DATEXT FIELD date_extern. Extern Date
Now the field date_intern will have the value 20000328.
Check the sy-subrc for possible wrong input.
CONVERT_DATE_TO_EXTERNAL - Converts date from system storage format to users specified display format
REPORT ZHAR_1 .
data l_date(10).
data l_datum type sy-datum.
l_datum = '20050815'.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = l_DATUM
IMPORTING
DATE_EXTERNAL = l_date
EXCEPTIONS
DATE_INTERNAL_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: /1 l_date.
reward if useful