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.
Hi Animesh Sundriyal,
Thank you so much for your reply.
I've verified 'BAPI_COSTCENTERGROUP_CREATE' function module and gone through the documentation as well.
With this function module I am able to create a new cost group with some cost centers under it.
My requirement is to assign a cost center to an existing cost center group.
I've tried assigning a cost center to an existing cost center group with this function module but the problem here is subnodes under the group are getting deleted a new hierarchy is being created with the information that I am providing..
Please let me know if you know how to handle this.
Create a recording of assigning the cost center to the group through KSH2 using SHDB transaction.
Then get the BDC program from it and use it in your program.
With LSMW, refer this link.
Thanks for your reply.
I understood what you have suggested, but creating BDC is not the best alternative for my requirement.
However in the link you shared, I can see the same function module (BAPI_COSTCENTERGROUP_CREATE) which Animesh shared.