#1
|
|||
|
|||
Problemas con ALV Tree
Hola a todos,
a ver si podeis ayudarme con un problema que no consigo solucionar en un ALV Tree. El alv en cuestión tiene un campo checkbox en la cabecera del Tree y sólo en los nodos principales. Dibujo.GIF He añadido un botón para seleccionar todos los nodos y otro para deseleccionarlos. Pero actualmente sólo me funciona la primera vez que lo ejecuto. No sé si tendría que hacer algún tipo de refresh para que "se sepa" que se debe volver a modificar. Os pego el código que utilizo. LOOP AT T_HEADER. CALL METHOD GD_TREE->get_outtab_line EXPORTING i_node_key = T_HEADER-NODE_KEY IMPORTING e_outtab_line = ls_outtab * e_node_text = et_item_layout = lt_items es_node_layout = ls_node EXCEPTIONS node_not_found = 1 OTHERS = 2. LOOP AT LT_ITEMS INTO LS_ITEM. MOVE-CORRESPONDING LS_ITEM TO LS_ITEM_U. IF P_FCODE = 'SEL_ALL'. LS_ITEM_U-CHOSEN = 'X'. ELSEIF P_FCODE = 'DESEL_ALL'. LS_ITEM_U-CHOSEN = ' '. ENDIF. LS_ITEM_U-U_CHOSEN = 'X'. APPEND LS_ITEM_U TO LT_ITEMS_U. ENDLOOP. move-corresponding ls_node to ls_node_u. CALL METHOD GD_TREE->CHANGE_NODE EXPORTING i_node_key = T_HEADER-NODE_KEY i_outtab_line = ls_outtab is_node_layout = ls_node_u it_item_layout = lt_items_u * i_node_text = * i_u_node_text = EXCEPTIONS node_not_found = 1 others = 2. endloop. Gracias por vuestra ayuda. |
#2
|
|||
|
|||
hola, creo que hay una dato q esta demas...
LOOP AT LT_ITEMS INTO LS_ITEM. MOVE-CORRESPONDING LS_ITEM TO LS_ITEM_U. IF P_FCODE = 'SEL_ALL'. LS_ITEM_U-CHOSEN = 'X'. ELSEIF P_FCODE = 'DESEL_ALL'. LS_ITEM_U-CHOSEN = ' '. ENDIF. LS_ITEM_U-U_CHOSEN = 'X'. ------> vuelves a colocar el check... deberias de comentarlo. APPEND LS_ITEM_U TO LT_ITEMS_U. ENDLOOP. |
#3
|
|||
|
|||
En realidad es otro campo que indica el el campo CHOSEN debe ser actualizado.
|
Herramientas | Buscar en Tema |
Desplegado | |
|
|