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: 

Effective way of Modifying statements.

Former Member
0 Kudos

What is the difference between the following two modified statements?How it makes a difference in performance, if transporting is used in the 2nd case?Thanx.

WA-DATE = SY-DATUM.

MODIFY ITAB FROM WA INDEX 1

-


WA-DATE = SY-DATUM.

MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

tarnsporting is efficient when table is long i.e when

table has more data second statement is much more efficient.

if table has small data then both perform in a same way but in long run second one is efficient.

6 REPLIES 6

Former Member
0 Kudos

difference is that the second statement will only transport the value of the field which u have specified while first statement will transfer values of all the fields. and obviously second one is more efficient.

reward if useful

S@meer

Former Member
0 Kudos

WA-DATE = SY-DATUM.

MODIFY ITAB FROM WA INDEX 1

It means you are modifying ur internal table by all the fields in

the first line of wa.

-


WA-DATE = SY-DATUM.

MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.

While It means u r only modifying 'date' field of ur internal table by the date field in

the first line of wa.

Regards and I do need some points plz.

Nishant

Former Member
0 Kudos

hi,

yes by writing Transporting in the code the performance will be improved. For more details just write the word "modify" in the program and press F1 and then select link "change an internal table", this will give you more idea on this.

*rewards points if useful***

regards,

n.jain

Former Member
0 Kudos

Hi,

first modify will modify the whole itab from wa

whereas in second , only date will be modified in itab

from wa

Former Member
0 Kudos

tarnsporting is efficient when table is long i.e when

table has more data second statement is much more efficient.

if table has small data then both perform in a same way but in long run second one is efficient.

Former Member
0 Kudos

Hi,

The first one will hit all the fields of the internal table but modifies only the date.

The second one.. hits only the date field and modifies it.

Thus the second one is much preferred as it improves the perfomance and speeds up the execution.

Reward if helpful.

Regards.