Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Convert Scientific Notation to Numeric (ABAP)

Former Member
0 Likes
8,252

I am currently consuming a WebService from XIgnite, that is returning a 7.5863900E-01 and I need to update the TCURR (Exchange Rate table) with .758639.

I need an ABAP example to use to place within the program that is importing the data for exchange rates.

Thanks.

1 ACCEPTED SOLUTION
Read only

prabhu_s2
Active Contributor
3,712

try this:


DATA: W_EXPO TYPE QPMK-SOLLWERT,
      W_PCKDECI(16)  TYPE P DECIMALS 3.

MOVE : '7.5863900E-01' TO W_EXPO,
       W_EXPO TO W_PCKDECI.

3 REPLIES 3
Read only

prabhu_s2
Active Contributor
3,713

try this:


DATA: W_EXPO TYPE QPMK-SOLLWERT,
      W_PCKDECI(16)  TYPE P DECIMALS 3.

MOVE : '7.5863900E-01' TO W_EXPO,
       W_EXPO TO W_PCKDECI.

Read only

Former Member
0 Likes
3,712

@David - the exchange rate is only five decimals not six.

@Prabhu - so you should declare w_pckdeci with 5 decimal places rather than just three.

Rob

Read only

Former Member
0 Likes
3,712

worked like a charm. Thank you.