on 03-10-2011 9:38 AM
Hi WD guru's,
I do not have much experience with WD ABAP, but I have to finish one application.
I need to know how to delete / hide or somehow make invisible alv table if there is no data in the table, table is generated dynamically, and its content depends on submitted report (chosen from drop-down list in view) Binding and selection of data is done in one method of COMPONENTCONTROLER. I managed to remove the child note from context and show message that no data were selected, but the table is still shown on the view (data in the table is from previously run report)
method in COMPONENTCONTROLER,
takes input data from view ("web site")
submits report (FM submit_report) also is there any way how to put errors from submitted reports to table and hadle
them myself? thats probably for other thread
reads report result from memory
if there is list in memory
creates context node / child for alv table
creates fieldcatalog
bind data
else
this is where I would like to delete / hide table, if there is no data and the node is created, currently I just show
message and remove child from root element, but the shown table is not deleted from web site / view
endif
endmethod.
I have no idea how to do this, every suggestion will be welcomed and appreciated
Thank You
Best Regards
Martin
Check the size of the node which is mapped to DATA node of ALV compoenent
and control the visiblity of the viewcontainer .
data nd type ref to if_wd_Context_node.
nd = wd_cotnext->get_child_node( ' <Node name>' ).
data count type i.
count = nd->get_element_count( ).
if count eq 0.
"hide the viewcontainer.
else
"make it visible.
endif.
thanks
sarbjeet singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
To put it simple, Create a attribute in context and bind it to the visible property of the Viewcontainer UI element holding the ALV.
Put the default value as X.
If the data and node is initial, Set this attribute to abap_false using the set_attribute method.
Hope it helps.
Regards,
Madhu
Hi ,
Bind the visibility property of the viewContainer to a context attribute of type WDUI_VISIBILITY.
Set this attribute with values as per your requirement as told in the above post.
CL_WD_UIELEMENT=>E_VISIBLE-NONE ---for hiding
CL_WD_UIELEMENT=>E_VISIBLE-VISIBLE---for displaying.
Thanks,
Aditya.
One of the way that i am thinking is to embed the ALV_table interface view in your view using a ViewContainerUIElement.
and set the visibility of the ViewContainerUIElement based on your requirement to visible or none.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.