‎2007 Jul 19 7:18 PM
Hi Friends,
I got the following statement in my pgm .
I get a short dump at the following select statemenet . Please advise what is wrong .
SELECT erdat uzeit FROM ztable
INTO (w_date,w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
ENDSELECT.
It does not allow me to use without endselect and when I use it I get a short dump .
In the ztable there may be more than 1 record but I need the one where zindicator <> vttk-tplst.
‎2007 Jul 19 7:22 PM
Hi,
Please try this.
SELECT SINGLE erdat uzeit
FROM ztable
INTO (w_date, w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
Regards,
Ferry Lianto
‎2007 Jul 19 7:21 PM
‎2007 Jul 19 7:27 PM
Hi Rich ,
It still give me the same short dump . I dont understand what could be wrong with the SELECT statement .
Thanks,
Hari
This is what i have in my code .
SELECT single erdat uzeit
FROM ztable
INTO (w_date, w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
‎2007 Jul 19 7:29 PM
hi Hari,
Try it out in this way then
SELECT erdat uzeit up to 1 rows FROM ztable
INTO (w_date,w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
ENDSELECT.
‎2007 Jul 19 7:29 PM
‎2007 Jul 19 7:30 PM
hi ,
May be zindicator and vttk-tplst are of not the same type and length. So to correct it use same type in where condition.
Regards,
Santosh
‎2007 Jul 19 7:32 PM
What is data type for w_date, w_time ?
Try to read Short Dump ,it will give breif message
Thanks
Seshu
‎2007 Jul 19 7:33 PM
‎2007 Jul 19 7:22 PM
use select single statement
SELECT single erdat uzeit FROM ztable
INTO (w_date,w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
‎2007 Jul 19 7:22 PM
Hi,
Please try this.
SELECT SINGLE erdat uzeit
FROM ztable
INTO (w_date, w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
Regards,
Ferry Lianto
‎2007 Jul 19 7:26 PM
HI,
U can use up to 1 rows..
SELECT erdat uzeit up to 1 rows FROM ztable
INTO (w_date,w_time)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
ENDSELECT.
cheers'
Mahesh
‎2007 Jul 19 7:29 PM
Error Analysis
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the 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
‎2007 Jul 19 7:34 PM
HI Hari,
Check the data type of w_date, w_time they should be same as the erdat uzeit fields in the ztable.
Thanks
mahesh
‎2007 Jul 19 7:35 PM
Try like :
SELECT erdat uzeit up to 1 rows FROM ztable
INTO (<b>ztable-erdat,ztable-uzeit</b>)
WHERE tknum = vttk-tknum
AND zindicator <> vttk-tplst.
ENDSELECT.
Thanks
Seshu
‎2007 Jul 19 7:29 PM
Hi,
How do you declare w_date, w_time?
data: w_date type ztable-erdat,
w_time type ztable-uzeit.
Can you paste the whole coding?
Regards,
Ferry Lianto
‎2007 Jul 19 7:44 PM
Hi,
Look at this code, its similar to yours.
DATA: erdat TYPE erzet, "<b>Correct type -><u>erdat</u></b>
erzet TYPE erzet.
START-OF-SELECTION.
SELECT single erdat erzet
FROM vbak
INTO (erdat, erzet)
WHERE vbeln = '0000000004'.
This generated the same dump as below.
<b>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>
You already know what to do ? No ? Ok !
<b>- Check the fields's types of the internal tables !</b>
<u>This error occurs whenever a type conflict occurs, that is, the field's type of the BD table is different of the type declared in the internal table</u>
The correct code is:
DATA: erdat TYPE erdat,
erzet TYPE erzet.
I hope that my tip be useful for you !
Regards .
Marcelo Ramos