Skip to Content

Enhancements enable us to enhance standard or custom Web Dynpro components by UI or by code. Whatever changes that we make are stored in the enhancement and all changes will be reverted back once the enhancement has been deleted.

There are two types of changes that can be implemented – UI changes and Code changes.


UI Enhancements

We can enhance both standard and custom web dynpro applications. For ease of explanation I will be enhancing a custom application.

Here is an example of a custom web dynpro application created by me for which I have implemented enhancements.

/wp-content/uploads/2013/08/1_271158.png

I would like to enhance this custom application by creating a new UI element (new input field)

In order to enhance a view in a WD component, navigate to the required view and click on the following icon.

/wp-content/uploads/2013/08/2_271159.png

Enter the name of the enhancement in the pop up that appears.


/wp-content/uploads/2013/08/3_271164.png

Insert the required UI element (Label and input field) into the view and activate the component.

In the following screenshot a new label and an input field has been inserted.

The Active(Enhanced Implemtn ZENH_ZWEB_1 Active) notification on top of the editor tells us that we are currently working on enhancement ZENH_ZWEB_1. One component can have multiple enhancements.

/wp-content/uploads/2013/08/4_271165.png

A new folder Enhancement Implementations has been created. This folder contains information for all the changes that were incorporated in this enhancement.


/wp-content/uploads/2013/08/5_271166.png

After inserting the UI element you activate and test the application in the browser. A new label and input has been added to component.


/wp-content/uploads/2013/08/6_271167.png

Code Enhancements

Now if we want do a code related enhancement to component, navigate to the respective view and re-select the enhance option (ctrl + f4) and choose the enhancement created by you.

/wp-content/uploads/2013/08/7_271168.png

Go to the methods tab and observe the new Pre-Exit, Post-Exit and Overwrite Exit that are visible against the standard WD methods.

/wp-content/uploads/2013/08/8_271169.png

Click on the create button under the column where you want to write the exit code.

  • Pre-Exit is used to write code which will be executed before the existing method code.
  • Post-Exit is used to write code which will be executed after the existing method code.
  • Overwrite-Exit completely overwrites the previously existed code for that method.

If we were to create a Post-Exit code for WDDOINIT method, click on the create button under the post-exit column. Following screen would appear and the method name would be system generated.

/wp-content/uploads/2013/08/9_271170.png

Save and activate the method, the enhanced method will have the enhanced icon instead of the create icon under the post-exit column.

/wp-content/uploads/2013/08/10_271171.png

This enhancement technique can be very useful while enhancing standard or custom SAP Web dynpro components. There is lot more that we can do with these enhancements depending on our requirements.

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. John K

    Hi,

    In my Enhancement application It will not display the Post, Pre, and Overwrite exit. What can i do.

    Regards,

    John.

    (0) 

Leave a Reply