06-29-2013 10:16 PM
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.
06-30-2013 7:46 AM
Hi,
you can use FM BAPI_COSTCENTERGROUP_CREATE for the same. the manner in which data is provided in this BAPI is a bit tricky. Just see the documentation of the BAPI in that the diagrammatic explanation is available.
Regards
Animesh Sundriyal
06-30-2013 7:46 AM
Hi,
you can use FM BAPI_COSTCENTERGROUP_CREATE for the same. the manner in which data is provided in this BAPI is a bit tricky. Just see the documentation of the BAPI in that the diagrammatic explanation is available.
Regards
Animesh Sundriyal
06-30-2013 11:56 AM
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.
thank you
Nagaraju
06-30-2013 11:18 AM
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.
06-30-2013 12:34 PM
Hi Sushmitha,
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.
Thank you
Nagaraju