cancel
Showing results for 
Search instead for 
Did you mean: 

On Change Of

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Thanks Wenceslaus. It Solved My Problem

Answers (2)

Answers (2)

Former Member
0 Kudos

What exactly are you trying to achieve? Can you explain in detail.

Regards,

Ravi

aris_hidalgo
Contributor
0 Kudos

Hi feirthouse,

You could do manual coding to know if there's a change in the field. Or try using At New. Please click on the star on the left if it helps.