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

performance problem using on change

Former Member
0 Likes
743

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
Read only

Former Member
0 Likes
714

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
714

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

Regards,

Rich Heilman

Read only

Former Member
0 Likes
714

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)..

Read only

Former Member
0 Likes
714

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.

Read only

Former Member
0 Likes
715

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