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: 

performance problem using on change

Former Member
0 Kudos

Hi abapers,

i am using ON CHANGE OF...END ON,,, AT END OF statements in My program.

will this statements effect on performance.

if so , is there any alternative?

please help .

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Hi Ramesh,

I don't know what are the performance implications with this statement, but SAP says that it is an Obsolete control structure.

You cannot use them in class contexts.(This statement is forbidden in classes).

More over, SAP Hep also says that,

<b>"For each time the statement ON CHANGE OF is executed, the content of all the specified data objects is saved as an auxiliary variable internally in the global system. The auxiliary variable is linked to this statement and cannot be accessed in the program. The auxiliary variables and their contents are retained longer than the lifetime of procedures. An auxiliary variable of this type can only be initialized if its statement ON CHANGE OF is executed while the associated data object is initial. "</b>

Regards,

Ravi Kanth

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

It can. But I would concentrate on your SELECT statements to improve performance of your program.

Regards,

Rich Heilman

Former Member
0 Kudos

I would use AT END OF, instead of ON CHANGE OF..ENDON. These statements as such will have no effect on performance at all. Remember that performance is usually affected most by how you retrieve data from the database (SELECTs)..

Former Member
0 Kudos

there wont be any performance problem when the below are used. The performance affetcs while fetching of data from database.

May be Ur trying to retrieve data from database wherein no key fields are used in where condition or else using <field> > or < <field> in where condition or else using multiple select statements. Even if U try to use Select statements in Loop...Endloop it affects...

Try to optimize ur select statements and program automatically gets performance reduced.

former_member181962
Active Contributor
0 Kudos

Hi Ramesh,

I don't know what are the performance implications with this statement, but SAP says that it is an Obsolete control structure.

You cannot use them in class contexts.(This statement is forbidden in classes).

More over, SAP Hep also says that,

<b>"For each time the statement ON CHANGE OF is executed, the content of all the specified data objects is saved as an auxiliary variable internally in the global system. The auxiliary variable is linked to this statement and cannot be accessed in the program. The auxiliary variables and their contents are retained longer than the lifetime of procedures. An auxiliary variable of this type can only be initialized if its statement ON CHANGE OF is executed while the associated data object is initial. "</b>

Regards,

Ravi Kanth