2008 Jan 14 10:14 AM
Hi,
I am using ON CHANGE OF statement in a program.
When I execute program from SE38, the ON CHNAGE OF command is getting executed correctly.
When I execute the same program again in the same session (without opening it using /nse38), the ON CHANGE OF command is not working correctly. The program control is not going inside ON CHANGE OF.
I think the contents of internal table field during ON CHANGE OF go into some session buffer, which is not getting refreshed when I execute the same program again in same session. But I am not sure is this the problem.
Please help me how I can solve this problem. I want that ON CHANGE OF executes correctly even if I execute same program multiple times without refreshing session.
Regards,
Vijay
Hi,
I am using ON CHANGE OF statement in a program.
When I execute program from SE38, the ON CHNAGE OF command is getting executed correctly.
When I execute the same program again in the same session (without opening it using /nse38), the ON CHANGE OF command is not working correctly. The program control is not going inside ON CHANGE OF.
I think the contents of internal table field during ON CHANGE OF go into some session buffer, which is not getting refreshed when I execute the same program again in same session. But I am not sure is this the problem.
Please help me how I can solve this problem. I want that ON CHANGE OF executes correctly even if I execute same program multiple times without refreshing session.
Regards,
Vijay
2008 Jan 14 10:16 AM
hi Vijay,
surprisingly enough, but you have to debug your program... Looks like a variable is not CLEARed.
ec
2008 Jan 14 10:19 AM
Hi,
Read this.
ON CHANGE OF is unsuitable for recognizing control levels in loops of this type because it always creates a global auxiliary field which is used to check for changes. This global auxiliary field is only changed in the relevant ON CHANGE OF statement. It is not reset when the processing enters loops or subroutines, so unwanted effects can occur if the loop or subroutine is executed again. Also, since it is set to its initial value when created (like any other field), any ON CHANGE OF processing will be executed after the first test, unless the contents of the field concerned happen to be identical to the initial value.
Regards,
Pankaj
2008 Jan 14 10:24 AM
Hi Pankaj,
You are right.
But is there some way to refresh global auxiliary field.
Thanks,
Vijay
2008 Jan 14 10:38 AM
Hi Vijay,
I am not aware on how to refreshing global auxiliary field.
But if there is a way, still it can cause some problem because multiple instances of same program would be using this field and if you refresh that in one instance it would affect all.
Instead of using ON CHANGE OF f; You can try with statement AT NEW f.
Regards,
Pankaj
2008 Jan 14 10:27 AM
Hi,
try using statements like the following before start-of-selection.
refresh itab[].
or
clear itab[].
Regards,
Renjith Michael.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |