copying SAP treeview hierarchy to collection

#1
hi. i am now making a process where i check if the hierarchy in SAP is similar to a excel sheet. to do that, i need to copy the hierarchy. i am now thinking that i can expand the whole hierarchy and then press the copy button above the tree. but i am not sure of what do to after i have pressed the copy button. how do i paste it into a collection?
 
#2
hi. i am now making a process where i check if the hierarchy in SAP is similar to a excel sheet. to do that, i need to copy the hierarchy. i am now thinking that i can expand the whole hierarchy and then press the copy button above the tree. but i am not sure of what do to after i have pressed the copy button. how do i paste it into a collection?
Just paste in a Text Data Item and see how it appears.
Without actual data, there's only so much help we can offer
 
#3
Just paste in a Text Data Item and see how it appears.
Without actual data, there's only so much help we can offer
i got a new idea. i can go through each item in the hierarchy and use get node information. and then press right arrow and down arrow to go to next item and do this for the whole hierarchy. the problem i have with this is that i am not getting any node information. i think the problem is that the node is not properly selected when i use the arrows to go down the list. ideas? 1601364534179.png
 
#4
i have now tried all kinds of ways. i can select the hierarchy items and get the node name (sort of). the problem is that the keyboard automatically focuses on another place when i enter the page than the hierarchy, (it has red corners around it) i have tried to get rid of the focus using get bounds and click window but seems like i cannot get it to work. how do i come around this problem? everything works fine if i manuallu left click anywhere on the page to get rid of the focus.
 
#5
i have now succeeded in getting the nodes to a collection using "get selected node key" and "get node text". but this is not done the way i want. i also want to get the description for each node, which i am not getting with the "get node" navigate stages.

if i press "ctrl+c", i can copy the complete row, including node name and description, which is exactly what i want. how can i take us of this? can i in some sort of way press "ctrl+v" and save the row in BP to store it into a collection? if there is some sort of way, using ctrl+c, i dont have to do major changes to the process. any ideas?
 
#6
i have now succeeded in getting the nodes to a collection using "get selected node key" and "get node text". but this is not done the way i want. i also want to get the description for each node, which i am not getting with the "get node" navigate stages.

if i press "ctrl+c", i can copy the complete row, including node name and description, which is exactly what i want. how can i take us of this? can i in some sort of way press "ctrl+v" and save the row in BP to store it into a collection? if there is some sort of way, using ctrl+c, i dont have to do major changes to the process. any ideas?
There is no native way in BP to store the clipboard in collection.
However, you can Get Clipboard via Utility - Environment VBO, after you are done sending ctrl+c.
Then via Utility - Strings Split Text action, split the results using a delimiter (space, tab, etc), to get a collection as an output.
 
#7
There is no native way in BP to store the clipboard in collection.
However, you can Get Clipboard via Utility - Environment VBO, after you are done sending ctrl+c.
Then via Utility - Strings Split Text action, split the results using a delimiter (space, tab, etc), to get a collection as an output.
thank you, this worked very well. i now have the hierarchy in a collection with the node name and description.

next step is to compare both the node name and description with an excel sheet. first i loop through the sap collection and looking for the node name in the excel collection. if it isnt there, it is added to another collection. the excel collection will have more rows than the sap collection.

i also want to check this with the description too, but im not sure how. i first need to find which row in the excel collection that has the specific node name, and then check if it has correct description. i am thinking that i can filter the collection with the description name to get a much smaller one, so the process will be faster. but i cannot get it to work
 
#8
i noticed one problem with utility- get clipboard. if i paste into a data item, i will get a blank space in the end of the row. some rows has it (by mistake) and some dont. i am always getting a blank row in the end regarding o the excel list i will compare it to, also has a blank space (by mistake) on some rows. i have no way of knowing if it matches or not if all descriptions get a blank space regarding if it actually has one or not. i hope it makes sense for you guys...
 
#9
i noticed one problem with utility- get clipboard. if i paste into a data item, i will get a blank space in the end of the row. some rows has it (by mistake) and some dont. i am always getting a blank row in the end regarding o the excel list i will compare it to, also has a blank space (by mistake) on some rows. i have no way of knowing if it matches or not if all descriptions get a blank space regarding if it actually has one or not. i hope it makes sense for you guys...
Check the Get Clipboard action in object studio. Usually it fetches the clipboard data via GetClipboard() function and not a code stage.
Another way to fetch Clipboard is via a code stage.

Create a new action in the same object (Clipboard_Output is the output data item):
Clipboard_Output = My.Computer.Clipboard.GetText()

See, if this makes a difference.
 
Top