08-04-2015 6:38 AM
HI Gurus,
I enhanced a standard Class, to created a over-write method. But Now i do not want this implementation run,
how to make it? And I do not want delete it at all.
I tried inactivate the enhancement implementation also inactivete that method. But still run the old active one.
Thank you.
regards,
Archer
08-05-2015 8:28 AM
Hello
In the Enhancement you can use switches to activate/deactivate enhancements:
In the property-Section of the Enhancement you can enter a switch.
It is possible to create own switches and use them in own enhancements, but I don't know how to create, because I never needed.
I am not sure, but I think, that switches can only be activate one time and then you can not deactivate them again.
Otherwise I would comment the Code or, if you need to change it often, write a Method or function to check, if your implementation is active or inactive at the moment. Use the Name of the Enhancement as a Parameter and you can reuse this method, if you need it in an other enhancement.
regards,
Peer.
08-04-2015 7:03 AM
08-04-2015 8:08 AM
Hi,
I suggest you to delete over-write method as it over writes the standard execution methodology of that method i.e it act as a replacement at run time for the original method
Thanks
KH
08-04-2015 9:56 AM
Is there a way like in new BADI, you can setting the 'Runtime behavior', run or not run.
If have no choose, i only to delete my over-wirte method. But after deleted, i want run my over-write method, recreate it again? Does not make sence.
Regards,
Archer
08-04-2015 10:26 AM
You can create a custom kernel BADI and put your code inside one of the implementation of that BADI Method and then you can easily activate / Deactivate the code. But transport dependency will anyway be there.
And obviously call the Code by GET BADI and CALL BADI options.
R
08-04-2015 11:02 AM
Hello!
Run transaction SE20, find your enhancement and try to deactivate it.
08-05-2015 3:01 AM
hi Vadim, i tired this and even deactivate my over-write method. Still run previous active one version.
08-04-2015 1:09 PM
Dengyong,
What about the possibility of creating a pre method and control the execution of the over write method thru the pre method?
V.
08-05-2015 8:28 AM
Hello
In the Enhancement you can use switches to activate/deactivate enhancements:
In the property-Section of the Enhancement you can enter a switch.
It is possible to create own switches and use them in own enhancements, but I don't know how to create, because I never needed.
I am not sure, but I think, that switches can only be activate one time and then you can not deactivate them again.
Otherwise I would comment the Code or, if you need to change it often, write a Method or function to check, if your implementation is active or inactive at the moment. Use the Name of the Enhancement as a Parameter and you can reuse this method, if you need it in an other enhancement.
regards,
Peer.
08-05-2015 11:10 AM
Hi Peer,
Seems a 'switch' is that wanted.
I tried create my own switch and assigned that package where implementation at, create business function and set also. But fail at SFW5, 'No Authorization' to set switch status on. "Who is SAP_ALL, f......g out".
I need fighting more on switch framework. Do not want develop more code to control it. i`m lazy.
Thanks all.
Regards,
Archer