on 2022 Jan 19 3:43 PM
DATA: lv_dec TYPE p descimal 2.
DATA: lv_string TYPE char10.
REPLACE ALL OCCURRENCES OF SUBSTRING ',' IN lv_string WITH ''.
lv_dec = lv_string.
Test 01 - success
input ---- >lv_string = 1,123
output ---->lv_dec = 1123.00
Test 02 - Fail
input ---- >lv_string = 178,862
output ---->lv_dec = Error
Why test 02 fail , how to make Test 01 and Test 02 both work ?
There is a hidden character at the end of 178,862.
I copied your number from this thread to my code and when I checked in debug, it says 7 characters(as shown in my screenshot), when there is obviously 6. If you use arrow key to check each numbers, at the end it looks like there is a hidden character.
Please re-enter your number 178,862 properly. It solved the issue for me and no more dump.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
112 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.