2012 Dec 18 5:49 AM
Hi there,
I am using function CONVERT_DATE_TO_INTERNAL and am confronted with an error at:
CALL 'DATE_CONV_EXT_TO_INT'
ID 'DATINT' FIELD h_date_internal
ID 'DATEXT' FIELD h_date_external.
I am passing external date value 20130101 and receiving nothing back.
When i pass any 2012 date, e.g 20121212 the conversion results in internal date value 12121220.
Has anyone attempted to use this function for 2013 dates yet?
2012 Dec 18 5:53 AM
The internal date format is YYYYMMDD. The value you are passing - 20130101 - is already in the internal format. You can see exception DATE_EXTERNAL_IS_INVALID being raised by the FM.
Try passing 01012013 or 01.01.2013 and you will get the correct result.
2012 Dec 18 5:53 AM
The internal date format is YYYYMMDD. The value you are passing - 20130101 - is already in the internal format. You can see exception DATE_EXTERNAL_IS_INVALID being raised by the FM.
Try passing 01012013 or 01.01.2013 and you will get the correct result.
2012 Dec 18 6:12 AM
Hi Please Specify the Correct Date Formate.
I have Done what you have mentioned and its working fine Withoout any Problem.
Kindly Check Your input to the Fm.
Regards,
Amit
2012 Dec 18 6:15 AM
hi,
SAP's internal date format is YYYYMMDD so the functional module you are using is for converting any format to internal. So be clear about your input.
Hope it helps,
Vinoth
2012 Dec 18 6:18 AM
Hello Brendan,
Kindly correct your date format, If you pass the Date in YYYYMMDD format then it will give error as this FM itself convert Date in internal format YYYYMMDD. You could either try 01012013 or 01/01/2013 or any format other that YYYYMMDD.
Chk below screen shot.
rgds,
Deepti
2012 Dec 18 6:25 AM
Hello frnd,
try this out...it works...!
************CONVERT DATE FORMAT FROM YYYMMDD TO DDMMYYY**********************
DATA: YY(4) TYPE C,
DD(2) TYPE C,
MM(2) TYPE C.
DATA: DATE2(10) TYPE C.
DD = SY-DATUM+6(2).
MM = SY-DATUM+4(2).
YY = SY-DATUM(4).
CONCATENATE DD MM YY INTO DATE2 SEPARATED BY '.'.
2012 Dec 18 6:33 AM
Thank you for the swift responses.
You are correct, we were previously using HTML and therefore we had to perform the date validation check at the module level so we were passing through the internal date in this format and effectively validating twice.
It is interesting because we have used this module for many years and it does not occur until 2013 as it views 13 as an invalid month whereas it viewed the 12 in 2012 as the month and would therefore pass back 12121220 (itself an incorrect date!).
Again, thanks for the advice.