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

Modify dbtab from itab.

Former Member
0 Likes
1,887

Hello everyone.

I have a small issue. I am trying to modify the dbtab from itab. My itab have, say, 5 records. when i am using;

MODIFY dbtab FROM itab.

if sy-subrc eq 0.

commit work.

endif.

its just inserting one line (header line) from itab.

but if i use :-

LOOP AT ITAB.

MODIFY dbtab FROM itab.

if sy-subrc eq 0.

commit work.

endif.

ENDLOOP.

its inserting all the 5 records in dbtab. But i guess that, this lead to performance issue as iam hitting the dbtab as many times as my record in my itab . How to rectify this.

Regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
819

USE STATEMENT LIKE -

MODIFY dbtab FROM TABLE itab.

reward points if helpful

4 REPLIES 4
Read only

Former Member
0 Likes
820

USE STATEMENT LIKE -

MODIFY dbtab FROM TABLE itab.

reward points if helpful

Read only

Former Member
0 Likes
819

try to use this

MODIFY dbtab FROM TABLE itab.or MODIFY (dbtabname) FROM TABLE itab.

Addition:

... CLIENT SPECIFIED

regards

shiba dutta

Read only

Former Member
0 Likes
819

Hi,

suppose ur table is Mara

Do like this

Modify mara from table itab

Read only

Former Member
0 Likes
819

hi,

just after endloop statement add <b>MODIFY target FROM TABLE itab</b> statement.

here u r not hitting dbtable for each loop.

eg.

loop at itab.

  • chnage values in itab.

endloop.

<b>MODIFY dbtab FROM TABLE itab.</b>