Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

On Change Of

Hi Abapers,

I am using ON CHANGE OF.. But When i check with SLIN,

It Says "ON CHANGE OF is not supported in OO context.use auxiliary fields".

Then What can be used instead of ON CHANGE OF.

Reply Me.

With Regards

Feirthouse.

Tags:
replied

Hi guthus,

Yes. You're right.

ON CHANGE OF is not supported in OO ABAP.

This is an excerpt from the Obsolete ABAP Language Constructs. YOu can define another field to track the changes and process accordingly.

<b>ON CHANGE OF - ENDON not allowed</b>

The pseudo control structure ON CHANGE OF - ENDON is not allowed in ABAP Objects.

<b>Error message in ABAP Objects</b>

if the following syntax is used: ON CHANGE OF f. ... ENDON.

<b>Correct syntax:</b>

DATA g LIKE f.
 IF f <> g. ... 
   g = f.
 ENDIF.

<b>Reason:</b>

A global invisible work field over which the program has no control is created internally.

<b> A separate work field should be declared and processed using the IF control structure.</b>

Also see https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/obsolete abap language constructs.pdf Page #19

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question