on 05-17-2010 6:54 AM
Hello All,
I want to make ALV table invisible when there is no data in it. At the same time, when data is present I want ALV table to be visible. I have used the following method for that.
lv_value->if_salv_wd_table_settings~SET_VISIBLE( '01' ) in WDDOINIT.
lv_value->if_salv_wd_table_settings~SET_VISIBLE( '02' ) based on user ACTION.
Though the ALV table is not displayed initialy, its not getting displayed when the data is present.
Please help me regarding this.
Regards,
Yugesh A.
Hi,
u can declare one variable of type wdui_visibility and bind the view element of alv to variable.
if table exists data then pass '02' to variable if not pass '01'
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can also proceed as follows:
1) Create attribute of type char1 in the context
2) Bind the visibility property of view container UI element ui element with this attribute (Click on the 'Binding' button next to 'visible' property of ui element. A popup will appear with context node details. Select the property created in first step)
3) In code, check the content of the node (to which ALV is bound).
If no record exists in the node
Set the value of attribute created in step 1 to ' ' (space) to make that ALV invisible
else
Set the value of attribute created in step 1 to 'X' to make it visible.
Regards,
Saket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
rather than setting the table like this, why not set the visibility of the view container that you embedded the ALV component into?
Then you can be sure of when the visibility settings will be applied.
I'd recommend using the constants
cl_wd_uielement->e_visible-none
and
cl_wd_uielement->e_visible-visible
also. If for no other reason than to make your code more readable,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.