on 03-11-2011 2:56 PM
Hi All,
I have defined a context node LINES with several attributes. This is done staticly during developmenttime.
During run-time node LINES is extended with several attributes dynamicly. See below:
10 HEADER_GUID ->
11 DETAIL_GUID ->
12 EXTERNAL_ID ->
13 OBJECT_TYPE ->
14 IN_OUT_PLAN ->
15 TRAFFIC_LIGHT_1 ->
16 TRAFFIC_LIGHT_2 ->
17 TRAFFIC_LIGHT_3 ->
18 TRAFFIC_LIGHT_4 ->
19 _LOCATION \TYPE=STRING ->
20 _ZZTOPGROUPING \TYPE=STRING ->
21 _STATUS \TYPE=STRING ->
22 _100000200 \TYPE=STRING ->
19..22 are added dynamicly.
I have an internal table that matches de new context. This <fs_tb_tree_new> I want to bind like:
*&- bind table
lr_node->bind_table( new_items = <fs_tb_tree_new>
set_initial_elements = abap_true ).
In <fs_tb_tree_new> the dynamicly added attrbutes contains values e.g. (the static attributes also have values via <fs_tb_tree_new>):
_LOCATION _ZZTOPGROUPING _STATUS _100000200
5 Africa 0002 Reporting Entity 0.000
6 Russia, CIS 0003 Identify 0.000
An ALV presents the values of the attribute. But.... only the values of the static part are presented, not the dynamic attributes added during runtime.
Please advise what I forget or do wrong .
Thanks in advance.
John
Hi John,
All you need to do after binding the data to the node is bind the node to the ALV component again using the SET_DATA method of the ALV interface controllr a.
Regards,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
For static ALV, we map the node containing data to the DATA node of the ALV component.
In your case do not map the node to the DATA node of the ALV component, Instead use the SET_DATA method of the ALV interface contoller and pass the node reference to this method after binding the data to the node.
Regards,
Madhu
I solved the issue:
If you use a combination of static attributes added with dynanic attributes (during runtime) for dynamic ALV, I advise to create a new node and bind the values to this new created node:
Cheers, John
wd_this->extend_context( EXPORTING im_struc_descr = lr_cl_abap_structdescr
IMPORTING ex_node = lr_node_alv ).
Method:
*&- Create new dynamic context LINES_DYN
Node for alv-table
lr_node_info = wd_context->get_node_info( ).
CALL METHOD lr_node_info->add_new_child_node
EXPORTING
name = 'LINES_NEW'
static_element_rtti = im_struc_descr
is_static = abap_true
is_multiple = abap_true
is_multiple_selection = abap_false
RECEIVING
child_node_info = lr_subnode_info.
lr_node = lr_subnode_info->get_parent( ).
lr_node = wd_context->get_child_node( 'LINES_NEW' ).
ex_node = lr_node.
*&- bind table for alv
lr_node_alv->bind_table( new_items = <fs_tb_tree_new>
set_initial_elements = abap_true ).
...
....
I am not sure if Dynamic attributes are supported in ALV . i THINK IT IS NOT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kranthi
SO I need to copy my combined Node (STatic and dynamicly added attributes) to a new dynamic Node (with add child node) ? Then it certainly must work ?
But is is only for ALV or do we face the same problem if we want to extend an hier. tree e.g. ?
Thanks for your help.
Point we be given.
John
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.