2013 Jul 10 6:04 AM
My default user Notation is X.
I have a ALV grid where I show all fields of character type, when the user enters distance (KOMP-DISTZ)
I will convert the input value using RS_CONV_EX_2_IN and display it in terms of distance representation.
Ex: If user enters 10
I will pass that 10 to RS_CONV_EX_2_IN, result value will be 10.000 which I will show 10.000 in the grid and
the same value will be stored in the database.
There is no problem until I don't change my user settings, but when I change my decimal notation in defaults TAB of
user settings to space or Y.
When changed to space::
If I pass same value 10.000 to RS_CONV_EX_2_IN it is returning as 10000.000
When changed to Y::
If I pass same value 10.000 to RS_CONV_EX_2_IN it is returning exception INPUT_NOT_NUMERICAL
Note:::: When maintaining the values in the grid my default setting for decimal notation is X.
If I pass same value 10.000 to RS_CONV_EX_2_IN it is returning 10.000
How do I avoid this ?
2013 Jul 10 6:46 AM
Hi,
I don't understand your problem ..
If you select Y setting, the dot is not a valid option, so use the coma ...
regads
Fred
2013 Jul 10 7:02 AM
Hi Kishore
When the setting is X the decimal is used for decimal separation and comma is used for 1000 separator
So with X setting 10.000 becomes 10.000 and 10,000.00 will become 10000.000
But with Y setting 10.000 becomes 10000,00 and 10,000.00 will become Error.... I pressume
Regards
2013 Jul 10 7:16 AM
Hi,
Yes the DOT is the disallowed operator in case Y so may be that throws the error as its unable to interpret the '.'.
Cheers,
Arindam
2013 Jul 10 7:28 AM
Now my Setting is Y
I have given 234567 as input and when passing
KOMP-DISTZ as fieldname
input as 234567 to RS_CONV_EX_2_IN I am getting output as 234567.000
Expected should be 234567,000 because we don't allow '.' when setting is Y.
2013 Jul 11 8:49 AM
I have a CHAR type field in my grid but I change the label of it dynamically when displaying in the grid
which internally should map to type KOMP-DISTZ (according to my config).
When user enters 12 as his value I call RS_CONV_EX_2_IN to make it look like user entered the value in the field of type KOMP-DISTZ.
It will be displayed as 12.000 after conversion, here I am saving it as 12.000 in database.
When he re opens the grid he will find 12.000 in it.
If i pass 12.000 to RS_CONV_EX_2_IN with my decimal notation remaining same it is converted to 12.000 only.
Now when I change my Decimal notation in user settings if I pass the same 12.000 to RS_CONV_EX_2_IN it is giving different results.
When I change to space:::
The values is converting as 12000.000
When I change to Y:::
I am getting error message as Input not numerical.
Please suggest me some thing to avoid this....
I have tried changing the ref_table and ref_field of my field in grid to KOMP and DISTZ, it did not work.
2013 Jul 11 9:41 AM
Hi Kishore,
DISTZ is a quantity field why are you doing this please elaborate.
Means what is the need to convert it to char and then display.
Regards
2013 Jul 11 12:15 PM
Customer requirement is:::
Customer will enter fields in the config and he should be able to enter those values in a grid and maintain them and save them.
He can maintain up to 3 fields in the config.
Suppose he has maintained KOMP-DISTZ field and also KOMP-VGBEL in the config.
To support this I have taken a Dictionary structure with 3 char50 fields.
I am showing these fields in the grid depending on the fields maintained in the config.
Field1 Field2
Distance Document no.
12 23
Like above I am showing 2 fields in the grid as he maintained only 2 fields in the config with the dynamic labels based on the config fields.
Now when he enters 12 I will coonvert it using RS_CONV_EX_2_IN and it results in 12.000 which will be showed in grid and stored in DB.
Problem is when user changes his Decimal Notation
RS_CONV_EX_2_IN is not converting back my input 12.000 to 12.000 when using different decimal notations.
2013 Jul 12 3:01 AM
Try using HRCM_STRING_TO_AMOUNT_CONVERT
Use USR01-DCPFM to get the decimal notaion and pass the data accordingly.
Regards