Skip to Content
author's profile photo Former Member
Former Member

Display Cost Center Group Text

Hi..

I'm new to abap, and I am working for abap for hr module now. My question will be...

How can I display a cost center group text in report? Is there a text table for it?

I get the cost center value from table pa0001-kostl.

I find the function BAPI_COSTCENTERGROUP_GETLIST by searching this forum. But, the parameters I can get is only for controllingareamask from pa0001-kokrs.

any help would be grateful

thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    Posted on Feb 01, 2005 at 01:06 PM

    Hi Yusuf,

    BAPI_COSTCENTERGROUP_GETLIST works fine .

    -> here's an example :

    SELECT SINGLE kostl kokrs FROM pa0001 INTO: (kostl, kokrs)

    WHERE pernr = '4711'.

    *

    select single khinr from csks into khinr

    WHERE kokrs = kokrs

    AND kostl = kostl

    AND datbi GE sy-datum

    AND datab LE sy-datum.

    CALL FUNCTION 'BAPI_COSTCENTERGROUP_GETLIST'

    EXPORTING

    controllingareamask = kokrs

    groupnamemask = khinr

    TABLES

    grouplist = it.

    regards Andreas

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      All the above works fine... I have tested it....

      thanks...

      new question will be

      How can I find out the top hirarchy of the cost center? example: cost center 1010256 has 101025 as costcenter group in csks table... and 101025 also has cost center group 1010...

      how can I get 1010 if I only has info for 1010256?

      here is the figure for example.

      1010 --- 101025 --- 1010256
                      |-- 1010257
           |-- 101041 --- 1010415

      Message was edited by: Yusuf Bottie Gaos

      Message was edited by: Yusuf Bottie Gaos

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2005 at 10:11 AM

    Hi...

    Welcome to group...

    What i understood is u require text for that particular cost center....

    Use table <u><i><b>CSKS</b></i></u> field name <u><i><b>KTEXT</b></i></u>.

    If this help u out give me points. I hope u know the system.

    Regards,

    Sagar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2005 at 11:16 AM

    <b>cost center group</b> text is in <b>SETHEADERT</b>

    for Cost center Group setclass = '0101'

    subclass = <your controlling area>

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 02, 2005 at 08:00 AM

    Hi Yusuf,

    i'll guess you mean the standard hierarchy for the controlling aerea (1 Kokrs : 1 KHINR ).

    -> so when you've the controlling aera (pa0001-kokrs):

    select single KHINR from <b>TKA01</b> into top_hirarchy

    where kokrs = pa0001-kokrs.

    regards Andreas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2005 at 08:46 AM

    hi Yusuf,

    You can get top hierarchy by using two SAP function modules.

    <u><b>G_SET_GET_SUPERSETS</b></u>

    <i><b>G_SET_GET_ALL_SUPERSETS</b></i>

    Using G_SET_GET_SUPERSETS function module you can get immediate parent node of the specified cost center group.

    And if you want all parent nodes for specified cost center group then use G_SET_GET_ALL_SUPERSETS function module.

    I hope this information will help you.

    And then let me know the status of it.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 03, 2005 at 05:43 AM

    Hi Yusuf,

    What input u specified for executing FM?

    I think input values are wrong.

    If you want company based on cost center...

    You have to first find one node above cost center means department in your case. then pass KHINR value in FM G_SET_GET_ID_FROM_NAME as shortname which returns SETID of the node based on its KHINR value. pass this setid to FMs metioned in my earlier reply as SETNAME. U will surely get output.

    Let me know the status after trying this.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.