cancel
Showing results for 
Search instead for 
Did you mean: 

Outline with services ... looking for efficient way of querying

matteo_montalto
Contributor
0 Kudos

Hi all Experts,

in our scenario there's a recurrent check and I'd like, with your help, to find an efficient way to perform it.

The check is: has an Outline any subordered position (say, service) under itself?

Given that mostly of the times we have only the Outline/lead selection, what's the best way to gain such information?

The most obvious approach is:

- get a getdetail() of the document;

- search for subposition of our Outline (according to the way the Hierarchy has been implemented, off course).

But this is quite inefficient as we need a getdetail() with item data to perform such a check.

I didn't find any facility method nor information on how to perform such a control in a "smart" way.

Accepted Solutions (0)

Answers (1)

Answers (1)

konstantin_anikeev
Active Contributor
0 Kudos

Hi Matteo,

lo_sc->/SAPSRM/IF_PDO_ITEM_LIST~GET_ITEM_HIERARCHY()->GET_SUB_TREE()

with IV_ITEM_GUID = <<your item guid>>

Regards

Konstantin