cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancing standard WD ABAP Component!!!

Former Member
0 Kudos

Hi Experts,

I am enhancing some WD ABAP components by creating enhancement implementation. But in the enhancement implementation I am able to create new UI Elements, Views, Methods etc. But it do not allows me to change the Properties of preexisting standard UI elements and Methods like wdinit, wdmodifyview etc. But if I open the WD ABAP component and start working on the application in change mode out of the enhancement implementation it only warns me to make changes in the standard component if necessary and after that I can modify the standard UI Elements and methods. It only asks me for a transport request when I activate it.

Now what I want to know is:

Suppose I make changes out of the enhancement component as explained the way above would these changes remain intact even when we apply any enhancement pack to the system or not. If not then what is the way to make enhancements (not changes) in the Existing UI elements and methods like wdinit, wdexit etc. Please suggest.

Thanks and Regards,

Vaibhav Tiwari.

Accepted Solutions (1)

Accepted Solutions (1)

Yashpal
Active Contributor
0 Kudos

Hi Vaibhav,

you cannot change the property of the UI elements but u can make invisible them and create your own UI elements and binding the properties as you like.

for enhancing the method like wddoinit.. u can add the code before and after the method , but not in between the code. you can enhance by getting in the enhancement mode ,in the method tab you will find two new columns called preexit and postexit for the method in that u can write ur own code.

Regards

Yash

vaibhav_tiwari
Contributor
0 Kudos

Hi Yashpal,

Thanks for your useful answer. Actually what I need to do is to hide some standard UI Elements on a Standard view. For that should I do such that the thigs get enhanced not modified.

Thanks and Regards,

Vaibhav Tiwari.

Yashpal
Active Contributor
0 Kudos

Yes u can hide by right clicking on the UI element in the tree and make them invisible in enhance mode .

Regards

Yash

vaibhav_tiwari
Contributor
0 Kudos

Hi Yash,

I am not getting the option to change the property of UI Element in enhancement mode on right clicking on it. Please suggest how to do it.

Regards,

Vaibhav Tiwari.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>you can enhance by getting in the enhancement mode ,in the method tab you will find two new columns called preexit and postexit for the method in that u can write ur own code.

Actually there is a third option as well called Overwrite Exit. This completely replaces the implementation of the standard with with your custom one. This can allow you greater control. Although it surrvives an upgrade as well, be careful as you will be bypassing any of the logic that SAP places into the method you are overriding.

In enhancement mode you can't change the property of UI elements, but you can remove them. Just right mouse click on the UI element in the UI element tree and choose Remove Element. It won't actually be deleted completely - just marked with a red X. You can then easily undo the deletion at any later point.

vaibhav_tiwari
Contributor
0 Kudos

Hi Thomas,

I have made the changes as you suggested but there is a problem for two UI Elements. It seems that they are used at run time to modify there properties or values. So when I remove these UI Elements this error "Element Not found" occurs at run time. Is there any solution to handle this.

Thanks and Regards,

Vaibhav Tiwari.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That is part of the risk that you run when you enhance standard SAP components. You have two choices. First if you just want to hide the fields, try creating a component configuration for the component and just changing the field's visible property. This should still allow the dynamic code to process.

The other option would be to use a Overwrite method enhancment and remove the SAP coding that is performing the dynamic access to the UI elements - but this comes with a risk that you get out of sync with import code changes to the component over time.

Answers (0)