‎2007 Apr 27 3:09 PM
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
‎2007 Apr 27 3:14 PM
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.
‎2007 Apr 27 3:14 PM
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.
‎2007 Apr 27 3:16 PM
‎2007 Apr 27 3:15 PM
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
‎2007 Apr 27 3:19 PM
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.
‎2007 Apr 27 3:24 PM
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
‎2007 Apr 27 4:02 PM
just please read error carefully and goto st22 you will get help
‎2007 Apr 27 4:07 PM
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).