‎2010 Jun 04 6:06 PM
Hi,
I'm developing a program which uploads data from a text file (.csv) and creates sales orders.
The user inputs material quantity in a format according to his user profile settings. (decimal point might be , or .)
Now I need to check whether the value input is according to the profile settings, if not I include this record in error log.
If value input is in correct format, I need to convert the value entered to SAP internal format (eg: 34,563 to 34.563) before passing it to bapi.
I used function module CATS_NUMERIC_INPUT_CHECK, but it works for nummbers with upto 2 decimal places. But quatity has 3 decimal places.
Please guide me.
Regards,
Ravi
‎2010 Jun 04 6:54 PM
Hi,
You probably reading text file into an internal table (say it_data).
All filed of you internal table should be of type char.
And before uploading it to BAPI or BDC. You should change format according to user profile settings.
Write it_data-mat_qty to lv_mat_qty.
Then this variable lv_mat_qty will have decimal point as per user profile settings.
Ashutosh
‎2010 Jun 04 7:07 PM
‎2010 Jun 22 5:20 AM
the FM: CATS_NUMERIC_INPUT_CHECK works for checking quantity input format also. Don't get confused with decimal format of rate and quantity as they are not same