cancel
Showing results for 
Search instead for 
Did you mean: 

Significance of OnBeforeAction and ModifyView in Webdynpro ABAP.

vimal
Active Participant
0 Kudos

Hi all,

I want to know the significance of OnBeforeAction and Modifyview. BeforeAction is also called everytime like modify view. So can we write any type of code on any trigger? e.g I want to validate a field which trigger will be best suited and Why ? Please explain in detail.

Thanks,

Vimal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Vimal,

The purpose of Modify_view is mainly when you want to do some dynamic modification on the screen. For example if you want to set a default sorting on some column on a table. In modify_view method you have the instance of view from which you can get instance of any off the used UI element and you can perform any dynamic modification to that UI element.

For example obj_table ?= view->get_element( 'TABLE' ).

Before_action method is mainly used when you want to do some validation on some actions. As soon as you perform any action before_action is triggered.

Also if there is any common functionality that you want to perform on all the actions can be written in before_action method.

Hope this helps you... If not i will give you more practical examples.....

Answers (2)

Answers (2)

iftah_peretz
Active Contributor
0 Kudos
ronaldo_aparecido
Contributor
0 Kudos

Hi Vimal

The 'Modifyview' is used more when you have a main application and it uses 'TABSTRIPS', where each Tab has a different program Webdynpro.

Clicking on a TAB you activate 'Modifyview', but the 'BeforeAction' acts only within the selected TAB.