Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2013 at 06:06 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2013 at 03:38 AM

    Hi,

    Try to do a similar currency field assignment.

    Cheers,

    Arindam

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2013 at 04:12 AM

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

    ASSIGN (WA_DATA_RAW-VALUE) TO <FS_DYN_FIELD>.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2013 at 04:21 AM

    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>.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.