Application Development 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: 

Field-symbol assignment fails when currency value is greater than 11 digits

Former Member
0 Kudos

Hello All,

I have a program where the value of wrbtr is taken from excel & the following code gives an exception CX_SY_NO_HANDLER

.the field symbol is declared type any & the wa_data_raw-value is of type ALSMEX_TABLINE-VALUE i.e. char 50.

    <fs_dyn_field> = wa_data_raw-value.

BAPI_CURRENCY_CONV_TO_INTERNAL and pack also but it didn't wrk.

amount 390498546855 is converted to 3904985468.55 by pack & bapi.

Please suggest how to proceed.

Thanks in advance.

Deepthy

6 REPLIES 6

arindam_m
Active Contributor
0 Kudos

Hi,

Try to do a similar currency field assignment.

Cheers,

Arindam

Former Member
0 Kudos

Could you please give examples

surajarafath
Contributor
0 Kudos

What is the assigned for field symbols? You have to assign like this,

ASSIGN (WA_DATA_RAW-VALUE) TO <FS_DYN_FIELD>.

Former Member
0 Kudos

Hi Deepthy,

You have to assign the field symbol. Do to this replace with this line of code:

ASSIGN wa_data_raw-value TO <fs_dyn_field>.

0 Kudos

Hello satish ,

my prgm uses FM  'ALSM_EXCEL_TO_INTERNAL_TABLE' to upload data frm excel & <fs_dyn_wa_n> has values .

  ASSIGN COMPONENT wa_data_raw-col OF STRUCTURE <fs_dyn_wa_n> TO <fs_dyn_field>.

<fs_dyn_field> = wa_data_raw-value.

Former Member
0 Kudos

I had a look at this wiki article

WRBTR field can have 11 digits and 2 decimals.

Exception will occur when you try to move more than 11 digits, like 390498546855.

You can catch the exception CX_SY_NO_HANDLER using TRY.CATCH block.

When exception occurs, you can handle it in CATCH block by either putting <fs_dyn_field> as 0, or moving faulty record to another structure that has all string type fields.

This way dump won't occur and your program can process remaining records.