‎2009 Sep 04 5:41 AM
Hi! All
I have a field in an Itab which is of Character Data Type and it has been used to Upload the Data using BDC. and the Problem is, while using that character field for relational operator check, it troughs an DUMP error CONVERTION_ERROR at Background but the report executes fine.
wk_char type c. or wk_cahr type n.
I have tried using the Data Type N. but then to the same DUMP error occurs.
How to solve this error.
is it right to assign the character field to Interger field.
wk_char type c. or wk_cahr type n.
wk_int type i
wk_int = wk_char.
will it works to solve the above error.
Thanks and Regards,
Kv
wk_char type
‎2009 Sep 04 6:36 AM
Hi,
You can use a FM for your problem as : MOVE_CHAR_TO_NUM
Declare one more variable to pass this value as numeric for comparison.
Just declare the field as type c and before using for comparison, use this FM.
Regds,
Anil
‎2009 Sep 04 6:10 AM
HI,
This Dump occurs because of type conversion.
instead of giving
wk_int type i.
you declare it as
wk_int type c.
and then pass the values
wk_int = wk_char.
the dump will not occur.
Regards,
Vinu.R.
‎2009 Sep 04 6:36 AM
Hi,
You can use a FM for your problem as : MOVE_CHAR_TO_NUM
Declare one more variable to pass this value as numeric for comparison.
Just declare the field as type c and before using for comparison, use this FM.
Regds,
Anil
‎2009 Sep 04 6:50 AM
Hi,
For the conversion between the Character and a Numeric Value, the source field must contain numeric values.
Have a look at the Application help which states
"The source field must contain a number in mathematical or commercial notation. Exception: A source field that contains only blank characters is interpreted as the number zero. Scientific notation is not allowed, unless it can be interpreted as mathematical notation. Decimal places are rounded to whole-numbered values. If the number lies within the value range of data types i, b or s, it is converted into the corresponding internal representation of an integral number, otherwise the treatable exception CX_SY_CONVERSION_OVERFLOW occurs."
Have a look at the other conversion rules which will suit your need.
Hope this helps.
Thanks,
Samantak
‎2009 Sep 04 8:39 AM