2022 Aug 18 9:20 AM
Hello Experts,
First time I am using CL_SALV_TREE to create Hierarchy ALV for multiple Production Order report display, the logic is working fine for different material/component.
When same parent and child component are same than third child link with the last child component which have to be linked with parent component
If the material having same name of node and item its working
but material having same name of node and node its not working
Required this way
but the out put coming
LOOP AT gt_hier ASSIGNING <fs_hier>.<br>IF <fs_hier>-parent = ''.<br>DATA(lv_tabix) = sy-tabix.<br>* Add the node as root<br>lo_node = lo_nodes->add_node(<br>related_node = ''<br>relationship = if_salv_c_node_relation=>parent<br>row_style = if_salv_c_tree_style=>emphasized_b ).<br>ELSE.<br>* Read the ALV key of parent node and add as a child<br>LOOP AT gt_hier INTO ls_hier FROM lv_tabix.<br>IF ls_hier-node = <fs_hier>-parent.<br>lo_node = lo_nodes->add_node(<br>related_node = ls_hier-key<br>relationship = if_salv_c_node_relation=>last_child ).<br>EXIT.<br>ENDIF.<br>ENDLOOP.
Hello Experts,
First time I am using CL_SALV_TREE to create Hierarchy ALV for multiple Production Order report display, the logic is working fine for different material/component.
When same parent and child component are same than third child link with the last child component which have to be linked with parent component
If the material having same name of node and item its working
but material having same name of node and node its not working
Required this way
but the out put coming
LOOP AT gt_hier ASSIGNING <fs_hier>.<br>IF <fs_hier>-parent = ''.<br>DATA(lv_tabix) = sy-tabix.<br>* Add the node as root<br>lo_node = lo_nodes->add_node(<br>related_node = ''<br>relationship = if_salv_c_node_relation=>parent<br>row_style = if_salv_c_tree_style=>emphasized_b ).<br>ELSE.<br>* Read the ALV key of parent node and add as a child<br>LOOP AT gt_hier INTO ls_hier FROM lv_tabix.<br>IF ls_hier-node = <fs_hier>-parent.<br>lo_node = lo_nodes->add_node(<br>related_node = ls_hier-key<br>relationship = if_salv_c_node_relation=>last_child ).<br>EXIT.<br>ENDIF.<br>ENDLOOP.
2022 Aug 18 9:35 AM
2022 Aug 18 10:42 AM
Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!
2022 Aug 18 12:18 PM
Thanks.
I can see that your logic depends exclusively on the values in GT_HIER, so please post the contents of GT_HIER.