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

Incorrect amount value...

Former Member
0 Likes
340

Hi All,

I am passing the amount value as 12,000,000.89 to an RFC and while executing I am getting below run time error.

The program attempted to interpret the value "1.200000089E7 " as a number, but

since the value contravenes the rules for correct number formats,

this was not possible..

Source code line error:

001240 * Change EKPO-NETPR from decimals 4 to decimals 2

-


> temp_curr = bdc_data-fval.

001260 write temp_curr to bdc_data-fval left-justified.

001270 modify bdc_data transporting fval.

001280 ENDIF.

001290 endloop.

The code where this is happening is

FORM FILL_BDC_TABLE USING DYNBEGIN NAME VALUE.

DATA: LOC_VAR,

LOC_TYP.

DATA: NODATA(1) TYPE C VALUE '\'. "For suppressing BDC field

CLEAR BDCDATA.

IF DYNBEGIN = 'X'.

MOVE NAME TO BDCDATA-PROGRAM.

MOVE VALUE TO BDCDATA-DYNPRO.

MOVE 'X' TO BDCDATA-DYNBEGIN.

APPEND BDCDATA.

ELSE.

LOC_VAR = VALUE.

IF LOC_VAR NE NODATA OR NAME EQ 'bdc_okcode'.

DESCRIBE FIELD VALUE TYPE LOC_TYP.

MOVE NAME TO BDCDATA-FNAM.

CASE LOC_TYP.

WHEN 'D'.

WRITE VALUE TO BDCDATA-FVAL.

WHEN 'P'.

MOVE VALUE TO BDCDATA-FVAL.

TRANSLATE BDCDATA-FVAL USING ', '.

CONDENSE BDCDATA-FVAL NO-GAPS.

WHEN 'N'.

WRITE VALUE TO BDCDATA-FVAL NO-ZERO.

TRANSLATE BDCDATA-FVAL USING ', '.

CONDENSE BDCDATA-FVAL NO-GAPS.

WHEN OTHERS.

MOVE VALUE TO BDCDATA-FVAL.

ENDCASE.

APPEND BDCDATA.

ENDIF.

ENDIF.

ENDFORM.

Please provide some pointersu2026

1 REPLY 1
Read only

Former Member
0 Likes
298

Try these function module!

BAPI_CURRENCY_CONV_TO_EXTERNAL converts currency amounts from SAP internal data formats into external data formats.

BAPI_CURRENCY_CONV_TO_INTERNAL converts currency amounts from SAP external data formats into internal data formats.

Regards,

Lalit Mohan Gupta.