Application Development 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: 

dump error

Former Member
0 Kudos

Hi experts

I am using the following code for retriving the total sales order stock for the material. but it goes for dump, how to correct this query.

loop at itab1.

select matnr

kalab

KAINS

kaspe

from mska

into

(itab1-matnr , itab1-kalab , itab1-KAINS , itab1-kaspe)

where matnr = itab1-matnr.

modify itab1.

endselect.

endloop.

Pls advise me on the same.

Thanks in advance.

Regards

Rajaram

11 REPLIES 11

Former Member
0 Kudos

Hi

loop at itab1.

select matnr

kalab

KAINS

kaspe

from mska

into <b>ITAB!</b>

where matnr = <b>u can't pu itab1 value here put some value or selection screen parameters .</b>

modify itab1.

endselect.

endloop.

reward if usefull

Former Member
0 Kudos

hi,

try changing the modify statement to:

modify itab1 index sy-tabix.

regards,

Navneeth K.

0 Kudos

problem is wid modify statement

use sy-tabix

or use

modify wid from addtion

0 Kudos

your where condition is also not right

as u r fethchig data into itab1-matnr and in the next line u r comparing it

but itab1-matnr wil contain data after the append or modify statement

or tell us that is there any data in itab1-matnr?????

if yes then y r u modifying this in the select statement

chk ur where condtion it wil resolve ur prob

Former Member
0 Kudos

hi

good

the where condition that you r given in your select statement is not correct,go through the code and change that accordingly,

go through the dump details properly ,you can understand the detail error.

thanks

mrutyun^

Former Member
0 Kudos

Hi,

What is the dump? Please let us know.

It may be a performance issue. If possible take the table out of loop and join with previous table.

also you are using itab1-matnr in where clause as well as into clause this may be reason for dump.

if u can post the details about the dump, then it will be clear.

Former Member
0 Kudos

Try this.Reward poits if useful.

data : my_tabix type sy-tabix.

loop at itab1.

clear my_tabix.

my_tabix = sy-tabix.

select matnr

kalab

KAINS

kaspe

from mska

into

(itab1-matnr , itab1-kalab , itab1-KAINS , itab1-kaspe)

where matnr = itab1-matnr.

modify itab1 index my_tabix.

endselect.

endloop.

Former Member
0 Kudos

HI,

short dump may be of 2 reasons

1. the internal table fields order and fields in the select statement which u gave may be of different order.

2. ur selecting data from database table to internal and in where condition u gave internal table field. that internal table field is empty bcoz it doesnt have any data.

check that one also.

Select matnr

kalab

KAINS

kaspe

from mska

into

(itab1-matnr , itab1-kalab , itab1-KAINS , itab1-kaspe)

where matnr = itab1-matnr. // only this statement works if u have data in internal table other wise declare a parameter and compare with matnr in where copndition of select statement as

Select matnr

kalab

KAINS

kaspe

from mska

into

(itab1-matnr , itab1-kalab , itab1-KAINS , itab1-kaspe)

where matnr = p_matnr // parameter declared.

if helpful reward some points.

with regards,

Suresh Aluri.

0 Kudos

select matnr

werks

lgort

charg

sobkz

vbeln

posnr

kalab

KAINS

kaspe

from mska

into corresponding fields of table i_mska

for all entries in itab1

where matnr = itab1-matnr.

Please look this query, i think ur first point may be the reason for my case.

this is the order am retriving data but in the table also same order, pls clarify why it goes to dump.

Regards

Rajaram

Former Member
0 Kudos

Hi ,

there are two problems in code.

1. u cannoot use itab1-matnr for select statement(but this is not the reason for dump.)

2. modify to be used needs index or key to be specified always. without that the program goes to dump.

give index or key with modify and the problem is solved.

PLEASE REWARD ME FOR SUCH CLEAR ANSWER IF HELPFUL

0 Kudos

SELECT aufnr

baugr

matnr

meins

bdmng

FROM resb

INTO CORRESPONDING FIELDS OF TABLE itab1

FOR ALL ENTRIES IN itab

WHERE aufnr = itab-aufnr.

but this query is working fine, here i have used itab, then why can't we use itab1 in the first case.

how to use modify with index, should we put a loop , pls explain this.

Regards

Rajaram