Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

date function modules

Former Member
0 Likes
488

what r the fmodules DATE_CONV_EXT_TO_INT and

CONVERT_DATE_TO_EXTERNAL used for.

3 REPLIES 3
Read only

Former Member
0 Likes
425

Hi,

DATE_CONV_EXT_TO_INT convert char type date to date type date format.

Rewards points if it is possible.

Read only

Former Member
0 Likes
425

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.

Read only

Former Member
0 Likes
425

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