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

Dump while Running a Report

Former Member
0 Likes
820

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.

7 REPLIES 7
Read only

Former Member
0 Likes
762

use into corresponding fields of table t_lips

and corresponding fields of table t_mch1.

it will solve u r problem

cheers!

Read only

Former Member
0 Likes
762

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

Read only

Former Member
0 Likes
762

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.

Read only

Former Member
0 Likes
762

Hi

Use corresponding fields and check the field declaration of your second internal table

Regards

Subramanian

Message was edited by:

Subramanian PL

Read only

Former Member
0 Likes
762

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.

Read only

Former Member
0 Likes
762

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 .

Read only

Clemenss
Active Contributor
0 Likes
762

Hi Avi,

as proposed: Use into corresponding fields and close the thread, thank you.

Regards,

Clemens