Assigning cost center to hierarchies

Hi All

I've created one cost center (using KS01) and one cost center group (using KSH1) now I want to assign this cost center to the cost center group.

manually I can do it using KSH2 transaction code but I want do this through an ABAP program so I  just looking for function modules if there are any.

Please help me with this.

thank you.

Helpful Answer