cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the Enhanced Standard Components in Web Dynpro ABAP

Former Member
0 Kudos

I Enhanced a Standard Components,Though I can ADD UI element or delete UI element, I can't change standard UI element.

I want to know how to solve this problem.

Maybe what do something in SPRO.

THANKS.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can do one of two things:

- Hide the standard UI element, add your own copy of that UI element in its place with all the changes you need.

- Dynamically change the properties of a UI element. Each UI element is a represented by a class that is a child of class CL_WD_UIELEMENT. For example, an input field is represented by CL_WD_INPUT_FIELD. The view object has a method call GET_ELEMENT. You pass the element name to that method and it returns an instance of the UI element that you can dynamically manipulate.

Former Member
0 Kudos

By the way, the second option I mentioned above should be implemented in a POST EXIT of the WDDoModify so that your changes supersede the standard implementation. Further to Jan's point, this technique is very powerful as you can pretty much manipulate all UI element properties dynamically using this technique (including binding elements, etc.). You need to be very careful with this. Remember, with great power, comes great responsibility.

Answers (1)

Answers (1)

Former Member
0 Kudos

PS:I want to add a action event on the standard UI element

Former Member
0 Kudos

Hi Liu,

You can't change the standard UI elements like adding or changing events. If the standard ui element property is bound to a context element then you can of course manipulate the context element.

For your scenario I would copy/paste (ctrl+c, ctrl+v in case right click method doesn't work for copying) the UI element into your own version which can also be done as enhancement. Then you can change the event there and hide the standard ui element. And by copying you don't have to enter all the properties '

Br Jan