Application Development 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: 

CO, "cost element" and "cost element group"

Former Member
0 Kudos

Hello experts,

actually it is similiar to my previous posted question:

( now I have the transaction KP06. Maybe through customizing the user has built a "cost center group" for some "cost center". In which table can I find out the relationship between the "cost center" and "cost center group" ? )

Thank Durairaj Athavan Raja thank he reply that with BAPI_COSTCENTERGROUP_GETDETAIL can find out the elationship between the "cost center" and "cost center group".

The user has also built "cost element group" for some "cost element".

Is there any BAPI to find out the relationship between them?

By the way, is anybody so kind to tell me how can i reward points?

Thanks.

RD

2 REPLIES 2

Former Member
0 Kudos

Hi,

Use the below FM.

CONCATENATE '0102' 'COA1' r_costelement_groups-low INTO w_setid.

  • Get the Cost Elements from Cost Element Groups

CALL FUNCTION 'K_HIERARCHY_TABLES_READ'

EXPORTING

e_class = '0102'

e_setid = w_setid

e_kokrs = s_kokrs-low

e_master_data = fs_masterdata

e_mandt = sy-mandt

TABLES

t_nodes = i_nodes

t_values = i_values

t_master_data = i_cost_el

CHANGING

c_info = w_info

c_overwrite = w_overwrite

EXCEPTIONS

no_controlling_area = 1

no_chart_of_account = 2

different_controlling_areas = 3

different_chart_of_accounts = 4

set_not_found = 5

illegal_field_replacement = 6

illegal_table_replacement = 7

fm_raise = 8

convert_error = 9

no_overwrite_standard_hier = 10

no_bukrs_for_kokrs = 11

OTHERS = 12.

Thanks.

Former Member
0 Kudos

Use function module BAPI_COSTELEMENTGRP_GETDETAIL to get the relation ship between the Cost elements and Cost element group.

Fyi, SETHEADERT is the master table which contains the group names.

SETLEAF contains the elements of the above groups.

****Reward points if useful

Regards,

Kiran Bobbala

Edited by: kiran Bobbala on Jun 16, 2008 3:50 PM