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

Short dump with a select statement

Former Member
0 Likes
1,326

I have the following select statement (I have also inluded my data statement(s)) and I get a short dump. The error is as follows:

<b>What happened?

Error in ABAP application program.

The current ABAP program "ZPARTNER" had to be terminated because one of the

statements could not be executed.

This is probably due to an error in the ABAP program.

Following a SELECT statement, the data read could not be placed in AN

the output area.

A conversion may have been intended that is not supported by the

system, or the output area may be too small.

Error analysis

An exception occurred. This exception will be dealt with in more detail

below. The exception, assigned to the class 'CX_SY_OPEN_SQL_DB', was not

caught, which

led to a runtime error. The reason for this exception is:

The data read during a SELECT access could not be inserted into the

target field.

Either conversion is not supported for the target field's type or the

target field is too short to accept the value or the data are not in a

form that the target field can accept </b>

it_adrc TYPE TABLE OF adrc,
      wa_adrc LIKE LINE OF it_adrc,


SELECT addrnumber name1 street city1 region post_code1 tel_number
  FROM adrc INTO TABLE it_adrc
  FOR ALL ENTRIES IN it_detail
  WHERE addrnumber = it_detail-adrnr.

Regards,

Davis

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
958

hi Davis,

ADRC table contains other fields also in addition to the fields u had mentioned in select statement , so u have to use INTO CORRESPONDING FIELDS OF

SELECT addrnumber name1 street city1 region post_code1 tel_number

FROM adrc INTO <b>CORRESPONDING FIELDS OF</b> TABLE it_adrc

FOR ALL ENTRIES IN it_detail

WHERE addrnumber = it_detail-adrnr.

7 REPLIES 7
Read only

Former Member
0 Likes
959

hi Davis,

ADRC table contains other fields also in addition to the fields u had mentioned in select statement , so u have to use INTO CORRESPONDING FIELDS OF

SELECT addrnumber name1 street city1 region post_code1 tel_number

FROM adrc INTO <b>CORRESPONDING FIELDS OF</b> TABLE it_adrc

FOR ALL ENTRIES IN it_detail

WHERE addrnumber = it_detail-adrnr.

Read only

0 Likes
958

Oh ok, thanks a lot Chandrasekhar!

Regards,

Davis

Read only

Former Member
0 Likes
958

check the declaration of it_adrc.

make sure all fields you are selecting is there in it_adrc.

FROM adrc INTO corresponding fields of TABLE it_adrc

Read only

Former Member
0 Likes
958

hi Davis,

do this way

it_adrc TYPE TABLE OF adrc,

wa_adrc LIKE LINE OF it_adrc,

SELECT addrnumber name1 street city1 region post_code1 tel_number

FROM adrc INTO <b>CORRESPONDING FIELDS OF</b> TABLE it_adrc

FOR ALL ENTRIES IN it_detail

WHERE addrnumber = it_detail-adrnr.

Read only

Former Member
0 Likes
958

If you only need the fields mentioned in the select query, then follow this:

TYPES: BEGIN OF ADRC_TYPE,

ADDRNUMBER LIKE ADRC-ADDRNUMBER,

NAME1 LIKE ADRC-NAME1,

STREET LIKE ADRC-STREET,

CITY LIKE ADRC-CITY,

REGION LIKE ADRC-REGION,

POST_CODE1 LIKE ADRC-POST_CODE1,

TEL_NUMBER LIKE ADRC-TEL_NUMBER,

END OF ADRC_TYPE,

ADRC_T_TYPE TYPE TABLE OF ADRC_TYPE.

DATA: IT_ADRC TYPE ADRC_T_TYPE WITH HEADER LINE.

IF NOT IT_DETAIL[] IS INITIAL.

SELECT addrnumber name1 street city1 region post_code1 tel_number

FROM adrc INTO TABLE it_adrc

FOR ALL ENTRIES IN it_detail

WHERE addrnumber = it_detail-adrnr.

ENDIF.

Thanks,

SKJ

Read only

Former Member
0 Likes
958

just please read error carefully and goto st22 you will get help

Read only

0 Likes
958

Yes it does help but not if you don't understand what is causing the error in the first place. I posted here because I was stuck (after using st22).