ABAP Column Tree Model does not expand node after EXPAND_NO_CHILDREN occasion

I am presenting a checklist of things making use of a SAP ABAP column tree version, primarily a tree of folder and also documents, with columns. I intend to load the below - nodes of folders dynamically, so I'm making use of the EXPAND_NO_CHILDREN occasion which is shooting appropriately. However, after I add the new nodes and also things to the tree, the folder is instantly falling down once more, calling for a 2nd click to watch the below - nodes. Do I require to call a method when taking care of the occasion to make sure that the folder remains open, or am I doing another thing incorrect?

* Set up event handling.
  LS_EVENT-EVENTID  = CL_ITEM_TREE_CONTROL=>EVENTID_EXPAND_NO_CHILDREN.
  LS_EVENT-APPL_EVENT = GC_X.
  APPEND LS_EVENT TO LT_EVENTS.
  CALL METHOD GO_MODEL->SET_REGISTERED_EVENTS
    EXPORTING
      EVENTS                    = LT_EVENTS
    EXCEPTIONS
      ILLEGAL_EVENT_COMBINATION = 1
      UNKNOWN_EVENT             = 2.
  SET HANDLER GO_APPLICATION->HANDLE_EXPAND_NO_CHILDREN
    FOR GO_MODEL.

...


* Add new data to tree.
  CALL METHOD GO_MODEL->ADD_NODES
    EXPORTING
      NODE_TABLE = PTI_NODES[]
    EXCEPTIONS
      ERROR_IN_NODE_TABLE = 1.

  CALL METHOD GO_MODEL->ADD_ITEMS
    EXPORTING
      ITEM_TABLE = PTI_ITEMS[]
    EXCEPTIONS
      NODE_NOT_FOUND = 1
      ERROR_IN_ITEM_TABLE = 2.
0
2019-05-18 22:22:36
Source Share
Answers: 1

It is been a while given that I've had fun with SAP, yet I constantly located the SAP Library to be specifically handy when I obtained stuck ...

I took care of ahead up with this one for you : http://help.sap.com/saphelp_nw04/helpdata/en/47/aa7a18c80a11d3a6f90000e83dd863/frameset.htm, especially :

When you add new nodes to the tree version, set the flag ITEMSINCOM to 'X'.
This educates the tree version that you intend to load the things for that node as needed.

Hope it aids?

0
2019-12-04 08:42:38
Source