06-07-2008 9:40 AM
Hi,
I am receiving the message -> Unable to interpret "814,5 " as a number.
and getting Runtime error because of an assignment:
gv_maxpart = e_gefkat_res_tab-VERBRAUCH.
gv_maxpart is DEC (decimal length 10, places 4)
e_gefkat_res_tab-VERBRAUCH is char12
What has to be made ? I need this assignmwnt for a multiply statement
later.
Regards
ertas
06-07-2008 10:25 AM
Hello,
the SAP internal decimal separator is "." and not ",".
example :
MOVE '814,5' TO gv_maxpart. ==> KO
MOVE '814.5' TO gv_maxpart. ==> OK
What you can do is to use for example TRANSLATE abap instruction :
TRANSLATE e_gefkat_res_tab-VERBRAUCH USING ',.'.
gv_maxpart = e_gefkat_res_tab-VERBRAUCH.
Cordialement,
Chaouki.
06-07-2008 10:01 AM
HI..
change the data type for field e_gefkat_res_tab-VERBRAUCH to DEC (decimal length 10, places 4)
OR
use some other field (type simlar to gv_maxpart) instead of e_gefkat_res_tab-VERBRAUCH for the assignment
Rgds
06-07-2008 10:08 AM
not possible because
e_gefkat_res_tab-VERBRAUCH contents the number what I need. Only problem this info
is stored as char instead dec. Therefore it is not possible to interpret "814,5 " as a number.
06-07-2008 10:15 AM
try this:
replace ',' in e_gefkat_res_tab-VERBRAUCH with '.'.
condense e_gefkat_res_tab-VERBRAUCH.
gv_maxpart = e_gefkat_res_tab-VERBRAUCH.
06-07-2008 10:25 AM
Hello,
the SAP internal decimal separator is "." and not ",".
example :
MOVE '814,5' TO gv_maxpart. ==> KO
MOVE '814.5' TO gv_maxpart. ==> OK
What you can do is to use for example TRANSLATE abap instruction :
TRANSLATE e_gefkat_res_tab-VERBRAUCH USING ',.'.
gv_maxpart = e_gefkat_res_tab-VERBRAUCH.
Cordialement,
Chaouki.
06-07-2008 10:47 AM
sorry but I get now this message:
Short text
Unable to interpret "2.567.8 " as a number.
Regards
ertas
06-07-2008 11:05 AM
A number can not have more than one decimal separator as "2.567.8".
"." is the sap internal decimal separator.
So "2.567.8" has 2 decimal separator.
So that is normal to have an error message.
06-07-2008 11:19 AM
I'm really sorry but all postings were not helpful.
This forum is going to be like more and more beginners level.
I'm missing former user.
I have found the solutuion the right solution is:
C14W_CHAR_NUMBER_CONVERSION
06-07-2008 11:49 AM
I'm really sorry but all postings were not helpful.
=============>Sorry that my answers do not help you.
This forum is going to be like more and more like beginners level.
=============>Your question have been asked many time before in this forum. ==> YOU, HAVE A BEGINNER LEVEL.
I'm missing former user.
=============>See what, Rich HEILMAN (not a beginner level), answers to an identical question in this thread :
I have found the solutuion the right solution is:
C14W_CHAR_NUMBER_CONVERSION
=============>Congratulation to you.
06-07-2008 12:12 PM
IIhas,
e_gefkat_res_tab-VERBRAUCH both has to be type P decimal XX.
Amit.
06-07-2008 1:35 PM
Do the following:
Suppose you have nos. 814,5 and 2.567,8 - both of which are giving errors: Follow the following steps:
1. Move both the numbers to a character field.
2. Replace ',' by 'X'
3. Replace '.' by ','
4. Replace 'X' by '.'
5. Move both numbers to a numeric field.
Alternatiely try to change your default settings for decimal notations in System --> User profile --> Own Data --> Defaults.