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

urgent

Former Member
0 Likes
449

hi

checking and validating all date fields (recognizing its format) and formats it into YYYYMMDD..is there any function module to convert the date format is YYYYMMDD.user in different countrys give the date as different...

example:US user give diffrently,and ASIA user give the data format is diffrent.so,is there any FM to identify all the date formats?and give give the date format as YYYYMMDD..

thanks

3 REPLIES 3
Read only

Former Member
0 Likes
422

use the fm:

CONVERT_DATE_TO_INTERN_FORMAT

SAMPLE USAGE:

call function 'CONVERT_DATE_TO_INTERN_FORMAT'

exporting datum = '12/12/2006'

dtype = 'DATS'

importing idate = v_date. "v_date should be of type sy-datum or chracter field of length 8

Regards,

Ravi

Message was edited by:

Ravi Kanth Talagana

Read only

rahulkavuri
Active Contributor
0 Likes
422

hi

Please u can use the following

CONVERT_DATE_TO_INTERNAL for converting the date from external format to inernal format

CONVERT_DATE_TO_EXTERNAL for converting the date from internal format to external format

By the way this process will automatically convert the date into Internal format of the system, award points if found helpful

Read only

Former Member
0 Likes
422

Dear skk,

Try this Function Module:

<b>DATE_CHECK_PLAUSIBILITY</b> (Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.)

Regards,

Abir

************************************

  • Don't forget to award Points *