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

Short dump..

Former Member
0 Likes
1,267

hi all..

i am getting an error like this while executing. This modify is bng called inside a loop.

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

MODIFY itab FROM wa_itab TRANSPORTING delete

  • where delete is a flag.

hi all..

i am getting an error like this while executing. This modify is bng called inside a loop.

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

MODIFY itab FROM wa_itab TRANSPORTING delete

  • where delete is a flag.

9 REPLIES 9
Read only

Former Member
0 Likes
1,211

Hi,

Can you please provide the data whcih you are modifying..

The syntax is correct.

I can suggest you one thing..

You use field-symbols for this type of coding, there will be no chance of useing the Modify statement when using field symbols..

regards,

nazeer

Message was edited by:

nazeer shaik

Read only

Former Member
0 Likes
1,211

hi

u need to have a cursor position for such a modify satatement . there mite be somethn wrong wth ur loop statement.

and one more thing what ru achieving by transpoting delete is the flag really required .

Do revert back

regards

navjot

reward if helpfull

Read only

Bema
Active Participant
0 Likes
1,211

Delete is a key word , use some other name for the flag.

Read only

Former Member
0 Likes
1,211

Hi,

Chek your internal table data and work area data in debugging. It will help you and you can solve that problem.

Reply for queries, shall post the updates.

Regards.

Kumar

Read only

Former Member
0 Likes
1,211

Hi,

Try with below syntax

MODIFY TABLE itab [FROM wa]

[TRANSPORTING f1 ... fn].

Put the "TABLE" key word before internal table....

Don't forget to reward if useful

Read only

naveen1241
Participant
0 Likes
1,211

hi

MODIFY itab FROM wa_itab TRANSPORTING delete

either specify index sy-tabix additon or use keyword table.

like

MODIFY itab FROM wa_itab TRANSPORTING delete index sy-tabix

or

MODIFY TABLE itab FROM wa_itab TRANSPORTING delete.

Regards,

Naveen Natarajan

Read only

Former Member
0 Likes
1,211

You need to have the index addition to avoid this

MODIFY scarr_tab INDEX idx FROM scarr_wa .

or

MODIFY TABLE scarr_tab FROM scarr_wa

TRANSPORTING currcode.

courtesy SAP Help

santhosh

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
1,211

Hi,

Try using where condition.

modify itab FROM wa_itab TRANSPORTING delete where condition.

Read only

Former Member
0 Likes
1,211

Hi Cynthia,

for the statement that you have written...

MODIFY itab FROM wa_itab TRANSPORTING delete.

this statement needs to be in the loop...LOOP at itab...ENDLOOP.

and it must not be in this case...

so you need to pass another addition INDEX to this statement..

MODIFY itab FROM wa_itab TRANSPORTING delete INDEX id...

here id is the line id of the itab that you need to modify.

This will solve your problem,

<b>Reward points for helpful answers,</b>

Regards,

Tejas