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
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
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
<b>cost center group</b> text is in <b>SETHEADERT</b>
for Cost center Group setclass = '0101'
subclass = <your controlling area>
Regards
Raja
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
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.
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