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: 

Short Dump....itab

Former Member
0 Kudos

Hai All,

I have done an ALV Report Program, which while executing goes to the short dump and the error msg says:

" You attempted to change, delete or create a line in the internal table "???", but no valid cursor exists for the table.

Possible reasons:

1.The relevant Abap/4 statement does not include the addition "..INDEX.." although the statement is not inside a "LOOP..Endloop" loop processing this table.

2.The relevant Abap/4 statement was called from within a "Loop..Endloop" loop after a Delete"???". "

Could anyone sort this out please.

Thanks in Advance.

rama

1 ACCEPTED SOLUTION

Former Member
0 Kudos

PL check your code..looks like you have a MODIFY ITAB statement without INDEX..

Arya

9 REPLIES 9

Former Member
0 Kudos

hi,

can u give ur code?

Former Member
0 Kudos

Are u trying to modify a itbab without using index?

u cannot do that if ur not in a loop

use modify itab with ur index <index no of record in itab>

Message was edited by:

Nehal Fonseca

Former Member
0 Kudos

PL check your code..looks like you have a MODIFY ITAB statement without INDEX..

Arya

0 Kudos

Yes, I am trying to modify my internal table: Here is my code:

How can i use the index here:

select * into corresponding fields of table itab from bsis

where bukrs in x_bukrs

and hkont in x_hkont

and budat in x_budat

and bldat in x_bldat

and zuonr in x_zuonr.

*data

move-corresponding itab to jtab.

loop at itab. " into wa_itab.

if itab-shkzg = 'H'.

*move-corresponding itab to jtab.

x_dmbtr = itab-dmbtr * ( -1 ).

move x_dmbtr to jtab-dmbtr.

x_vbeln = itab-zuonr+0(9).

move x_vbeln to jtab-vbeln.

*append wa_jtab to jtab.

modify jtab transporting dmbtr vbeln.

*collect jtab.

else.

*move-corresponding itab to jtab.

x_dmbtr = itab-dmbtr.

x_vbeln = itab-zuonr+0(9).

move x_vbeln to jtab-vbeln.

*append wa_jtab to jtab.

modify jtab transporting dmbtr vbeln.

*collect jtab.

endif.

collect jtab.

endloop.

0 Kudos

Replace modify jtab transporting dmbtr vbeln.

with

modify jtab transporting dmbtr vbeln index sy-tabix.

Arya

0 Kudos

Yes indeed you need to specify the index, so to speak.

Former Member
0 Kudos

Hi,

I think You are not passing INDEX at the time of modify record.

Regards.

Former Member
0 Kudos

Hello Rama Krishna,

Could it be that you are possibly attempting to modify a table without specifying the index, if you will?

Kindest Regards,

Chester

Former Member
0 Kudos

Cheers to All..its fine now.

Thanks.