cancel
Showing results for 
Search instead for 
Did you mean: 

How to get View Instance before hook method Windoinit.

Former Member
0 Kudos

Hello experts:

I am doing a development, it requires to get current View instance before Hook method Windoinit is executed. I found the view instance can be get from 'WDDOMODIFYVIEW', but it is too late for me, is there any new approach to get the view instance ?

Thanks in Advance,

Samuel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

What is your requirement....there is no way to get the view instance.....before doint gets called.

Regards,

Lekha.

Former Member
0 Kudos

Hello Lekha,

Thanks for your answer, my problem is I need to set a default selection of Tree UI component, I use the method :

CALL METHOD cl_wd_dynamic_tool=>set_tree_lead_selection

EXPORTING

i_wd_tree = wd_comp_controller->mo_tree_ui

i_new_lead_selection = lo_el_shift_old

i_prev_lead_selection = lo_el_shift_new.

to realize this. you can see if I want to use the above method, I have to initialize the Tree component 'wd_comp_controller->mo_tree_ui' at first. and I get the Tree component Instance for current View Instance.

It is possible get View instance in WDDOINIT method ?

Best Regards,

Samuel

Former Member
0 Kudos

As it is a dynamic programming, you need to use the MODIFYVIEW iteself....

try to use the FIRST_TIME attribute of this mehtod.. store the tree reference globally and 2nd time onwards you can use it..

Former Member
0 Kudos

Ok. Thanks a lot, I think it is the only way to get View instance in DOMODIFYVIEW....

Answers (0)