on 05-14-2007 5:45 PM
Hi.
I have a strange problem with dynamically setting the data of ALV. I call a generic
report frameowork which returns the name of the data structure and a result table
of this structure. So I dynamically create a context node of this structre and bind
the table. Then I call the set_data method of the ALV component to show the data
and navigate to a view which contains the ALV table.
The table footer indicates the actual row was 22 of 21 and there is the message
that the table does not contain any visible columns. When I navigate back and
resubmit the report everything works fine and the data gets displayed.
I use the following code to set the node dynamically:
MOVE ls_report_cust-result_struc TO lv_nodename.
lr_rootnode_info = wd_context->get_node_info( ).
cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
parent_info = lr_rootnode_info
node_name = lv_nodename
structure_name = lv_nodename
is_multiple = abap_true ).
lr_resultnode = wd_context->get_child_node( name = lv_nodename ).
lr_resultnode->bind_table( <fs_resulttable> ).
* create new instance of the ALV component
* and set the table to display.
lr_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
IF lr_ref_cmp_usage->has_active_component( ) IS INITIAL.
lr_ref_cmp_usage->create_component( ).
ENDIF.
lr_ref_if_contrl = wd_this->wd_cpifc_alv( ).
lr_ref_if_contrl->set_data(
r_node_data = lr_resultnode
).
I also tried to use the create_new_child_node method but without success.
Any ideas?
Thanks in advance,
Sascha
I have done the same thing before and it has worked for me. The only difference that I see between this and my code is I have used bind_elements in place of bind_table. But that hardly matters!
Are you sure the node is not getting invalidated anywhere?
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.