Validating date in the format 081703 - possible?

1个回答

  • Hi,There is no way for a function module to know what is the format for sure, unless you specify it. 010203 for example could mean several things. Since you know exactly the format of the date (MMDDYY), putting it back in the right order (YYMMDD) would only take one line:Code: Select allCONCATENATE l_date+4(2) l_date(2) l_date+2(2) INTO l_new_date.So, even if there is a function module that does it, I'm not sure what more it could accomplish.As for the century, you could code the requirement very easily, but if you want to use the SAP logic, call the function CONVERSION_EXIT_GJAHR_INPUT with your 2 digit year and it will convert it in a 4 digit year. It'll add '20' if it's under 50 and '19' if it's 50 or more. That's the standard way a 2 digit fiscal year will be processed in SAP.I hope this helps. 查看原帖