cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the node keys in level 2 or more with VBA

0 Kudos
295

Hi,

I am simple SAP user (not developer) and I'd like to create some automatic steps with VBA.

So far I've solved the collection of a table data with filtering and scrolling, launching transactions with different parameters even the first level nodes (and its columns) with node keys (getAllNodeKeys) but I can't manage the level 2 or more.

The exampe: as an input I have a value pair as 2838-2332. I can get the first level node key as "G2616" and I can expand it but how to get the next level keys to select the 2332.

the code part:

Set nKey = box.getAllNodeKeys() 'it gives only the level 1 keys

For nk = 0 To nKey.Count - 1

If box.getItemText(nKey.Item(nk), "Column1") = 2838 Then

ThisWorkbook.Sheets("groupTree").Cells(nk + 2, 1).Value = nKey.Item(nk)

box.expandNode nKey.Item(nk)

I've tried the objects in GUITree but something is missing in my thinking way to get the second level IDs.

And if it is working is this the way to manage the level 3 as well?

BR Istvan

Accepted Solutions (0)

Answers (0)