‎2006 May 11 11:48 AM
Hi friends,
I have used the statement:
"ON CHANGE OF........ENDON." in my program.
during extended check in program.... this satement is showing as obsolete statement error.
The error is as follows:
" The current ABAP command is obsolete and problematic, especially so in ABAP
Objects
"ON CHANGE OF ... ENDON" is not supported in the OO context."
Can you give any way to get rid of this? What can i use instead of this statement?
As this is very necessary in my program. I am not finding any solution.
Please help me out....
Thanks,
Chinmay
‎2006 May 11 11:51 AM
‎2006 May 11 11:51 AM
Hai Chimay
Use At NewEnd At. instead of On changeendon.
Thanks & Regards
Sreenivasulu P
‎2006 May 11 11:51 AM
Hi Chinmay,
You can use At New. But for this it would be better if that field is the first field in the internal table.
Thanks and Regards,
Bharat Kumar Reddy.v
‎2006 May 11 11:51 AM
HI
GOOD
WHAT VERSION YOU R USING NOW ,IT SHOULD NOT GIVE IN 4.6C OR ABOVE,IF STILL YOU R GETTING ANY ERROR IN EXTENDED CHECK THAN ITS NOT AN ERROR BUT A WARNING.YOU CAN GO AHEAD WITH THAT AND YOU WILL GET THE CORRECT RESULT.
THANKS
MRUTYUN
‎2006 May 11 11:51 AM
‎2006 May 11 11:51 AM
on change of is obsolete statement so u r getting this message,
use at new to get rid of this.
or else if at new doesnot solve ur problem,
see the following
The pseudo control structure ON CHANGE OF - ENDON is not allowed in ABAP Objects.
Error message in ABAP Objects if the following syntax is used:
ON CHANGE OF f.
...
ENDON.
Correct syntax:
DATA g LIKE f.
IF f <> g.
...
g = f.
ENDIF.
Reason:
A global invisible work field over which the program has no control is created internally. A separate work field should be declared and processed using the IF control structure.
‎2006 May 11 12:49 PM
Hi chinmay,
u can use at new <fd>... endat or at end of <fd>... endat whichever is suitable for ur case.
Award points if helpful.
regards,
keerthi.
‎2006 May 11 1:26 PM
Hi Chinmay
Dont use ON change of because SAP is not supporting this in later versions.
Instead of On change you can use at new and end at
It will work correctly.
Regards
Sumit Bhutani