‎2007 Feb 09 6:35 AM
Hi ,
I am fetching data from LIPS table first and according to that I am getting values from MCH1:-
SELECT vbeln
posnr
matnr
charg
lfimg
vrkme
lgmng
vgbel
vgpos
mtart
xchpf
umcha
INTO TABLE t_lips
FROM lips
WHERE vbeln EQ p_vbeln.
IF t_lips[] IS NOT INITIAL.
SELECT charg
INTO TABLE t_mch1
FROM mch1
FOR ALL ENTRIES IN t_lips
WHERE charg EQ t_lips-charg.
IF sy-subrc EQ 0.
ENDIF.
endif.
this code is giving dump.
description of DUMP:-
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.
please help me to solve this.
Regards Avi
IF sy-subrc EQ 0.
ENDIF.
‎2007 Feb 09 6:38 AM
use into corresponding fields of table t_lips
and corresponding fields of table t_mch1.
it will solve u r problem
cheers!
‎2007 Feb 09 6:39 AM
HI Avi,
i think there is the problem with data declarations..
can u paste here the delacration for t_lips and t_mch1.
Regards,
Sarath
‎2007 Feb 09 6:40 AM
Verify the fields you are selecting in the first query - are they in the same order as the structure of your table t_lips?
If not, use INTO CORRESPONDING FIELDS OF TABLE T_LIPS, instead of INTO TABLE T_LIPS.
‎2007 Feb 09 6:42 AM
Hi
Use corresponding fields and check the field declaration of your second internal table
Regards
Subramanian
Message was edited by:
Subramanian PL
‎2007 Feb 09 6:55 AM
Hi,
Specify the structure you haev used.
According to ur query ur t_lips should be as below
DATA: BEGIN OF t_lips occurs 0,
vbeln
posnr
matnr
...............as per teh order in select query
END OF t_lips.
DATA: BEGIN OF t_mch1 occurs 0,
charg LIKE mchi-charg,
END OF t_mch1.
SELECT vbeln
posnr
matnr
charg
lfimg
vrkme
lgmng
vgbel
vgpos
mtart
xchpf
umcha
INTO TABLE t_lips
FROM lips
WHERE vbeln EQ p_vbeln.
IF t_lips[] IS NOT INITIAL.
SELECT charg
INTO TABLE t_mch1
FROM mch1
FOR ALL ENTRIES IN t_lips
WHERE charg EQ t_lips-charg.
IF sy-subrc EQ 0.
ENDIF.
endif.If u ave defined the itab as
DATA: t_mch1 TYPE STANDARD TABLE OF mch1,
t_lips TYPE STANDARD TABLE OF lips.
THEN ur code should be like
SELECT vbeln
posnr
matnr
charg
lfimg
vrkme
lgmng
vgbel
vgpos
mtart
xchpf
umcha
INTO CORRESPONDIGN FIELDS OF TABLE t_lips
FROM lips
WHERE vbeln EQ p_vbeln.
IF t_lips[] IS NOT INITIAL.
SELECT charg
INTO CORRESPONDING FIELDS OF TABLE t_mch1
FROM mch1
FOR ALL ENTRIES IN t_lips
WHERE charg EQ t_lips-charg.
IF sy-subrc EQ 0.
ENDIF.
endif.also
SELECT * INTO TABLE t_lips
FROM lips
WHERE vbeln EQ p_vbeln.
IF t_lips[] IS NOT INITIAL.
SELECT *
INTO TABLE t_mch1
FROM mch1
FOR ALL ENTRIES IN t_lips
WHERE charg EQ t_lips-charg.
IF sy-subrc EQ 0.
ENDIF.
endif.Hope u r clear.
Reward points and close the thread if this solves.
‎2007 Feb 09 9:52 AM
Hi ,
Please check, the number of fields u r selecting in the SELECT stmt are same
as the number of fields in ur internal table .
for eg : if u select 5 fields from Db but int table has only 4 fields, it will give dump .
And also , ur int table must have the same stucture as the fields u r trying to select
(their coreesponding type should match )...
Thanks .
Praveen .
‎2007 Feb 09 10:40 AM
Hi Avi,
as proposed: Use into corresponding fields and close the thread, thank you.
Regards,
Clemens