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

runtime error number conversion..

hi,

i am doing a table read as follows

select distinct kunnr into workarea from vbpa where parvw = 'WE'.

append workarea to itab.

endselect

trying to fetch distinct customer numbers which are ship to parties. this work area contains just one field , kunnr of type kna1-kunnr and itab is a table of workarea type.

it so happens that in my system , i have two types of kunnrs, all numbers and few like ABC7788. now when an entry such as ABC7788 is encountered, runtime error occurs as

unable to interpret ABC7788 as number !! runtime error convt_no_number !!

why this error occurs ? my data is in that format only and i am using the same field of the DB table !! is SAP trying to do any conevrsion here ? why ? pl advise ..thks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 06:20 AM

    Hi,

    Even i had tried it out...its not giving any error for me.

    Even i both type of records i.e kunnr as numerical and char...still am able to fetch and append the record with the same select stmt.

    select distinct kunnr from vbpa into table itab up to 1000 rows

    where PARVW = 'WE'.

    Copy paste..ur Declaration & Data fetching part.....so that we can find out wats the problem

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 09:43 PM

    Try this way.

    data: vl_kunnr type vbpa-kunnr.
    
    select distinct kunnr 
                       into vl_kunnr
                       from vbpa 
                       where parvw = 'WE'.
    if sy-subrc eq 0.
    workarea-kunnr = vl_kunnr.
    append workarea to itab.
    clear: vl_kunnr.
    endif.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Yes Srilatha, I tried with 2 versions of this statement..

      SELECT DISTINCT KUNNR INTO TABLE ITAB FROM VBPA.....

      and the other which which I mentioned earlier..

      In first case (just the select statement ) it is giving runtime error in the select statenment

      and in the second case(select endselect), it gives error at the append statement !!

      so what i feel is when the value is moved to the itab, something is wrong. not able to figure out what !

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 05:39 AM

    Hi,

    May be you declared work area with single field of type I, thats why it is giving runtime error, please check once.

    If that is the case declare work area with type referring to vbpa-kunnr type which is char 10 so it is accepting char values also.

    and declare table with same type and do as per your requirement.

    Hope this will helps you,

    Regard,

    Aswini.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 05:49 AM

    hey,

    can you please paste the code as to how you declared your work areas and internal tables.

    this would help us in getting a clear picture.

    As far as i know SAP should not throw any dump for your coding, so i am requesting for the code.

    Regards,

    RK

    Add a comment
    10|10000 characters needed characters exceeded

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.