2007 Sep 14 1:39 PM
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
2007 Sep 14 1:42 PM
PL check your code..looks like you have a MODIFY ITAB statement without INDEX..
Arya
PL check your code..looks like you have a MODIFY ITAB statement without INDEX..
Arya
2007 Sep 14 1:42 PM
2007 Sep 14 1:42 PM
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
2007 Sep 14 1:42 PM
PL check your code..looks like you have a MODIFY ITAB statement without INDEX..
Arya
2007 Sep 14 1:52 PM
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.
2007 Sep 14 1:54 PM
Replace modify jtab transporting dmbtr vbeln.
with
modify jtab transporting dmbtr vbeln index sy-tabix.
Arya
2007 Sep 14 2:01 PM
2007 Sep 14 1:50 PM
Hi,
I think You are not passing INDEX at the time of modify record.
Regards.
2007 Sep 14 1:52 PM
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
2007 Sep 14 2:08 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |