Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Solve Runtime Error CONVT_NO_NUMBER

Dear All,

When I test a subroutine that included in SAPScript,a runtime error occured.Below is the error message.

-


Unable to interpret "XXXXXXXXXXX.XX " as a number.

-


<b>Error analysis</b>

An exception occurred. This exception is dealt with in more detail below. The exception, which is assigned to the class 'CX_SY_CONVERSION_NO_NUMBER', was neither

caught nor passed along using a RAISING clause, in the procedure "Z_CALCULATE_GROSS" "(FORM)".

Since the caller of the procedure could not have expected this exception to occur, the running program was terminated.

The reason for the exception is:

The program attempted to interpret the value "XXXXXXXXXXX.XX " as a number, but

since the value contravenes the rules for correct number formats,

this was not possible.

-


<b>The related source code is :</b>

-


000160

000170 FORM Z_CALCULATE_GROSS TABLES IN_TAB STRUCTURE ITCSY

000180 OUT_TAB STRUCTURE ITCSY.

000190

000200 DATA: NET_VALUE LIKE EKPO-NETPR, " TYPE C,

000210 GROSS TYPE P DECIMALS 2. "LIKE EKPO-NETPR.

000220

000230 READ TABLE IN_TAB WITH KEY 'EKPO-NETPR'.

<b>-----> NET_VALUE = IN_TAB-VALUE.</b>

000250

-


It seems that the data type of NET_VALUE can not be assigned a type CHAR data source.But the data source IN_TAB-VALUE actually is a CHAR type.

How should I solve this problem ?

Thanks!

Brian Liu

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question