on 01-28-2013 2:39 PM
Hi Guys,
I have an structure mapped in the context and one field is a table. At the beginning I need to initialize this table but the others are useless. Using Web Dynpro Wizard with the instruction set selecting this attribute, I have a problem at runtime
How can I load a field whose type is a table? An example would be very useful, please.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sergio,
you can go with the following approach.
DATA lo_nd_node_name TYPE REF TO if_wd_context_node.
DATA lo_el_node_name TYPE REF TO if_wd_context_element.
DATA ls_node_name TYPE wd_this->element_node_name.
* navigate from <CONTEXT> to <NODE_NAME> via lead selection
lo_nd_node_name = wd_context->get_child_node( name = wd_this->wdctx_node_name ).
* get element via lead selection
lo_el_node_name = lo_nd_node_name->get_element( ).
Data lt_sflight TYPE TABLE OF SFLIGHT.
SELECT * from Sflight INTO TABLE lt_sflight.
ls_node_name-table = lt_sflight. * this contain a attribute of table type 'SFLIGHT'
* get all declared attributes
lo_el_node_name->set_static_attributes(
EXPORTING
static_attributes = ls_node_name ).
Regards,
Monishankar Chatterjee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try using bind_structre method of if_wd_context_node instead of set_attribute of if_wd_context_element
hope it help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
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.