Multiple hierarchies in profit center

Hi everybody,
We do we go for Multiple/alternative hierarchies in profit center or cost center??
can some one explain?
Regards
Hari P

Hi,
System demands that both for cost centre and profit centre there would be standard hierarchy. Usually, it represents the 'official' organization which will be ffrequently used for reporting. However, in different organizations there is a need in 'alternative hierarchy', mostly for reporting purposes, in order to see figures in different groupping. For this, you can create groups for cost centres/profit centres.
Regards,
Eli

Similar Messages

  • We are trying to delete one of the hierarchies for profit center

    We are trying to delete one of the hierarchies for profit center.
    The purpose is that this hierarchy group has become obsolete but still appears in the portal in the input selection screen.
    Will the deletion of a hierarchy impact the bookmarks which consists that hierarchy?
    If any one has tried this before just let us know.
    Thanks in advance.
    Amruth.

    It doesn't effect any boomarks that has the obsolete structure.

  • Hi Profit center descriptions

    Hi Experts,
         For this design only profit centers under the following level 4 nodes will need to be extracted and sent to PROS SOI7CR0326 , SOI7FU0763 , SOI7FU0764 , SOI7FU0765.  All profit centers under these nodes will need to be sent although only level 4, level 6, and level 7 descriptions should be sent for each profit center.  I used transaction KCH3 to view the hierarchy below.
         I need descriptions for all the profit centers for the above mentioned nodes,  please see the code and give me some solution.
        5  SOI_STREAM      Downstream                                                                               
    4  SOI4000011      DOWNSTREAM (OIL)                                                       
            4  SOI5000001      DOWNSTREAM REFINING 1 PEER GRP                                         
            4  SOI5000002      DOWNSTREAM REFINING 2 PEER GRP                                         
            4  SOI5000003      DOWNSTREAM COMMERCIAL PEER GRP                                         
            5  SOI5000004      DOWNSTREAM RETAIL PEER GROUP                                                                               
    4  SOI6AC0001      ACCELERATOR BUSINESS UNIT                                          
                4  SOI6CR0001      US CONVENIENCE OPERATIONS                                          
                5  SOI6FU0001      US FUELS OPERATING UNIT                                                                               
    5  SOI7FU0692      SECONDARY TRANS / PIPELINE                                     
                    5  SOI7FU0762      RESTRUCTURING HIERARCHY                                        
                    5 <b> SOI7FU0763</b>      US FUELS MARKETING - EAST/GULF COAST         <--           Level 4 Description                                                                               
    5  SOI7FU0766      EGC FUELS SUPPLY GEOGRAPHY                                                                               
    5  SOI7FU0017      NORTHEAST GEOGRAPHY                                     <--          Level 6 Description
                                                                                    18026650   EAST S&H OPPORTUNITY PROJECTS EXPENSE       <--          Level 7 Description                                                                               
    5  SOI7FU0033      NEW YORK HARBOR - SUPPLY ENVELOPE                                                                               
    5  SOI7FU0034      TERMINALS&SUPPLYPLANTS -NEW YORK HARBOR                                                                               
    5  SOI7FU0174      GASOLINE - NEW YORK HARBOR                                                                               
    18000063   MA FIELD DISTRIBUTION                          
                                            18000070   WASHINGTON DC-20003 (LPOB)                     
                                            18000361   WILMINGTON DE-19801 (LPOB)                     
                                            18000371   CORAOPOLIS PA-15108 (LPOB)                     
                                            18000396   PHILADELPHIA PA-EXXON (LTOZ)                   
                                            18004753   BROOKLYN TERMINAL
    * This program can be used to export profit center hierarchies or other groups in a level table (format used by RGSIMPH1)
    * To actively use this program:
    *   - copy it to a local object
    *   - adapt DATA_TAB to the data structure in your foreign system
    *     (change positions, length of fields, remove TOVALUE if
    *      hierarchies contain single values only, ...)
    *   - write an export routine for DATA_TAB if you don't want to
    *     download it to the presentation server
    * Example hierarchy that will be exported by this program
    *    HIER-TOP                      Top node
    *      |
    *      |---- HIER-010              Node 10
    *      |       |
    *      |       |---- HIER-011      Node 11
    *      |       |       - CC 1      Profit center 1
    *      |       |       - CC 2      Profit center 2
    *      |       |
    *      |        ---- HIER-012      Node 12
    *      |               - CC 3      Profit center 3
    *      |               - CC 4      Profit center 4
    *      |
    *       ---- HIER-020              Node 20
    *              - CC 5              Profit center 5
    * The level table  DATA_TAB will look like this:
    *    Level  Groupname    Fromvalue  Tovalue           Descript
    *    0001   HIER-TOP                                  Top node
    *    0002   HIER-010                                  Node 10
    *    0003   HIER-011                                  Node 11
    *    0004                CC 1       CC 1
    *    0004                CC 2       CC 2
    *    0003   HIER-012                                  Node 12
    *    0004                CC 3       CC 3
    *    0004                CC 4       CC 4
    *    0002   HIER-020                                  Node 20
    *    0003                CC 5       CC 5
    *  Standard Architecture Data Structures
    INCLUDE: zbiod001,
             zbiud002,
             zbiud007.
    DATA: c_text_write(5) TYPE c VALUE 'Write'.
    TABLES: CEPC,
            CEPCT.
    *------------------------ Data ---------------------------------*
    DATA: I_CEPCT  LIKE CEPCT OCCURS 0 WITH HEADER LINE,
          WA_CEPCT LIKE CEPCT,
          I_CEPC   LIKE CEPC OCCURS 0 WITH HEADER LINE,
          WA_CEPC  LIKE CEPC.
    DATA: W_OBJECTID LIKE CDHDR-OBJECTID,
          W_LEVEL_CODE(30) TYPE C,
          W_LEVEL_NAME(50) TYPE C,
          W_LEVEL_CODE1(30) TYPE C,
          W_LEVEL_NAME1(50) TYPE C.
    DATA: BEGIN OF I_PROFIT OCCURS 10,
      ID(15)                TYPE C,
      CODE(10)                 TYPE C,
      NAME(20)                 TYPE C,
      DESC(40)                 TYPE C,
      HIER_LVL1_CODE(30)       TYPE C,
      HIER_LVL1_NAME(50)       TYPE C,
      HIER_LVL2_CODE(30)       TYPE C,
      HIER_LVL2_NAME(50)       TYPE C,
      HIER_LVL3_CODE(30)       TYPE C,
      HIER_LVL3_NAME(50)       TYPE C,
      HIER_LVL4_CODE(30)       TYPE C,
      HIER_LVL4_NAME(50)       TYPE C,
      HIER_LVL5_CODE(30)       TYPE C,
      HIER_LVL5_NAME(50)       TYPE C,
      HIER_LVL6_CODE(30)       TYPE C,
      HIER_LVL6_NAME(50)       TYPE C,
      HIER_LVL7_CODE(30)       TYPE C,
      HIER_LVL7_NAME(50)       TYPE C,
      HIER_LVL8_CODE(30)       TYPE C,
      HIER_LVL8_NAME(50)       TYPE C,
      HIER_LVL9_CODE(30)       TYPE C,
      HIER_LVL9_NAME(50)       TYPE C,
      HIER_LVL10_CODE(30)      TYPE C,
      HIER_LVL10_NAME(50)      TYPE C,
      HIER_LVL11_CODE(30)      TYPE C,
      HIER_LVL11_NAME(50)      TYPE C,
      CREATED_BY(15)                         TYPE C,
      CREATED_DATE(10)                       TYPE C,
      LAST_UPDATED_BY(15)                    TYPE C,
      LAST_UPDATED_DATE(10)                  TYPE C,
      BATCH_ID(15)                           TYPE C,
      STAGE2_DIM_ID(15)        TYPE C,
      SOURCE_SYSTEM_ID(20)                   TYPE C,
      ALT_ACCOUNT_SET_HIERARCHY_IND(1)       TYPE C,
    END OF I_PROFIT.
    *Structure required by Essbase. Str_PC1.TXT
    DATA: BEGIN OF I_STR_PC1 OCCURS 10,
      HIER_LVL1_CODE(30)       TYPE C,
      FILLER1(1)                TYPE C VALUE '|',
      HIER_LVL1_NAME(50)       TYPE C,
      FILLER2(1)                TYPE C VALUE '|',
      HIER_LVL2_CODE(30)       TYPE C,
      FILLER3(1)                TYPE C VALUE '|',
      HIER_LVL2_NAME(50)       TYPE C,
      FILLER4(1)                TYPE C VALUE '|',
      HIER_LVL3_CODE(30)       TYPE C,
      FILLER5(1)                TYPE C VALUE '|',
      HIER_LVL3_NAME(50)       TYPE C,
      FILLER6(1)                TYPE C VALUE '|',
      HIER_LVL4_CODE(30)       TYPE C,
      FILLER7(1)                TYPE C VALUE '|',
      HIER_LVL4_NAME(50)       TYPE C,
      FILLER8(1)                TYPE C VALUE '|',
      HIER_LVL5_CODE(30)       TYPE C,
      FILLER9(1)                TYPE C VALUE '|',
      HIER_LVL5_NAME(50)       TYPE C,
      FILLER10(1)                TYPE C VALUE '|',
      HIER_LVL6_CODE(30)       TYPE C,
      FILLER11(1)                TYPE C VALUE '|',
      HIER_LVL6_NAME(50)       TYPE C,
      FILLER12(1)                TYPE C VALUE '|',
      HIER_LVL7_CODE(30)       TYPE C,
      FILLER13(1)                TYPE C VALUE '|',
      HIER_LVL7_NAME(50)       TYPE C,
      FILLER14(1)                TYPE C VALUE '|',
      HIER_LVL8_CODE(30)       TYPE C,
      FILLER15(1)                TYPE C VALUE '|',
      HIER_LVL8_NAME(50)       TYPE C,
      FILLER16(1)                TYPE C VALUE '|',
      HIER_LVL9_CODE(30)       TYPE C,
      FILLER17(1)                TYPE C VALUE '|',
      HIER_LVL9_NAME(50)       TYPE C,
      FILLER18(1)                TYPE C VALUE '|',
      HIER_LVL10_CODE(30)      TYPE C,
      FILLER19(1)                TYPE C VALUE '|',
      HIER_LVL10_NAME(50)      TYPE C,
      FILLER20(1)                TYPE C VALUE '|',
      HIER_LVL11_CODE(30)      TYPE C,
      FILLER21(1)                TYPE C VALUE '|',
      HIER_LVL11_NAME(50)      TYPE C,
      FILLER22(1)                TYPE C VALUE '|',
      CODE(10)                 TYPE C,
      FILLER23(1)                TYPE C VALUE '|',
      DESC(40)                 TYPE C,
      FILLER24(1)                TYPE C VALUE '|',
      NAME(20)                 TYPE C,
      FILLER25(1)                TYPE C VALUE '|',
    END OF I_STR_PC1.
    *Variable declaration
    DATA: CTR(2) TYPE C,
          INC TYPE I,
          W_CTR1(2) TYPE C,
          W_INC1 TYPE I.
    DATA: w_file_prft LIKE w_prc_files.
    *Field symbols.
      FIELD-SYMBOLS: <CD1>,
                     <NM1>.
    * External level table will be using the following structure
    DATA: BEGIN OF data_tab OCCURS 0,
            level(4)      TYPE n,          "level in hierarchy
            groupname     LIKE grpdynp-name_coall, "name of node
            fromvalue     LIKE setvalues-from,  "From-Value of interval
            tovalue       LIKE setvalues-to,    "To-Value of interval
            descript      LIKE sethier-descript,"description of this entry
          END OF data_tab.
    *Constants
    CONSTANTS: c_setclass LIKE sethier-setclass VALUE '01++'.
    *------------------------ SelectionScreen--------------------------*
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    * Parameters
    PARAMETERS: g_setid   LIKE sethier-setid OBLIGATORY MEMORY ID gse.
    SELECTION-SCREEN END OF BLOCK B1.
    * Tables to read sets
    DATA: sethier   LIKE sethier OCCURS 0 WITH HEADER LINE,  "hierar. nodes
          setvalues LIKE setvalues OCCURS 0 WITH HEADER LINE, "hier. values
          g_setval_index LIKE sy-tabix,    "index for setvalues,
          g_int     TYPE i,
          g_rc      TYPE c,
          g_old_file LIKE lgrwo-exp_file.
    *------------------------ AT Selection screen----------------------*
    AT SELECTION-SCREEN.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR g_setid.
    * Value request for group name
      CALL FUNCTION 'G_RW_SET_SELECT'
           EXPORTING
                class           = c_setclass
                set             = g_setid
                typelist        = 'BS'
                show_field_name = ' '
                show_table_name = ' '
           IMPORTING
                setid           = g_setid
                set_name        = g_setid.
    *peform to read profit center hierarchy
    PERFORM READ_SETHIER.
    *perform to change the output format to flat file format
    PERFORM PROFIT_CENTER_HIER.
    *Fill remaining details from profit center master tables
    PERFORM FILL_PRCTR_DETAILS.
    *perform to download the details
    PERFORM F_WRITE_TO_FILE.
    FORM READ_SETHIER.
    * Preparations: check authority to read sets
        CALL FUNCTION 'G_SET_OR_GROUP_AUTHORITY'
             EXPORTING
                  i_setid = g_setid
                  i_actvt = '03'.
    * Read set
      REFRESH: sethier, setvalues.
      CALL FUNCTION 'G_SET_TREE_IMPORT'
           EXPORTING
                no_rw_info    = 'X'
                setid         = g_setid
           TABLES
                set_hierarchy = sethier
                set_values    = setvalues.
    * Copy set into DATA_TAB
      REFRESH data_tab.
      g_setval_index = 1.
      LOOP AT sethier.
        CLEAR data_tab.
        data_tab-level = sethier-level.
        data_tab-groupname = sethier-shortname.
        data_tab-descript = sethier-descript.
        APPEND data_tab.
        CHECK sethier-vcount > 0.
        CLEAR data_tab.
        data_tab-level = sethier-level + 1.
        g_int = g_setval_index + sethier-vcount - 1.
        LOOP AT setvalues FROM g_setval_index TO g_int.
          data_tab-fromvalue = setvalues-from.
          data_tab-tovalue = setvalues-to.
          data_tab-descript = setvalues-descript.
          APPEND data_tab.
        ENDLOOP.
        g_setval_index = g_int + 1.
      ENDLOOP.
    ENDFORM.
    FORM PROFIT_CENTER_HIER.
    * Use DATA_TAB table here to get to the heirarchies.
    LOOP AT DATA_TAB.
         W_INC1 = DATA_TAB-LEVEL.
         W_CTR1 = W_INC1.
         IF DATA_TAB-LEVEL = '0000' .
            CONTINUE.
         ENDIF.
        IF NOT DATA_TAB-GROUPNAME IS INITIAL.
          CONCATENATE 'I_PROFIT-HIER_LVL' W_CTR1 '_CODE' INTO W_LEVEL_CODE1.
          ASSIGN  (W_LEVEL_CODE1) TO <CD1>.
          <CD1> = DATA_TAB-GROUPNAME.
          CONCATENATE 'I_PROFIT-HIER_LVL' W_CTR1 '_NAME' INTO W_LEVEL_NAME1.
          ASSIGN (W_LEVEL_NAME1) TO <NM1>.
          <NM1> = DATA_TAB-DESCRIPT.
         ELSEIF NOT ( DATA_TAB-FROMVALUE IS INITIAL OR
                           DATA_TAB-TOVALUE IS INITIAL ) AND
                            DATA_TAB-LEVEL NE '0001' .
              MOVE DATA_TAB-FROMVALUE TO I_PROFIT-CODE.
              PERFORM CLEAR_ABOVE_LEVEL USING W_CTR1.
              APPEND I_PROFIT.
              CONTINUE.
         ENDIF.
    ENDLOOP.
    ENDFORM.
    *       FORM GET_FILE_NAME                                            *
    *       Value help for export/import file name                        *
    FORM get_file_name CHANGING p_outfile LIKE lgrwo-exp_file.
      DATA: path             LIKE lgrwo-exp_file,
            len              TYPE i,
            separator(1)     TYPE c,
            window_system(4) TYPE c.
      FIELD-SYMBOLS <last_char>.
    * get presentation server operating system for file name separator
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                query  = 'WS'
           IMPORTING
                return = window_system.
      IF window_system = 'MC'.             "Mac OS
        separator = ':'.
      ELSE.                                "Windoze
        separator = ''.
      ENDIF.
    * get path name
      path = p_outfile.
      SHIFT path RIGHT DELETING TRAILING space.
      DESCRIBE FIELD path LENGTH len.
      len = len - 1.
      ASSIGN path+len(1) TO <last_char>.
      WHILE <last_char> <> separator AND
            path <> space.
        SHIFT path RIGHT.
      ENDWHILE.
      SHIFT path LEFT DELETING LEADING space.
    * get file name
      WHILE p_outfile CS separator.
        SHIFT p_outfile UP TO separator.
        SHIFT p_outfile.
      ENDWHILE.
    * get file name
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                def_filename = p_outfile
                def_path     = path
                mask         = ',*.*,*.*.'
                mode         = 'S'
           IMPORTING
                filename     = p_outfile
           EXCEPTIONS
                OTHERS       = 0.
    ENDFORM.
    *&      Form  CLEAR_ABOVE_LEVEL
    FORM CLEAR_ABOVE_LEVEL USING   P_LEVEL.
    *Field symbols.
      FIELD-SYMBOLS: <CD>,
                     <NM>.
    *Clear code and name from upper level hierarchies when profit center
    * is found in the lower level hierarchies.
        WHILE P_LEVEL <= 10.
         CONCATENATE 'I_PROFIT-HIER_LVL' P_LEVEL '_CODE' INTO W_LEVEL_CODE.
          ASSIGN  (W_LEVEL_CODE) TO <CD>.
          CLEAR <CD>.
         CONCATENATE 'I_PROFIT-HIER_LVL' P_LEVEL '_NAME' INTO W_LEVEL_NAME.
          ASSIGN  (W_LEVEL_NAME) TO <NM>.
          CLEAR <NM>.
          P_LEVEL = P_LEVEL + 1.
        ENDWHILE.
        CLEAR: P_LEVEL,
               W_LEVEL_CODE,
               W_LEVEL_NAME.
    ENDFORM.                    " CLEAR_ABOVE_LEVEL
    *&      Form  FILL_PRCTR_DETAILS
    FORM FILL_PRCTR_DETAILS.
    DATA: CTR TYPE I.
    *Select description from CEPCT table
      SELECT * FROM CEPCT INTO TABLE I_CEPCT WHERE SPRAS EQ 'EN'.
      SELECT * FROM CEPC INTO  TABLE I_CEPC.
       SORT I_CEPC DESCENDING BY PRCTR DATBI.
       DELETE ADJACENT DUPLICATES FROM I_CEPC COMPARING PRCTR.
       SORT I_CEPC.
       SORT I_PROFIT BY CODE.
    LOOP AT I_PROFIT.
       CLEAR: WA_CEPC,
              WA_CEPCT,
              W_OBJECTID.
       CTR = CTR + 1.
         READ TABLE I_CEPC INTO WA_CEPC WITH KEY PRCTR = I_PROFIT-CODE.
         READ TABLE I_CEPCT INTO WA_CEPCT WITH KEY PRCTR = WA_CEPC-PRCTR
                                                   DATBI = WA_CEPC-DATBI.
              MOVE: CTR             TO I_PROFIT-ID,
                    WA_CEPCT-KTEXT  TO I_PROFIT-NAME,
                    WA_CEPCT-LTEXT  TO I_PROFIT-DESC.
        CONCATENATE '0002' I_PROFIT-CODE INTO W_OBJECTID.
           MOVE-CORRESPONDING I_PROFIT TO I_STR_PC1.
           APPEND I_STR_PC1.
    ENDLOOP.
    FREE I_PROFIT.
    ENDFORM.                    " FILL_PRCTR_DETAILS
    *&      Form  F_DOWNLOAD
    FORM F_DOWNLOAD.
    ENDFORM.
    *&      Form  F_WRITE_TO_FILE
    FORM F_WRITE_TO_FILE.
    LOOP AT I_STR_PC1.
        PERFORM WRITE_FILE USING I_STR_PC1
                                       w_file_prft-PRC_FILE..
    ENDLOOP.
    ENDFORM.                    " F_WRITE_TO_FILE
    FORM WRITE_FILE USING W_RECORD W_PRC_FILE.
      DATA: W_RECORD_LEN TYPE I.
    *  Retreive the actual length of the record to be written
      DESCRIBE FIELD W_RECORD LENGTH W_RECORD_LEN.
      TRANSFER W_RECORD TO W_PRC_FILE LENGTH W_RECORD_LEN.
      IF SY-SUBRC NE 0.
        MESSAGE ID 'ZZ' TYPE 'A' NUMBER '001'
             WITH C_TEXT_WRITE  W_PRC_FILE.
      ENDIF.
      CLEAR W_RECORD.
    ENDFORM.
    Thanks & Regards,
    Poorna.

    hi all,
              here is the solution:
    **------------------------ Data ---------------------------------*
    DATA: i_cepct  LIKE cepct OCCURS 0 WITH HEADER LINE,
          wa_cepct LIKE cepct,
          i_cepc   LIKE cepc OCCURS 0 WITH HEADER LINE,
          wa_cepc  LIKE cepc.
    *Variable declaration
    DATA: w_ctr1(2) TYPE c,
          w_inc1 TYPE i.
    DATA: w_level_code(30) TYPE c,
          w_level_name(50) TYPE c,
          w_level_code1(30) TYPE c,
          w_level_name1(50) TYPE c.
    *Field symbols.
    FIELD-SYMBOLS: <cd1>,
                   <nm1>.
    * External level table will be using the following structure
    DATA: BEGIN OF data_tab OCCURS 0,
            level(4)      TYPE n,          "level in hierarchy
            groupname     LIKE grpdynp-name_coall, "name of node
            fromvalue     LIKE setvalues-from,  "From-Value of interval
            tovalue       LIKE setvalues-to,    "To-Value of interval
            descript      LIKE sethier-descript,"description of this entry
          END OF data_tab.
    * Tables to read sets
    DATA: sethier   LIKE sethier OCCURS 0 WITH HEADER LINE, "hier-nodes
          setvalues LIKE setvalues OCCURS 0 WITH HEADER LINE, "hier-values
          g_setval_index LIKE sy-tabix,    "index for setvalues,
          g_int     TYPE i.
    DATA: BEGIN OF i_profit OCCURS 10,
      id(15)                TYPE c,
      code(10)                 TYPE c,
      name(20)                 TYPE c,
      desc(40)                 TYPE c,
      hier_lvl1_code(30)       TYPE c,
      hier_lvl1_name(50)       TYPE c,
      hier_lvl2_code(30)       TYPE c,
      hier_lvl2_name(50)       TYPE c,
      hier_lvl3_code(30)       TYPE c,
      hier_lvl3_name(50)       TYPE c,
      hier_lvl4_code(30)       TYPE c,
      hier_lvl4_name(50)       TYPE c,
      hier_lvl5_code(30)       TYPE c,
      hier_lvl5_name(50)       TYPE c,
      hier_lvl6_code(30)       TYPE c,
      hier_lvl6_name(50)       TYPE c,
      hier_lvl7_code(30)       TYPE c,
      hier_lvl7_name(50)       TYPE c,
      hier_lvl8_code(30)       TYPE c,
      hier_lvl8_name(50)       TYPE c,
      hier_lvl9_code(30)       TYPE c,
      hier_lvl9_name(50)       TYPE c,
      hier_lvl10_code(30)      TYPE c,
      hier_lvl10_name(50)      TYPE c,
      hier_lvl11_code(30)      TYPE c,
      hier_lvl11_name(50)      TYPE c,
      created_by(15)                         TYPE c,
      created_date(10)                       TYPE c,
      last_updated_by(15)                    TYPE c,
      last_updated_date(10)                  TYPE c,
      batch_id(15)                           TYPE c,
      stage2_dim_id(15)        TYPE c,
      source_system_id(20)                   TYPE c,
      alt_account_set_hierarchy_ind(1)       TYPE c,
    END OF i_profit.
    DATA: BEGIN OF i_str_pc2 OCCURS 10,
            code(10)                 TYPE c,
            desc(50)                 TYPE c,
            hier_lvl1_name(50)       TYPE c,
            hier_lvl3_name(50)       TYPE c,
            hier_lvl4_name(50)       TYPE c,
            extradatetime(20)        TYPE c,
          END OF i_str_pc2,
          BEGIN OF i_setid OCCURS 4,
            g_setid   LIKE sethier-setid,
            v_kokrs LIKE sethier-kokrs,
          END OF i_setid.
    DATA : wa_str_pc2 LIKE i_str_pc2,
           wa_setid LIKE i_setid,
           v_datetim(20) TYPE c,
           v_tim(8) TYPE c,
           v_level_dec(50) TYPE c,
           v_profit_desc(50) TYPE c.
    *"*"Local interface:
    *"  TABLES
    *"      IPROFIT STRUCTURE  ZPCT
    * Append all the major nodes to I_setid
    * SOI7CR0326 – Profit Center node1( under this Hier will be available, and the end you will have profit centers),
    * SOI7FU0763 – Profit Center node2,
    * SOI7FU0764 – Profit Center node3,
    * SOI7FU0765 – Profit Center node4.
      wa_setid-g_setid = text-009.
      wa_setid-v_kokrs = text-004.
      APPEND wa_setid TO i_setid.
      wa_setid-g_setid = text-010.
      wa_setid-v_kokrs = text-004.
      APPEND wa_setid TO i_setid.
      wa_setid-g_setid = text-011.
      wa_setid-v_kokrs = text-004.
      APPEND wa_setid TO i_setid.
      wa_setid-g_setid = text-012.
      wa_setid-v_kokrs = text-004.
      APPEND wa_setid TO i_setid.
    * Loop at earch major nodes from i_setid.
      LOOP AT i_setid INTO wa_setid.
        REFRESH: i_profit.
    * Preparations: check authority to read sets
        CALL FUNCTION 'G_SET_OR_GROUP_AUTHORITY'
             EXPORTING
                  i_setid = wa_setid-g_setid
                  i_actvt = '03'.
    * Funtion module to import the set hierarchy and nodes values.
        REFRESH: sethier, setvalues.
        CALL FUNCTION 'G_SET_TREE_IMPORT'
             EXPORTING
                  no_rw_info    = 'X'
                  setid         = wa_setid-g_setid
             TABLES
                  set_hierarchy = sethier
                  set_values    = setvalues.
    * Copy set into DATA_TAB
        REFRESH data_tab.
        g_setval_index = 1.
        LOOP AT sethier.
          CLEAR data_tab.
          data_tab-level = sethier-level.
          data_tab-groupname = sethier-shortname.
          data_tab-descript = sethier-descript.
          APPEND data_tab.
          CHECK sethier-vcount > 0.
          CLEAR data_tab.
          data_tab-level = sethier-level + 1.
          g_int = g_setval_index + sethier-vcount - 1.
          LOOP AT setvalues FROM g_setval_index TO g_int.
            data_tab-fromvalue = setvalues-from.
            data_tab-tovalue = setvalues-to.
            data_tab-descript = setvalues-descript.
            APPEND data_tab.
          ENDLOOP.
          g_setval_index = g_int + 1.
        ENDLOOP.
    * Loop at the data_tab to move all the Profit center nodes to i_profit.
        LOOP AT data_tab.
          w_inc1 = data_tab-level.
          w_ctr1 = w_inc1.
          IF data_tab-level = text-002 .
            v_level_dec = data_tab-descript.  "Description of level 4 node
            CONTINUE.
          ENDIF.
          IF NOT data_tab-groupname IS INITIAL.
            CONCATENATE text-001 w_ctr1 text-007 INTO w_level_code1.
            ASSIGN  (w_level_code1) TO <cd1>.
            <cd1> = data_tab-groupname.
            CONCATENATE text-001 w_ctr1 text-008 INTO w_level_name1.
            ASSIGN (w_level_name1) TO <nm1>.
            <nm1> = data_tab-descript.
          ELSEIF NOT ( data_tab-fromvalue IS INITIAL OR
                            data_tab-tovalue IS INITIAL ) AND
                             data_tab-level NE text-003 .
            MOVE data_tab-fromvalue TO i_profit-code.
            PERFORM clear_above_level USING w_ctr1.
            APPEND i_profit.
            CONTINUE.
          ENDIF.
        ENDLOOP.
    *Select description from CEPCT table
        SELECT * FROM cepct
                 INTO TABLE i_cepct
                 WHERE spras EQ text-006.
        SELECT * FROM cepc
                 INTO  TABLE i_cepc.
        SORT i_cepc DESCENDING BY prctr datbi.
        DELETE ADJACENT DUPLICATES FROM i_cepc COMPARING prctr.
        SORT i_cepc.
        SORT i_profit BY code.
    * Date and Times for each record.
        CONCATENATE sy-uzeit+0(2) text-005 sy-uzeit+2(2) text-005
          sy-uzeit+4(2) INTO v_tim.
        CONCATENATE sy-datum v_tim INTO v_datetim SEPARATED BY space.
        LOOP AT i_profit .
          CLEAR: wa_cepc,
                 wa_cepct.
          IF   ( i_profit-code <> space
            AND i_profit-hier_lvl2_name <> space
            AND i_profit-hier_lvl3_name <> space ).
            READ TABLE i_cepc INTO wa_cepc WITH KEY prctr = i_profit-code.
            IF sy-subrc = 0.
            READ TABLE i_cepct INTO wa_cepct WITH KEY prctr = wa_cepc-prctr
                                                      datbi = wa_cepc-datbi.
              IF sy-subrc = 0.
    *v_level_dec               ( Description of level 4 node )
    *i_profit-hier_lvl2_name   ( Descri Level 6 )
    *i_profit-hier_lvl3_name   ( Descri Level 6 )
    *i_profit-code             ( Profit Center code )
    *v_profit_desc             ( Profit Center description )
       CONCATENATE wa_cepct-ltext text-013 i_profit-code INTO v_profit_desc.
                wa_str_pc2-hier_lvl1_name = v_level_dec.
                wa_str_pc2-hier_lvl3_name = i_profit-hier_lvl2_name.
                wa_str_pc2-hier_lvl4_name = i_profit-hier_lvl3_name.
                wa_str_pc2-code           = i_profit-code.
                wa_str_pc2-desc           = v_profit_desc.
                wa_str_pc2-extradatetime  = v_datetim.
                APPEND wa_str_pc2 TO iprofit.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
        CLEAR: v_level_dec.
      ENDLOOP.
      CLEAR: wa_setid.
    ENDFUNCTION.

  • Standard Profit center hierarchy

    Hi guys,
    Can we create two standard hierarchies for Profit center in one controlling area?
    Regards
    Hari

    Hello,
    Creation is not  different.
    IMG ==> Controlling ==> Profit Center Acocunting ==> Enterprise Organization ==>
    Generate Enterprise Organization from Profit Center Standard Hierarchy
    Generate Standard or Alternative Hierarchy from Enterprise Organization
    In OKKP, activate components are, you will find alternative hierarchies.
    Please read F1 help on the field in OKKP
    Regards,
    Ravi

  • Single Business Area versus multiple profit center issue

    Dear Experts,
    My client is basically an infrastructure company. We have received a roll out
    project under a department which inturn is  billed to another department
    under the same company code. Now I am planning to create a single business
    area and multiple profit centers under that BA. This is because the business
    is same but responsible areas of profit are two different departments.
    Now I am not sure on the set up process and how do knock off etc are achieved
    to get the financial reports balanced.
    Cost of dept 1 is revenue of dept 2. For this I create a BA and also
    2 profit centers. I do assignment in OKB9. What are other settings required.
    Which profit center would be assigned in the material master?
    My whole idea is to use a single BA with multiple profit centers, if one to one
    relationship is the best way of approach then I shall follow that. But kindly give
    inputs if I use single BA with multiple PC's how effective usage can I make of the
    whole system. client is using MM, SD, PM, PP, FI, CO, PS modules.
    Regards
    Komal

    Hi,
    Recently we have got a business requirement for the concept of Single Plant which is assigned to multiple profit centers. I would request any of you to help me with any points which has the pros and cons of this set up.
    First think why many profit center required for one plant explain it ?
    Now you know from where system will take profit center in accounting docuement ?
    as per me system take from Material master costing view
    you have project base company or client or WBS at your end ?
    In one material we can assign single profit center
    In on cost center we can assign single profit center
    so can you explain your requirement exactly
    Regards
    Kailas Ugale

  • Cost/Profit Center Hierarchies

    Hi
    Are Cost/Profit Center Hierarchies standard objects in MDM. My Client is looking to maintain these centrally and dictribute accross the landsacape.
    If not how easy(?) would it be to set them up?
    Naveed

    Klaus,
    Is there any supporting documentation that shows best practices and methodologies for implementing a security strategy in support of the profit center hierarchy?  Best practices for developing the hierarchy and then for supporting the hierarchy from a security standpoint to allow various levels of viewing based on the hierarchy (profit center).
    Thanks,
    Shaf

  • Multiple Dummy Profit Center

    We have one controlling area and multiple company codes. The requirement is to have 1 dummy profit center per company code. Is that possible? The reason being, currently all company codes are trying to post in one dummy profit center and it becomes hard to reconcile that dummy profit center. Is there a way to restrict company codes in dummy profit center or have multiple dummy profit centers?

    Hi,
    You cannot assign another dummy profit center to controlling area. You can replace the dummy profit center, if the original dummy profit center doesn't have any posting,since that would lead to inconsistencies.
    Regards,
    Dinabandhu.

  • SAP BPC - Legal entity/Profit Center hierarchies - Time dependency

    Hello,
    Usually Organizational structure (legal entity/ Profit center) hierarchies are time dependent in EC-CS and BCS.
    Are these hierarchies time dependent in BPC?
    If yes, How these settings should be made in BPC?
    Kind regards,
    RJ

    BPC NW does NOT support time dependent hierarchies. However in 7.5NW, you can use dynamic hierarchy editor that will enable you to do time dependent BPC reports.
    http://aiokeh.wdf.sap.corp:50000/SAPIKS2/contentShow.sap?_SCLASS=XDP_STRUCT&_SLOIO=66348113C47B4AE7B2F068B88047D02B&TMP_IWB_TASK=PREVIEW2&RELEASE=610&LANGUAGE=EN&_SEQNUM=307&_LOIO=6983A56B1CE34F89A016C8E795C773BF&_CLASS=BCO_COMMON
    Regards
    Pravin

  • Function module to find the top node in the Profit Center standard hierarch

    Hi,
    Please let me know the function modules/Tables to do the following.
    1. To find the Top node in the Profit center standard hierarchy which is displayed via KCH6N Transaction.
    2. To read/retrieve standard hierarchy displayed in KCH6N Transaction.
    Thanks in Advance,
    Madhuri.

    Hi Madhuri ,
    have a look @<b>SETLEAF</b> or SET* in se11 , u can get the Top Node by putting the Logic like this
    ex: i am searching for Top Node of A3
    <b>select setname from setleaf where  valfrom eq 'A3'.</b>and for that selected setname u have to do one more
    loop.
    <b>select setname from setleaf where  valfrom eq 'A2'.</b>
    then only u will net Node A1.
    this is a sample code only , dont check F2.
    let me know if u want more inputs of Set Ids.
    regards
    prabhu
    [email protected]
    NjoySAP

  • Urgent :Getting error "No ALE scenario active in Profit Center Accounting"

    Hi Experts
    I am working on a LSWM project ,which uses BAPI BAPI_PROFITCENTER_CREATE for upload of data,but I am facing a strange problem during the IDOC posting the error "No ALE scenario active in Profit Center Accounting" is shown and the status of IDOC goes to 51.
    I have done all the ALE setting required for LSMW like File port ,partner type and partner number.
    Please help me to solve this error.
    Thanks
    -Mitesh
    Message was edited by:
            Mitesh Parekh

    Hi,
    Refer This SDN Blog, which gives you steps in detail....
    LSMW – Step by Step Guide: Legacy System Migration Workbench is an R/3 Based tool for data transfer from legacy to R/3 for one time or periodic transfer.
    Basic technique is Import data from Spreadsheet / Sequential file, convert from source format to target format and import into R/3 database. LSMW not part of standard R/3, if we need this product email [email protected]
    Advantages of LSMW:
        • Most of the functions are within R/3, hence platform independence.
       • Quality and data consistency due to standard import techniques.
       • Data mapping and conversion rules are reusable across projects.
       • A variety of technical possibilities of data conversion.
       • Generation of the conversion program on the basis of defined rules
       • Interface for data in spreadsheet format.
       • Creation of data migration objects on the basis of recorded transactions.
       • Charge-free for SAP customers and partners.
    Working With LSMW:
    Use TCODE LSMW
    Objects of LSMW:
      •Project   – ID with max of 10 char to Name the data transfer project.
      • Subproject   – Used as further structuring attribute.
      • Object   – ID with max of 10 Characters, to name the Business object .
      • Project can have multiple sub projects and subprojects can have multiple objects.
      • Project documentation displays any documentation maintained for individual pop ups and processing steps
    User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
    Object type and import techniques:
      • Standard Batch / Direct input.
      • Batch Input Recording
          o If no standard programs available
          o To reduce number of target fields.
          o Only for fixed screen sequence.
        • BAPI
        • IDOC
          o Settings and preparations needed for each project
    Preparations for IDOC inbound processing:
        • Choose settings -> IDOC inbound processing in LSMW
        • Set up File port for file transfer, create port using WE21.
        • Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
        • Setup partner type (SAP recommended ‘US’) using WE44.
        • Maintain partner number using WE20.
        • Activate IDOC inbound processing.
        • Verify workflow customizing.
    Steps in creating LSMW Project:
        • Maintain attributes – choose the import method.
        • Maintain source structure/s with or without hierarchical relations. (Header, Detail)
        • Maintain source fields for the source structures. Possible field types – C,N,X, date, amount and packed filed with decimal places.
        • Fields can be maintained individually or in table form or copy from other sources using upload from a text file
        • Maintain relationship between source and target structures.
        • Maintain Field mapping and conversion rules
        • For each Target field the following information is displayed:
          o Field description
          o Assigned source fields (if any)
          o Rule type (fixed value, translation etc.)
          o Coding.
          o Some fields are preset by the system & are marked with Default setting.
        • Maintain Fixed values, translations, user defined routines – Here reusable rules can be processed like assigning fixed values, translation definition etc.
        • Specify Files
          o Legacy data location on PC / application server
          o File for read data ( extension .lsm.read)
          o File for converted data (extension .lsm.conv)
        • Assign Files – to defined source structures
        • Read data – Can process all the data or part of data by specifying from / to transaction numbers.
        • Display read data – To verify the input data being read
        • Convert Data – Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
        • Display converted data – To verify the converted data
    Import Data – Based on the object type selected
        • Standard Batch input or Recording
          o Generate Batch input session
          o Run Batch input session
        • Standard Direct input session
          o Direct input program or direct input transaction is called
    BAPI / IDOC Technique:
        • IDOC creation
          o Information packages from the converted data are stored on R/3 Database.
          o system assigns a number to every IDOC.
          o The file of converted data is deleted.
        • IDOC processing
          o IDOCS created are posted to the corresponding application program.
          o Application program checks data and posts in the application database.
    Finally Transport LSMW Projects:
        • R/3 Transport system
          o Extras ->Create change request
          o Change request can be exported/imported using CTS
        • Export Project
          o Select / Deselect part / entire project & export to another R/3 system
        • Import Project
          o Exported mapping / rules can be imported through PC file
          o Existing Project data gets overwritten
          o Prevent overwriting by using
        ‘Import under different name
        • Presetting for Inbound IDOC processing not transportable.
    <b>One Last thing, Check in BD64 is the Distribution model is Active for Profit Center</b>.
    Cheers...
    Santosh.D
    <i><b>Mark All the Usefull  Answers.</b></i>

  • Profit center hierarchy and closure transactions

    Hi fellows,
    My company is reorganised.
    As the annual closure will last several months, I will need to run 2 profit center hierarchies at the same time.
    I will copy the standard hierarchy 2009.
    The standard hierarchy 2009 will be modified and used for 2010.
    The copy will become an alternative hierarchy used to close 2009 accountancy.
    Do you see any problems to run 2 hierarchies at the same time?
    Is it possible to make the annual closure with an alterative hierarchy for transactions (KKAJ, KSII, KB15N...)
    Thanks a lot
    Vero

    Hi
    You can maintain as many number of hierarchies as possible.
    There is absolutely no problem to maintain any alternative hierarchy but you can't maintain multiple standard hierarchies.
    Profit Centre Standard Hieararchy T.Code is KCH1 - Create, KCH5N - Change, KCH6N - Display
    Profit Centre Group (Alternative hierarchy) T.Code is KCH1 - Create, KCH2 - Change, KCH3 - Display.
    Regards.
    Chandrasekhar Ponugumati

  • Profit Center population in the Vendor and Customer Line items

    hello
    our client is asking for  getting profit center in the vendor and customer line items  where in the view FBL5n and fbl1n we are not getting the profit center populated - in the new gl i understand that there is a standard report based on the gl account.
    but our business is not satisfied with the report and expecting report at profit center level.
    Can any one suggest any way of doing this.
    regards,
    Vijay

    Dear Vijay,
    Let me provide you my view of solutioning for this. This is an enahcement that needs to be done
    1. You can get the profit center from the given vendor and customer line item at the time of posting, using an enahcement you will be able to capture it.
    2. Existing the profit center field is not populated in the BSIK,BSAK,BSID and BSAD tables
    3. Hence, in the same enhancement once you capture the profit center , you can write the code that profit center is updated in these tables also.
    4. This will help you to do the vendor line item wise selection in the FBL1N,  FBL5N profit center wise.
    Constraints of this solution:
    The only constraint remains where in the for a given document if there are multiple profit center, then the system will do the splitting profit center wise for a vendor line item, which will not populate the profit center in those tables as there is only one field available in the bsid etc.. tables.
    This basically would be the one the soltuion where in as seeen from the end user ther eis no change in the front end interface , the way they are doing always they can do.
    You need to also take care the % of document splitting means cross profit center postings /cross document splitting charactericstics postings and the volume involved in this. so that you can suggest this to your client.
    Regards,
    Bharathi.

  • Vendor Payable Reconciliation Account at Profit Center Level

    This is a general question about how people are tracking vendor payable reconciliation accounts at a profit center level.  We are running into scenarios where we cannot track the vendor payables at the profit center level because cross company postings are causing the document splitting to enter profit centers from different legal entities at the vendor payable GL account level.  Have other people ran into this problem? 
    Thank you for your help!

    Hi
    Your issue is not very clear. The Document Type is defined at Header and one accounting document can contain multiple profit centers
    Regards
    Sanil

  • How to use multiple hierarchies for a single char in single query

    Hi,
    Is there any way that we can use multiple hierarchies for a single char in single query. I tried and it just allows me to select one hierarchy even if I use hierarchy variable.
    I have a requirement where user wants to see information related to a cost center with different cost center groups in different hierarchies (every year has different cost center group hierarchies).
    Suppose I want to see information related to a cost center from year 2001-2004.in these four year cost center may have been associated to different groups depending upon that year hierarchy. How can I do that?
    Thanks
    Jona

    Nope. Now way to do this.
    There is always just one hierarchy assigned to a characteristic. And even if the hierarchy was time dependent, it only reads it for one key date and not according to transaction data.
    Regards,
    Beat

  • Changing Profit center in Sales Order after Shipment Document

    Hi All,
    We have situation here, The thing is at the time of creating Sales order I don't know the profit center which has to be assigned for example, I have created a sales order for goods transport, when I create the sales order I don't know which vehicle is going to transport this order and the goods can be transported by multiple vehicles.
    For my business each vehicle is a cost and profit center since I wanna know the profitability of each vehicle.
    So I will come to know the vehicle ( Profit center) after creating the shipment document, now I want to have the profit center of this vehicle to be updated back in the sales order so that the Billing (revenue) is recorded in this profit center.
    Please let me know how to do this. I know the PC field is greyed out after shipment and PGI is done. So how to handle this.
    Your suggestions will be highly appreciable
    Regards,
    Satan

    Hi,
    Thanks
    If I went with internal order every where I gotta enter the internal order since it doesn't get automatically derived like a profit center. I would have to define substitutions everywhere !
    I am trying to capture all the costs and revenue for each transport vehicle since this is transport business. It's not like my business is something else and vehicles are a part of it.
    Almost all transactions will have to be posted with Internal order which is very difficult to configure.
    Can you please elaborate on the work around you have mentioned since I am neither technical nor SD consultant.
    Thanks in advance

Maybe you are looking for

  • How to convert indesign document's data into the xml file

    Hi all, First let me explain what exactly i am trying to do. just i want to ge all page items data (type,frame etc ) from a document and i want to convert all those data into my xml structure . now i am able to get page item's data from a document .

  • Pages Seizes Up When Switching Applications

    I recently had to move all my computer stuff for redecoration work. Since re-assembly everything seems fine except Pages. For most of the time it's nippy and fine. When I'm running it with other apps, though, something weird seems to happen. When I s

  • Changes in web.config on all web sites

    Hello.  I have a strange problem. last month we made some changes in the web.config file for some of our web sites do to a problem. the problem was when user try to open a office file ( word,excel,ppt ) in a read write mode in internet explorer 11 or

  • How my clients can upload  raw video files to my linux server

    Any ideas or thoughts really welcome: I need to figure out a way or process for my clients to upload their raw video source files ( any known usual video formats and extensions) from their video cameras or devices or storage source  that is tied into

  • Precompiling JSPs Programatically

    Does anyone know how we can precompile JSP programatically?           We are writing a batched java application that will create a series of JSP           files on a nightly basis. We would like to compile these files when they           are created