I have found the table COSP-KSTAR for extracting cost element in SAP-FICO.
Now the problem is that there are around 400 cost element assigned to a cost element group and I am unable to identify the table from where to fetch this i.e. establish the relation between cost-element(of table COSP) and cost-element group(Table unknown ??) .
I will give you the data element for Cost Element Group. Go to se11, click on data elements and enter GRPNAME there. Then go to where used list and c the tables there. There are abt 15 of them. You select which suits you best.