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 validation with user settings

sudipDas
Explorer
0 Likes
676

Hi

Im uploading data from the excel file to internal table . Im facing the below mentioned problem in validation checking -

1. I need to check date provided in the excel sheet is aligned with user format or not. If not stop processing.

i.e If the user has dd/mm/yyyy as his setting then he will upload the file using this setting. If the setting in the file is set to say mm/dd/yyyy, then it will fail if the user setting is dd/mm/yyyy

same way I need to validate the amount field. As pert th user setting I need to check ',' or '.' for thousand separator.

PLease help me out ...

2 REPLIES 2
Read only

Former Member
0 Likes
564

Hi

Date format in user setting can get using function module SLS_MISC_GET_USER_DATE_FORMAT. Check whether the date input is in this format using String pattern Match eg CS

Read only

Former Member
0 Likes
564

Hi,

You can try using these function modules:

DATE_CONVERT_TO_FACTORYDATE

CONVERT_DATE_TO_EXTERNAL -To Convert date from SAP format to User-specified format

CURRENCY_AMOUNT_SAP_TO_DISPLAY - To Convert currency from SAP format to User-specified format