cancel
Showing results for 
Search instead for 
Did you mean: 

How to Count ChildList on SAP BOBJ PCM

Former Member
0 Kudos

Dear all,

Need your advise around how to count Members from a single Attribute. For example, I have an Attribute named "Year-to-Date" with Member named "Jan", "Feb", "Mar". I wanna know is it any possible way (e.g. defining Rules) if I use this "Year-to-Date" Attribute and resulting in counting the Member (Jan, Feb, Mar) as 3?

Please advise. Urgent matters. Thank you

Kind regards,

Abdul

Accepted Solutions (1)

Accepted Solutions (1)

former_member257798
Active Participant
0 Kudos

Hi Abdul,

There are two options:

ChildList - Returns a list of children of the parent item from the specified dimension.

Parameters: Dimension Name, Dimension item name of parent (any alias)

Returns Variant array or empty.

Note: The value returned from this function is a variant array. If the dimension of the parent item is not known a parameter of –1 can be used.

LeafChildList - Returns a list of the children of the specified Dimension item that are leaf items.

Parameters: Dimension name, Dimension item (any alias)

Returns Variant array [Integers] or Empty

Note: this gets all the leaf level children under all the parents of specified parent.

For example:

...code stuff...

              

               aRateLocs = ChildList("Activities","Logistical Support")

                              If IsArray(aRateLocs) Then

                                             j = UBound(aRateLocs)

                                             For i = 0 To j

                                               Do stuff here

                                             Next i                                 

                              End If     'IsArray(aRateLocs)

...

and to answer your exact question - the count of the children is the upper bound of the array + 1, or j+1 i the example above.

See the PCM 10 reference guide for more details. It is available from the sap help site.

Kind Regards,

John Harris

Senior Support Engineer, AGS Primary Support

Former Member
0 Kudos

Dear John,

Thank you for your advice. it's applicable for my case.

Abdul

Answers (0)