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: 

Runtime error

Former Member
0 Kudos

Hi Experts,

I wrote program in Report using for all entries. here i used Binary search. If iam using append its working properly. If i am using modify its going to dump.

Why it is going to dump.

Please tell me.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sri,

there is a significant difference between the functionality of append and modify.

Append statement insert a record into internal table and also allows the duplicate enteries.

but in case of modify if your program is going into dump there can be two reaosns:

1. The data you want to modify may not be present in the table.

2. The fields you are using in modify statement may not be compatible with that of internal table.

So check the syntex of the modify statement you have given and also the table values.

I hope this will work.

Thanks & Regards,

Rajesh Kumar.

7 REPLIES 7

Former Member
0 Kudos

Hi,

First let me explain the functionality of these three statements.

Append: Inserts a record to an internal table

Modify: Modifies a existitng record in the internal table, if there is no record it will throw error.

Update: Modifies a existing record in the internal table if it finds the record, else it will insert a record.

The runtime error may be due to non existance of the record in the internal table. First decide on the functionality you want and carry on with your coding.

Regards

Madhu G S

Reward Points if usefull

0 Kudos

Hi Madhu

Thanks for your answer.

Here i am retrieving data 3 tables, so i used for all entries. in the read statement i am reading data using key. after read statement i am appending workarea to internal table.

Here append is working fine. But i am using Modify statement program going to dump. why its going to dump i con't understand.

Please tell me.

Thanks

0 Kudos

What is the complete syntax that you are using for your MODIFY Statement?

Former Member
0 Kudos

Hi Sri,

Modify statement requires a index i.e. the record no which you want to modify . If you do not provide the index then it will give you dump.

If you want to modify the current record in the loop pass i.e. if you are using the the mdify statement in loop and endloop and want to modify the current record which the loop is accessing then give index addition in modify statement.

For e.g.

Loop at itab into wtab.

modify itab from wtab index sy-tabix.

clear wtab.

endloop.

I hope this will help you.

Help children of U.N World Food Program by rewarding points and encourage others to answer your queries.

Former Member
0 Kudos

Hi Sri,

there is a significant difference between the functionality of append and modify.

Append statement insert a record into internal table and also allows the duplicate enteries.

but in case of modify if your program is going into dump there can be two reaosns:

1. The data you want to modify may not be present in the table.

2. The fields you are using in modify statement may not be compatible with that of internal table.

So check the syntex of the modify statement you have given and also the table values.

I hope this will work.

Thanks & Regards,

Rajesh Kumar.

0 Kudos

Hi Rajesh

Thanks for your answer.

My problem is sloved.

Thanks alot.

Regards,

Sri.

Former Member
0 Kudos

Hi,

Modify statement requires a Index .

At modify the internal table with sy-tabix.

i.e. Modify itab from wtab index sy-tabix.

I hope this will help you.

Help children of U.N World Food Program by rewarding points and encourage others to answer your queries.