cancel
Showing results for 
Search instead for 
Did you mean: 

Methods in Web Dynpro View

Former Member
0 Kudos

Hello, experts! I'm new to Web Dynrpo. Could you tell me what the function of every method is in a view (see the picture below), especially for the difference between WDDOINIT and WDDOMODIFYVIEW? Appreciate for your help!

Accepted Solutions (1)

Accepted Solutions (1)

ChandraMahajan
Active Contributor
0 Kudos

Answers (7)

Answers (7)

Former Member
0 Kudos

Dear All,

I think Shelwin got no. of reply for his/her question and all are looks same. So could you please check all these answer and let us know if you have some other doubt related to same, if no. Please close this thread by marking ans as helpful/correct/Assumed ans.

Former Member
0 Kudos

Really appreciate for the help of everyone and really sorry for the late of marking answer! I was on my vacation during holidays of China National Day. Looking forward to your understanding!

Former Member
0 Kudos

Oh yes.Hope you enjoyed

Anyways thanks for your response.

harsha_jalakam
Active Contributor
0 Kudos

WDDOINT - This method would be called only once , i,e during the initialization of the view.

where as the, in the entire lifecycle.

WDDOMODIFYVIEW

method would rendered many times,(called when ever the view is modified).

If the UI elements has to be added dynamically it can be done only in WDDOMODIFYVIEW,

If an  UI element has to be removed / added / modified it can be done only in WDDOMODIFYVIEW

Former Member
0 Kudos

HI  Shelwin,

Webdynpro Development environment/Frame work provideds Object Oriented approach to develop any objects.  In  Object oriented environment you need to write code on Methods.

As we have different controllers in webdynpro development Component controller,View controller, Interface controller .etc.,.

Each control will work for individual task, to perform those task the same controllers should have code part .  To write the code for corresponding/Under those controllers Webdynpro Frame work providing default methods.   These methods are called as "Hook Methods".

WDDO_INIT( ) & WDDO_EXIT( )  methods are common for all controllers .

WDDO_INIT() method  is to write code for initialize .

WDDOMODIFYVIEW() method's code will execute whenever you make changes in UI elements on VIEW.

vijaybhaskarraju_vegesana
Active Participant
0 Kudos

Hi Shelwin,

WDDOINIT - is used for initializing the values (Initializing)

WDDOMODIFYVIEW - Instead of dragging from layout, used for dynamically creating UI buttons...

Regards,

Vijay

former_member184958
Active Participant
0 Kudos

Hi,

WDDOINIT - Like an initialization event i.e when the view get initialize first time it will get trigger.

WDDOMODIFY - Like an At selection screen output event. i.e When the view get any action it will Trigger and also If you pass the parameter First_time = 'X'. then it will work like WDDOINIT.

I hope you understand.

Regards,

John.

Former Member
0 Kudos

Hi,

WDDOINIT Method :

This is the initialization method of the controller. It always runs automatically the first time the controller is called. U can write logic here which will be trigged while loading view for first time.

WDDOMODIFYVIEW Method:  

Method for modifying the view before rendering.

This is the only method in which dynamically modifying the UI controls is permitted. The reference to the view and the information whether this view is displayed for the first time are passed to the method.

FIRST_TIME is an boolean attribute available in WDDOMODIFYVIEW method. Its value is true only when the view is loaded for the first time.

Hope this gives you basic idea.

Best Regards,

Abirami

Former Member
0 Kudos

As Hitesh and Chandra already shared same link two times.

These all are called HOOKS method.
Just search on google "Hooks method in ABAP Web dynpro." You will got no. of solution.

difference between WDDOINIT and WDDOMODIFYVIEW?

Main Difference is WDDOINIT method of view will be called only once when the view gets load in application and visible to you.WDDOINIT is similar to a constructor.

But WDDOMODIFYVIEW will be called every time if you perform some action on view. anything pressing some button, changing some checkbox.

Former Member
0 Kudos