cancel
Showing results for 
Search instead for 
Did you mean: 

Disable/enable dynamically a WD Enhancement @ runtime

matteo_montalto
Contributor
0 Kudos

Hi everybody,

just for the sake of curiosity... is anyone aware of a method that allows to dinamically turn off a WD Enhancement at runtime, on the basis of certain assumptions?

The real scenario is as follows; we implemented a lot of custom elements and routines by means of WD enhancement on a WD Component; lately, we found out that the same WD Component is also used for a specific scenario we didn't support until ...yesterday.

In this new usage, the WD dumps horribly as the context elements used in the previous scenario are not consistent w.r.t. our WD Enhancement, therefore I'd like to understand if it's feasible to activate/deactivate a WD enh at runtime.

Suggestions and hints are highly appreciated! 😉

M.

Accepted Solutions (1)

Accepted Solutions (1)

former_member197475
Active Contributor
0 Kudos

Hi,

If you don't wish to have your enhancements, why don't you want to use if furthermore. Even turning off the enhancement in the switch framework is a performance factor.

So in that case, it's better to delete the enhancement.

BR,

RAM.

matteo_montalto
Contributor
0 Kudos

Nope, that's not the case.
I need my enhancement in some cases; in others, I should deactivate it at runtime.

To clarify a bit the situation; I'm dealing with a WD Component in SRM, used to render Customer tabular extensions both at Header and at Item's level. The WD is exactly the same, but since few days ago, we only used it by standard for Header's custom tab extension.

Now we have to re-enable that WD Component also at item's level, but off course, since our dev was Header-driven, the system dumps.

I know I should perform a complete rework on the enhancement spots in order to contemplate both the usages, but I was wondering if it's worthy to dynamically disable an Enh at runtime because this would easily make my day.

harsha_jalakam
Active Contributor
0 Kudos

Hi Matteo,

In this scenario, it is better to handle through coding, rather than enabling/disabling the enhancement..

Regards,

Harsha

Answers (4)

Answers (4)

Sudhakargadde
Participant
0 Kudos

Hi Matteo,

As you mentioned that particular enhancement is executed for certain condition only we know the DYNPRO code like SY-TCODE only we need to execute the code or based on the authorization of the person we need enable the code by condition, please let us know if i'm wrong.

Regards,

Sudhakar.

matteo_montalto
Contributor
0 Kudos

Thanks to you all, I'm going to rework on the enhancement in order to prevent dumps .

harsha_jalakam
Active Contributor
0 Kudos

Please check this thread,

under the section Why and How to Make Your Enhancements Switchable

harsha_jalakam
Active Contributor
0 Kudos

Hi Matteo,

It is better to delete the particular enhancement created for the component which is creating dumps, if you want to disable the enhancement.

Further even it can switched on or off with Switch Framework. Please check following thread which might help. I havent tried this yet, let me know in case if there is something needs to be done rather than marking the swich position to off in the properties tab of the enhancement.

https://help.sap.com/saphelp_nw73/helpdata/en/af/e8b540afc87c2ae10000000a155106/frameset.htm

Regards,

Harsha