on 07-17-2012 6:34 AM
Hi Guys,
I am controlling the visibility of fields using context attribute bind to the visibility property of the respective field.
I am using a Boolean type ABAP_TRUE and ABAP_FALSE for the binding context attribute.
but still the fields are still visible even when it has value ABAP_FALSE.
Wondering how to debug the code in FPM ?
Cheers
Sam
Hi Sam,
Define your context attribute which will control visibility as type WDY_BOOLEAN. Then bind the visibility property of the UI element to this context attribute. In your code, you should be able to continue to use ABAP_TRUE and ABAP_FALSE when setting the value of the context attribute.
lo_nd_visible = wd_context->get_child_node( name = wd_this->wdctx_visible ).
lo_el_visible = lo_nd_visible->get_element( ).
lo_el_visible->set_attribute(
name = `ATTRIBUTE_NAME`
value = abap_false ).
Be sure that the code which toggles visibility true or false is really executing. You can do this by setting an external breakpoint in the code which sets visibility to false, then run your application. If you do not hit the breakpoint, then your code is not executing and you may need to set the visibility elsewhere in the process flow.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
Try like this,bind your filed to attribute with WDUI_VISIBILITY data type.
lo_nd_visible = wd_context->get_child_node( name = wd_this->wdctx_visible ).
lo_el_visible = lo_nd_visible->get_element( ).
lo_el_visible->set_attribute(
name = `FIELD_ID`
value = '01' )."Hide'"
lo_el_visible->set_attribute(
name = `FIELD_ID`
value = '02' )."Show
Thanks,
Lavanya.
Hi,
The visible property has two possible values, None - 00 and Visible - 01.
You can set the value using type WDUI_VISIBILITY which should theoretically be used for handling visibility.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For controlling visibility I would use one variable of type WDR_BOOLEAN and bind with visibility property and set it X or space depending on condition when to make visible or not visible.
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 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.