on 02-22-2013 11:41 AM
Hi Friends,
1. I have created inputfield,button and table dynamically.
2. based on input CARRID ,table should appear.
3. If CARRID = 'AC' the table should be invisible else table should be visible.
First time i entered 'AA' as input, table got created with values.Next time i change the input as 'AC' .,i m not able to invisible the table.
Please guide me regarding this.
Best Regards,
Narasimha.
try using below code
DATA wd_table TYPE REF TO cl_wd_table.
wd_table ?= view->get_element( '<created table>' ).
wd_table->set_visible( abap_false).
or
you can bind dynamic_table's visibility with a attribute of type wdy_visibility and change this attribute as per your need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai Jitendra,
I wrote the logic as below. but it is showing error like
IF lv_carrid <> 'AC'.
CALL METHOD cl_wd_dynamic_tool=>create_table_from_node
EXPORTING
ui_parent = lr_container
table_id = 'TAB'
node = lo_nd_sflight
* on_lead_select =
RECEIVING
table = lr_table.
* ENDIF.
ELSE.
DATA wd_table TYPE REF TO cl_wd_table.
wd_table ?= view->get_element( lr_table ).
wd_table->set_visible('01').
lo_nd_sflight->invalidate( ).
Hi,
While creating the table using the dynamic class, get the object reference for the table and store it in the attribute of the view controller or component controller.
call method cl_wd_dynamic_tool=>create_table_from_node exporting
ui_parent = lo_container
table_id = 'SELECTED'
node = wd_this->lo_selected
receiving table = wd_this->lo_table.
In the method or event handler where you want to hide the table write the following code.
call method wd_this->lo_table->set_visible
exporting
value = 01.
Regards,
Arun Krishnamoorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create a context attribute of type WDUI_VISIBILITY and bind this to the visible property of the table.
Based on your condition say 'AC' set this created context attribute to '01' - None...this should work.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Narasimha,
Refer following links.Hope it might help you.
http://webdynproabap.wordpress.com/2012/10/08/dynamic-ui-element/
http://scn.sap.com/thread/1656054
Thanks
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.