Skip to Content
avatar image
Former Member

how to check the single or multiple instance are created in back end for sigleton property?

Hi Team,

please suggest me how can i check how many no of child instance are created when single ton property is checked and unchecked?

in my view below is what i know about singleton property, if i am wrong correct me.

Say there are two ALV's on a View:
ALV1 ---> NODE_SO_HEADER----> Displays all the Sales Orders.
ALV2 ---> NODE_SO_ITEMS ------> Displays all the line items for the Sales Order selected in ALV1.

NODE_SO_ITEMS is the child node for NODE_SO_HEADER and is declared as Singleton node.
Since this node is declared as singleton, at runtime, it holds the line item data only for the Lead Selected Sales Order from NODE_SO_HEADER and not for all the Sales Orders from the parent node.
Whenever the lead selection changes for the parent node, line item data for that lead selected order is fetched from database and populated in the child node.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 31, 2015 at 07:43 AM

    Hi SivaRamaKrishna,

    Since you are using Singleton property for the node, then probably you must be using SupplyFunction/OnleadSelect to bind the data, as the lead selection changes.If you need the number of elements/insatance in the line items node, please check with the following snippet, where you are written the logic to bind the child node with new elements,upon lead select.

    DATA: lo_node TYPE REF TO if_wd_context_node,

          lines_count TYPE i VALUE 0.

      lo_node = wd_context->get_child_node( name = 'NODE_SO_ITEMS' ).

      lo_node->get_element_count( RECEIVING count = lines_count ).

    Regards,

    Harsha

    Add comment
    10|10000 characters needed characters exceeded