HI Campers (I really want to say band campers ;) )
Hope everyone is well! Here's my tip.
I can't count how many times I've been showing financial master data examples, and someone asks me: "What about hierarchies?" The first time, I didn't know. For cost centers - which is my example - you can assign a standard hierarchy in KS01/2, but you cannot assign the cost center to other groups. I looked at the tcode for cost centers hierarchies (groups), KSH1/2 and cringed a little. I always try to avoid GUI scripting, so I kept looking There are BAPIs to help, and to get a list of nodes in a hierarchy, a bapi is best. But to add/remove nodes and add/remove cost centers easily, I had to get creative.
So my tip - there's an accessibility format that will help automate KSH1/2, and I can thank a colleague for that tip. Note, too, that this will work for profit center hierarchies, as well, KCH1/2.
Here's what a cost center hierarchy looks like normally:

- Here's how to swap into accessibility format:
- On the first screen of KSH2, for example, click Extras -> Default Settings -> Format, like this
-
- Check accessibility and save user parameters
-
Now the hierarchy will look like this for a particular node in a cost center group.
The button on top will list cost centers. And there are add and delete buttons for the group nodes.
Here is a list of Cost Centers on that particular node - and notice the add and delete buttons for the cost centers assigned to that group node
- create an accessibility format script that changes the format and pass in the "X" to check the accessibility option and save to user parameters
- create a script to add nodes or delete nodes and separate scripts to add or delete cost centers. For these scripts:
- You'll need to pass in the parent node and then a child node to add or delete nodes in the group
- You'll also need to pass the parent node and then cost centers to add or delete
- then run the accessibility format script to un-check accessibility mode - pass in a blank
- chain them together so that it swaps the format, runs the hierarchy updates then swaps the format back.
Note that if you choose to use GUI scripting, you can do all of these steps in one script.
One additional tip - if you delete a node, all nodes and cost centers assigned to those nodes will also be deleted from the cost center group, so please take care with this action.
If you have additional suggestions here on this topic, please reply. There are often many ways to approach an automation challenge.
Happy scripting!
Sigrid
PS: I have an example if anyone needs it that moves cost centers from one group node to another. I've submitted it as a template, so hopefully it will be available soon.
------------------------------
Sigrid Kok
PSE | Winshuttle NA
------------------------------
Original Message:
Sent: 08-10-2020 13:44
From: Community Manager
Subject: Camp Winshuttle Contest - Share your skills!
Hey Winshuttle Campers –
We hope you're enjoying your summer and honing your skills in Studio, Foundation, Evolve and EnterWorks. We'd love to see what you've learned lately or along your Winshuttle journey by posting in the community for all to see and share in the learning.
Submit your Camp Winshuttle story:
- Share your use case, which product you're using, and what you learned "at camp" – tip/trick, skill, benefit to you and/or your company
- Share your journey: how you got to where you are and what you learned along the way. How did Winshuttle Studio, Foundation/Evolve, or EnterWorks help you get there?
Simply reply to this message with your tip and feel free to include screenshots and/or videos.
The individual posts that receive the most "recommends" for each Winshuttle platform (Studio, Foundation/Evolve, EnterWorks) will win the grand prize – Power Beats Pro Wireless Ear Buds! We'll also have random prize drawings and all eligible entries will receive a new "Evergreen" Brushy set, a Smores Kit, and the "Camper" badge on the community. Visit the contest page for details and prizes.
We look forward to reading your tips!
------------------------------
Community Manager | Winshuttle
------------------------------