Skip to Content
avatar image
Former Member

How to find the profit center group for a profit center?

How to find the profit center group for a profit center?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Feb 19, 2009 at 11:13 AM

    Hi,

    You can use this Bapi "BAPI_PROFITCENTERGRP_GETLIST".

    Regards,

    Venkatesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2009 at 11:14 AM

    BAPI_PROFITCENTER_GETDETAIL Display Profit Center Master Data

    BAPI_PROFITCENTER_GETLIST Display List of Profit Centers

    Just check whether this can be of any help to you.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2009 at 11:15 AM

    Hi,

    try this also

    In order to pass the setid parameter of the FM, you have to concatenate the following things

    Setid + KOKRS (Controlling area) + Profit Center Group into one variable.

    In my example below, I have declared as constants and concatenating to gv_setid.

    gc_01016 is the set id for profit centers

    gc_kokrs is the controlling area

    gp_pprct is the Profit Center group entered in the selection screen.

    You will get KOKRS value from the cepc-kokrs.

    data : gc_0106(4) TYPE c VALUE '0106',

    gc_kokrs LIKE cepc-kokrs VALUE 'ABCD'.

    gv_setid LIKE sethier-setid,

    gt_set_values_1 LIKE setvalues OCCURS 0 WITH HEADER LINE.

    CONCATENATE gc_0106 gc_kokrs gp_pprct INTO gv_setid.

    CONDENSE gv_setid.

    CALL FUNCTION 'G_SET_TREE_IMPORT'

    EXPORTING

    client = sy-mandt

    fieldname = 'RPRCTR'

    langu = sy-langu

    setid = gv_setid

    tabname = 'GLPCT'

    no_table_buffering = 'X'

    TABLES

    set_values = gt_set_values_1

    EXCEPTIONS

    set_not_found = 1

    illegal_field_replacement = 2

    illegal_table_replacement = 3

    OTHERS = 4.

    By using the above FM you will get the values into gt_set_values1 once sys-subrc value eq 0, it is internal table which consists of all the profit centers for the proft center group.

    Regards,

    Venkatesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2009 at 11:18 AM

    Hi Sumana,

    Refer the SETCLS table to get the class name for Profit Center Group.Here.

    Use the description 'Profit center Group' to get the SETCLASS field.

    Now use the table SETLEAF to get the relationship between Profit center and Profit center groups.

    SETNAME field is for Profit centet group and

    VALFROM and VALTO fields to get the Profit center range

    SETHEADERT table contains the list of Profit center group names.

    You can also use the following BAPIs:

    BAPI_PROFITCENTERGRP_GETLIST to get Profitcenter group list.

    BAPI_PROFITCENTERGRP_GETDETAILS to get PRofit center based on group name

    Regards,

    Nitin.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2009 at 11:19 AM

    Hi,

    Just now i checked.i got it .

    It is available in table : TFIN011

    This you get by providing profit center in the field PRCTR .

    profit center group field name is : PCGRP..

    Please check thru CEPC table thru SE11 or SE16N by giving Profit center in profit center field and execute.

    If you want thru Function modules :

    BAPI_PROFITCENTERGRP_ADDNODE

    BAPI_PROFITCENTERGRP_CREATE

    BAPI_PROFITCENTERGRP_GETDETAIL

    BAPI_PROFITCENTERGRP_GETLIST

    try these function modules..

    Thanks

    Parvathi

    Edited by: Siva Parvathi on Feb 19, 2009 12:22 PM

    Add comment
    10|10000 characters needed characters exceeded