cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic View Creation.

Former Member
0 Kudos

Hi

I have 2 views in one component ...in first view table contains one column with link to action and view container..second view is dynamically generated and embedded in view contianer..when i click on lead selection it should generate a view.but it is generating initially ...on changing lead selection ..dynamic view i s not generating ERROR LIKE " view with ID 'TC' already exists"..

Can any one tell me how to clear previous id 's.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

For that you have declare one global variable in which you store the flag for first time view.

if flag ne X.

then it will show else just refresh the value of view by global binding

Former Member
0 Kudos

Hi ,

iam Declared On attribute in comp controller , That attribute used in modify View --Iam Given the code as if first time = Abap_true or Attribute = Abap_true ....In IF condition iam checking both attributes..

Can you please explin me must Better.

thanks

vasavi.

Former Member
0 Kudos

As you declared the variable in comp controller.

Set the variable value first time eq X

then put the check before

if flag nE x

wd_this->fire_to_table_view_plg(

).

endif,

After that refresh table with new data

Former Member
0 Kudos

You can use reset the view . This will make sure that the dynamically created UI elements are destroyed.

lo_view->reset_view( ).

Former Member
0 Kudos

Hi ,

Thanks for your replay

PLease tell me What is Lo_VIew ......Is it Variable or View name...

If it is variable what type need to assign are please tell me clear about that its use full...

thanks ,

Vasavi

Former Member
0 Kudos

Hi ,

And please tell me that Dynamic Node also will Clear are not.

Thanks,

Vasavi

Former Member
0 Kudos

data:

lo_view type ref to if_wd_view.

wddomodify view has a parameter view.

assign the view to local variable like below or define a attribute go_view in the controller and use it.

lo_view = view.

Former Member
0 Kudos

Dear Vasavi,

There's clearly a problem on you View's method WDDOMODIFYVIEW.

I recommend that you debug and see what is happening inside that method.

Each UI element should have its oun UNIQUE ID at runtime.

For example - you can't have 2 buttons with the exact same ID on the same View.

And that applies to any other UI element.

So please check on that method how are you assigning those IDs to your UI elements.

If you want to know more about that method, here's a good link for you to start with:

[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8402] [original link is broken] [original link is broken] [original link is broken];

Kind Regards

/Ricardo Quintas