Hi Moazzam
No such BAPI exists that I'm aware of.
BAPI_COSTCENTERGROUP_GETDETAIL has a reasonable-ish return of groups and levels

but the cost centers are completely separate in another table.
You can record the tcode and do a save as text and get something like this in a text file

Some have extracted into a SQL tables and rolled their own report, as well.
I know this isn't the answer you wanted, but it's what SAP has available.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
------------------------------