cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.


Accepted Solutions (0)

Answers (1)

Answers (1)

harsha_jalakam
Active Contributor
0 Kudos

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