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

CONVT_NO_NUMBER error

Former Member
0 Likes
665

Hello,

I have a field on a bsp that is set up as a decimal field. I do not want people to enter in either a dollar sign or comma. If they do, I receive the error:

The following error text was processed in the system:

An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a RAISING clause

Exception Class CX_SY_CONVERSION_NO_NUMBER

Error Name CONVT_NO_NUMBER

Program CL_HRRCF_PROFILE_WORKEXP_DET_VCP

Include CL_HRRCF_PROFILE_WORKEXP_DET_VCM00D

ABAP Class CL_HRRCF_PROFILE_WORKEXP_DET_V

Analyze DO_HANDLE_DATA

Line 208

Long text Das Argument '$23000.00' kann nicht korrekt als Zahl dargestellt werden.

What I would like instead is a pop-up message that states users should not enter these values. Is there any way that I can check this field and have a pop-up appear if an inappropriate value is entered?

Thanks!

Heather

3 REPLIES 3
Read only

Former Member
0 Likes
600

We have fixed the issue.

Thanks!

Read only

0 Likes
600

Hi,

it would be very nice if you could post your solution because i have the same issue but have no idear where to start to solve the problem.

I would be very pleased to get some help.

Thanks in advance.

Tim

Read only

Former Member
0 Likes
600

Hi Tim,

We fixed our problem by adding the following code to the Method DO_HANDLE_DATA. This code strips out any characters added to the field that are not numbers, commas, or decimal points. Please let me know if you need additional information.

Thanks,

Heather

  • Last Salary

DATA: lt_form_fields TYPE tihttpnvp.

DATA: l_index TYPE sy-tabix.

DATA: l_ok_chars(12) TYPE c VALUE '0123456789.,'.

DATA: l_length TYPE i.

DATA: l_position TYPE i.

DATA: l_next_position TYPE i.

DATA: l_last_salary(20) TYPE c.

DATA: l_fdpos TYPE sy-fdpos.

lt_form_fields[] = form_fields[].

  • Read form field for last salary...

CLEAR ls_form_field.

READ TABLE form_fields

WITH KEY name = 'zlast_salary'

INTO ls_form_field.

replace '$' in ls_form_field-value with ''.

l_index = sy-tabix.

modify lt_form_fields index l_index

from ls_form_field transporting value.

IF NOT ls_form_field-value IS INITIAL.

CALL METHOD cl_hrrcf_ui_services=>handle_data_input

EXPORTING

pt_form_fields = lt_form_fields

p_field_name = ls_form_field-name

IMPORTING

p_return_message = lv_return

CHANGING

p_data = me->current_record-zlast_Salary.

IF not lv_return IS INITIAL.

APPEND lv_return TO lt_return.

invalid_last_salary = 'true'.

endif.

ELSE.

clear me->current_record-zlast_Salary.

ENDIF.