on 08-29-2013 5:24 PM
Hello Experts,
I've a requirement where I've to check certain values in a custom table and then based on those I need to make a table readonly at the run-time. I've been able to bind my table successfully but wondering if I can use any method or property to make my table read-only. Can somebody please advice how to accomplish it?
*binding
lo_nd_rerate_dtl = wd_context->get_child_node( name = wd_this->wdctx_rerate_dtl ).
lo_nd_rerate_dtl->bind_table( new_items = it_all_invoice_items set_initial_elements = abap_true ).
Many thanks in advance.
Hi Zero,
The Table UI element has a readOnly property that you can bind to a context attribute or set statically in the view layout.
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 Zero,
The Table's readOnly property is of type wdy_boolean. Assuming you have bound the property to a context attribute of the same type, you can use the code wizard to generate the code to set the context attribute value to true or false, for example...
data lo_nd_mynode type ref to if_wd_context_node.
data lo_el_mynode type ref to if_wd_context_element.
lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ).
lo_el_mynode = lo_nd_mynode->get_element( ).
lo_el_mynode->set_attribute(
name = `BOOLEAN_ATTRIBUTE`
value = abap_true ).
Cheers,
Amy
Hi,
In addition to Amy's suggestion, Check this related document: http://scn.sap.com/docs/DOC-27125
Hope this helps u.,
Regards,
Kiran
Take a new attribute"Read_only" of type wdy_boolean. Based on that condition set the attribute to abap_true if u want to make it read only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.