Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Count total no. of records of hierarchical DME tree.

RatneshSisodiy1
Active Participant
0 Kudos

Hi,

I have a hierarchical DME tree like below.

header(level 1)

     ---item (level 2)

           ----Sub-items. (level 3)

header_batch(level 1)

I want to count total number of records in the tree (count of all nodes). I used ref node id at all node(except header) and used aggregation of all ref ids at header_batch node.

I am able to get total records for item, sub items and header_batch. Please tell me how to count record for header.

if I enter ref ID at header then I get a syntax error, agregation can not be used for ref id of header as header and header batch at same level.

Please help to resolve this problem. Please note that I hav through all thread of internet for this but did not find exact solution for this problem.

Thanks in advance.

Regards,

Ratnesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ratnesh,

I think you can use Exit modules for this . Just call the exit module for each node which you want to count , thus it will increase the count . (Count variable should be defined as global data) .

And finnalyy call a another exit module for the node where you want to display the count .

Hope that will help you ,

Regards,

Shaym Sunder Goyal

4 REPLIES 4

Former Member
0 Kudos

Hi Ratnesh,

I think you can use Exit modules for this . Just call the exit module for each node which you want to count , thus it will increase the count . (Count variable should be defined as global data) .

And finnalyy call a another exit module for the node where you want to display the count .

Hope that will help you ,

Regards,

Shaym Sunder Goyal

0 Kudos

Hi Shyam,

Thanks for your response.

Can you please tell me where can we declare global data in DME tree. I am not aware of this.

Regards,

Ratnesh

0 Kudos

Hi Ratnesh,

Define global variable in top include of the function group for that exit module .

Regards,

Shyam

0 Kudos

Thanks Shyam. This approach works. !!  Thanks for your quick help.