on 04-07-2014 5:35 AM
Dear Friends,
i have table with multiple line items, i want to validate first line item only, if first line item is initial, it should throw an error message, could any one pls help me with an example
Thanks
Vijaya
Col1 | Col2 | Col3 |
Hi Vijaya,
Method get_static_attributes_table of interface if_wd_context_node will return a table of context elements. You can then either read the first row of that table or loop through it to validate the table's data and issue messages as needed. For example...
data lo_nd_ctx_node type ref to if_wd_context_node.
data lt_attributes_table type wd_this->elements_ctx_node.
lo_nd_ctx_node = wd_context->get_child_node( name = wd_this->wdctx_ctx_node ).
lo_nd_ctx_node->get_static_attributes_table( importing table = lt_attributes_table ).
If the row to be validated happens to be the table's lead selection, you can fetch attributes of the lead selection row directly, and again validate and issue messages as needed...
data lo_nd_ctx_node type ref to if_wd_context_node.
data lo_el_ctx_element type ref to if_wd_context_element.
data ls_attributes type wd_this->element_ctx_node.
lo_nd_ctx_node = wd_context->get_child_node( name = wd_this->wdctx_ctx_node ).
lo_el_ctx_element = lo_nd_ctx_node->get_element( ).
lo_el_ctx_element->get_static_attributes( importing static_attributes = ls_attributes ).
Both of these code patterns to read context data are available through the Web Dynpro Code Wizard.
Cheers,
Amy
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 | |
6 | |
6 | |
6 | |
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.