Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to get cost center group for a particular cost center

Former Member
0 Likes
10,440

Hi,

In my report i need to display costcenter group based on cost center, I can see the standard hierarchy in table CSKS. but not able to find out any table or FM to find costcenter group.

From Tcodes & tables i am able to see standard hierarchy for a given cost center, but i need to know corresponding cost center group. How to get cost center group for given cost center?

Thanks in advance...

Regards,

Rahul

9 REPLIES 9
Read only

Former Member
0 Likes
5,767

A cost center may belong to many groups. How do you decide which one you want?

Rob

Read only

0 Likes
5,767

Hi Rob,

Thank you for ur reply. I am developing GR IR Report, here we have selection-criteria like..Cost center, cost center group..If user enter cost center group in the selection, we can display cost center group in the output. But, if user enter only cost center in the selection then also we have to show cost center group in the output along with cost center.

In report i have used FM: BAPI_COSTCENTER_GETLIST to get cost centers by using cost center group. But i am not able to find cost center group for cost center. Hope you understand my requirement.

Thanks in advance,

Regards,

Rahul

Read only

Former Member
0 Likes
5,767

Hi,

Select KHINR field(cost center group) from CSKS table based on KOSTL field(cost center).

Cheers,

Vikram

Read only

0 Likes
5,767

Hi,

Thanks for your reply. But KHINR is the 'Standard Hierarchy Area'. It is not cost center group. Cost center group will be under 'Standard Hierarchy Area'.

Regards,

Rahul

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
5,767

link:[http://fuller.mit.edu/SAPDocs/cost_element_groups_45b.htm]

link:[http://www.sapnet.ru/viewtopic.php?t=542]

1)FM BAPI_COSTCENTERGROUP_GETDETAIL

2)pass KHINR to fm G_SET_GET_ALL_SUPERSETS

Read only

0 Likes
5,767

Hi,

Thanks for ur reply, but those FM's are not providing Cost center group for a cost center.

Can u provide me a better solution to find cost center group for a cost center.

Regards,

Rahul

Read only

0 Likes
5,767

>

> Hi,

> Thanks for ur reply, but those FM's are not providing Cost center group for a cost center.

>

> Can u provide me a better solution to find cost center group for a cost center.

>

> Regards,

> Rahul

Do you mean that you want to read the cost centre group hierarchy for a cost centre? So that instead of entering a cost centre group and reading down the hierarachy until you get to the cost centre codes at the bottom, you want to enter a cost centre and then read up the hierarchy until you get to the cost centre group at the top of the hierarchy. If so, I don't think there is a function module to do what you want. The cost centre group hierarchy data is held in table SETNOTE, so you could have a look at that.

Read only

0 Likes
5,767

I think the table is SETNODE.

There are FMs to retrieve data from this table, but you have to at least know which hierarchy you want (which I said at the beginning).

Rob

Read only

0 Likes
5,767

Hi,

Try using the below BAPI's.

BAPI_COSTOBJNODE_GETDETAIL Determine Details for a Cost Object Node

BAPI_COSTOBJNODE_GETHIERARCHY Determine Cost Object Hierarchy

Thanks,

Harini