cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve Hierarchy Leaf Node using API.

Former Member
0 Kudos

Hello All,

Is there a way to search in the Hierarchy Lookup table only on it leaf node.

Example.

I have a Hierarchy structure

Americas

I

___ North America

I

_____ United States and Virgin Island

I

______ United States,US,USA.

For the above structure if i search by "United States" and put in CONTAINS as a constrain then, i need to retrieve only "United Stated,US,USA". Is there a Java API, to do this search.

Thanks,

Priya.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Priya,

yes there is API Command available for retrieving the Hierarchy elements.

All you need is the Record ID of the selected innermost leaf noe that you can get by performing a search.

Once you get his record ID for the innermost leaf node, you need to use the RetrieveHierAncestors Command to get the Values for the parent of the leaf node.

Documentation is avaible at: [http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/RetrieveHierAncestorsCommand.html]

Hope his helps!!

Cheers,

Arafat

Former Member
0 Kudos

Hi,

Is there an API, to search on the only the leaf nodes in Hierarchy table?

I think the API, that you have provided requires a RecordID to be set.

I wanted to search by Value, just with the list of leaf nodes in the Hierarchy table or it is like Can i retrieve the list of leaf nodes from the Hierarchy table?

Thanks,

Priya.

Former Member
0 Kudos

Hi,

The method RetrieveLimitedHierChildrenCommand searches only on the Leaf node, it works.

Thanks,

Priya.

Former Member
0 Kudos

hi,

RetrieveLimitedHierChildrenCommand ,how to use this API only get the leaf node in a hierachy?can you help me ?thank you!

Answers (0)