Profit Center Comparison: Return on Investment

Hi,
I am looking to generate return on investment report in PCA through S_ALR_87013339. It is looking for P&L and B/S account groups. Can someone tell where to create these groups, and what accounts are generally grouped together for this report?
Thank you,
Ram

Hi,
Transaction KDH1.
Hope this helps.
Cheers,
Gimmo

Similar Messages

  • Business Area vs Profit Center comparison document

    Friends,
    I have 8 company codes, 6 comapny codes are running with Business area ....
    Now business wants bring those 2 company codes into Business area using.. is there any imapct for running company codes to use Business area ?? 
    I would like to suggest Profit center accounting  instead of Business area.... if you have any presentation or documentation on  Business area vs Profit center please share me .....
    Thanks alot for your help..
    what might be necessary in each of the active company codes, to turn on business areas again, since they used to be active and what process, configuration changes necessary for each (BA and PC)
    FICO

    Hi,
    It is recommended to enable BA to a  running company only at the end of the year. The main impacts are in the Fixed Assets and Cost Centers. I have performed this task in the middle of the year and had to upload this key on all Assets, and I had used a  report to assign to all cost centers. It may be necessary to create validation rules for the financial Accouting.
    Regards

  • Profit center - Return on Investment

    Hi All,
    S_ALR_87013339 - Profit Center Comparison: Return on Investment  - Can any one explain me what is this report? What type of data we can get through this report? 
    rajeswjari

    Hello,
    This report compares the ROI between two profit centers for
    P&L Account Group
    and
    BS Account Group
    within PCA.
    Regards,
    Ravi

  • Profit Center Groups Wise Report

    Hi Team,
    Is it possible to have GL Balance, Vendor and customer Balances on Profit Center Group Wise on basis of Plant to which few more plants are assigned.
    For Example:
    Company code is 1000
    Under Co. code 6 Plants are present ie; 2000, 3000, 4000, 5000,6000, 7000
    3000 and 4000 Plants reporting to 2000 plant 6000,7000 plants are reportting to 5000 plant
    for ex geographically you can imagine we have one comany code and uder that two main reporting centers are exists like south and north.
    For every plant we have 10  profit centers. To get the plant wise P&L and B/S we created  profit center groups and we are getting the reports in controlling but client require GL balances vendor balances Customer balances in FI on profit center group wise. (Both vendors balance FK01 & XK01, Customer balance FD01,XD01,  GL Account Balance of 2000,3000,4000 all combined)
    so i would like to know if we want FI reports like plant shall we create group profitcenter or we have some other option because p group wise  GL balnces customer balnces vendor balnces is must requyired for the client.
    Thanks,
    Madhu

    Hi
    You can check with below mentioned reports
    S_ALR_87013326 - Profit Center Group: Plan/Actual/Variance
    S_ALR_87013327 - Profit Center Comparison: Plan/Actual/Variance
    S_ALR_87013330 - Profit Center Group: Plan/Plan/Actual Versions
    S_ALR_87013332 - Profit Center Group: Current Period/Aggregated/Year
    S_ALR_87013334 - Profit Center Group: Compare Actual Quarters over 2 Years
    S_ALR_87013336 - Profit Center Group: Balance Sheet Accounts Plan/Actual/Variance
    S_ALR_87013337 - Profit Center Group: Key Figures
    S_ALR_87013339 - Profit Center Comparison: Return on Investment
    S_ALR_87009712 - Profit Center List: Plan/Actual
    S_ALR_87013340 - Profit Center Group: Plan/Actual/Variance
    S_ALR_87009726 - Profit Center Group: Plan/Actual/Variance by Origin
    S_ALR_87009734 - Profit Center Group: Plan/Plan/Variance
    S_ALR_87009717 - Profit Center Group: Quarterly Comparison of Actual Data
    S_ALR_87013342 - Profit Center: Statistical Key Figures
    Regards
    Praveen PC

  • Profit Center wise ROI report considering BS items

    Dear Expert,
    As part of our SAP implementation
    1.client wants , Profit center wise reporting for balance sheet items, for calculating ROI per profit center, can it be done? If yes, what balance sheet items , SAP standard willl consider while generating an ROI report
    can you name any standard report to generate ROI report
    2. Client wants profit center wise report in the following format for a profit center.
         Is there any standard report to generate in the format below?
    S.No     Description ( Profit A)
    1     Revenues
    2     Sales Deductions
    3     Cost of Sales
    4     Gross Result (1-2-3)
    5     Less Sales and Distribution Costs & Admin Costs
    6     Net Result ( 4-5)
    Thanks
    Sanjai

    Pl reveiw the reports S_E38_98000090 - Profit Center Group: Key Figures or S_E38_98000091 - Profit Center Comparison: ROI.
    Also take a look at the segment reports S_E38_98000092 to S_E38_98000095.
    You may copy these reports and update to change the formatting.
    Regards
    Subodh

  • Wrong profit center picked during return GR

    Dear Experts,
    I'm doing purchase return process. Thus I created PO & then return material via MIGO by using movement type 161. I noticed that wrong profit center that system picked under account assignment tab in MIGO. This profit center field is grayed out so I couldn't change to correct profit center during MIGO .
    Let me understand where the system picked the profit center because there is no account assignment tab exist in said PO. So I unable to check where the prfit center come from. Or how may I check this in configuration path.
    Please understand me how the profile center play his role during PO & MIGO creation. Thank you.
    rgds,
    nantha

    Dear Experts,
    Yes I noticed the profit center. So system picked from master data when we perform GR. I noticed that the same profit center in sales general/plant in material master. Appreciate if you could tell me what is the different mainting in both field.
    rgds,
    nantha

  • Post balance sheet account to profit center accouting

    Hi.experts.
    I want to post some blance sheet accounts to profit center accounting,these account include material stock,wip. what should I do?
    thanks in advance.
    Fannt

    Hello
    Balance sheet items can be transferred periodically or online in realtime
    You can transfer the following balance sheet items to Profit Center Accounting in the standard SAP system at end of period:
        Payables and receivables
       Material stocks
       Assets
       Work in process
    This can be done in period closing activities for AR/AP
    The assignment of payables and receivables to various profit centers is basically derived from the offsetting entry line of the FI document to which they belong. It is not possible to make structural changes to them within Profit Center Accounting. If, for example, you assign a new profit center to a material, or change the derivation rules when creating sales orders, these actions do not affect the assignments of documents which have already been posted.
    The payables and receivables to be divided are calculated in FI at the end of the period. To do so, call up the SAP Easy Access screen and choose Accounting ® Financial Accounting ® General Ledger ® Periodic Tasks ® Closing ® Regroup ® Debit Balance Sheet Account Subsequently.
    Enter the company codes for which you want to perform the calculation. For these company codes, the payables and receivables are divided according to profit center and business area. The results are then saved.
    You can now transfer the data to Profit Center Accounting. Do not choose the next menu option Post B/S readjustment n Financial Accounting. Instead, transfer the data in the Profit Center Accounting application menu, under Actual Postings ® Period Closing ® Transfer Payables/Receivables
    You obtain a list of all the company codes in the active controlling area. Select the desired company codes and the period and fiscal year which you want to transfer to Profit Center Accounting.
    The system then posts the payables and receivables to Profit Center Accounting under the reconciliation accounts of the general ledger. No FI documents are created in the process
    You can call up the function for transferring material stocks in Profit Center Accounting Customizing, under Actual Postings ® Transfer Selected Balance Sheet Items ® Set Up Material Stocks.
    The selection screen provides you with the choice of all company codes within the active controlling area. Select the period to be transferred. The current period is always based on the status of Materials Management. Normally, the data from the previous period is transferred.
    You access the transfer function by choosing the following path from the Customizing menu for Profit Center Accounting: Actual postings ® Transferring selected balance sheet items ® Generate opening balance for work in process.
    The selection screen provides you with the choice of all company codes within the active controlling area. You also enter the period and fiscal year.
    You generally work with the standard results analysis version 0. Should you wish to use a different results analysis version, note that this must be set up in CO Customizing for updating in Financial Accounting, as the corresponding account determination is required.
    The program transfers all changes in work in process within a single period. When running this function for the first time with a given controlling area, please select the field Create opening balance. The system then posts the opening balance to the start period. You can also post the opening balance to period 01 at fiscal year change, so avoiding having to carry the balance forward.
    You access the transfer program by selecting Actual postings ® Transferring selected balance sheet items ® Generate opening balance for assets in Customizing for Profit Center Accounting.
    The selection screen provides you with the choice of all company codes within the active controlling area. The depreciation area book depreciation per trade law (01) is provided as a default. You also select the posting period and the fiscal year.
    You should run the program in the background, as large amounts of data are normally selected. If you select the field Line item, a line item will be created for each asset in Profit Center Accounting. When handling a large volume of data, you should only use this option for test purposes.
    The system assigns assets to profit centers indirectly, via assigned internal orders or cost centers (see Assigning Assets). The program transfers the acquisition and product costs, as well as cumulated value adjustments. The accounts used for this transfer are taken from account determination for Asset Accounting.
    Note that it is only possible to calculate key figures (such as Return on Investment) in Profit Center Accounting correctly if an indirect statement of assets and depreciations is made in Financial Accounting
    Reg
    *assign points if useful

  • Profit center report picks production variance posting from prev periods

    (This is a repost, from a ill-chosen forum)
    Guys I am lost
    I am running S_ALR_87013340 : profit center Plan Actual comparison report, on a group of profit centers: the total I got is different from the sum of the individual profit centers in the group: the difference being on my production variance account, and a sales posting that relates to the prior period
    I had the same issue last month, with the discrep. only being my production variance account.
    but I was expecting something of the sort: it was the first time we closed orders, and SAP closed all orders since the implementation, years earlier
    What could cause this?
    Thanks for your time, again
    KR - Loï

    Hi
    The Production Variance account is usually not created as a Cost element.. Hence, the PC from the Mat Master is derived into this Line item.... Ideally, the PC from mat master gets copied into the Prod order also... If you change the PC in mat master later on, you can see a mismatch
    Whats the situation in your case? The Prod Var account has PC or not or which PC does it have?
    Br, Ajay M

  • Profit center report doesn't tie up to the individual PC

    Guys I am lost
    I am running S_ALR_87013340 : profit center Plan Actual comparison    report, on a group of profit centers: the total I got is different from the sum of the individual profit centers in the group: the difference being on my production variance account, and a sales posting that relates to the prior period
    I had the same issue last month, with the discrep. only being my production variance account.
    but I was expecting something of the sort: it was the first time we closed orders, and SAP closed all orders since the implementation, years earlier
    What could cause this?
    Thanks for your time, again
    KR - Loï

    Hi
    If you see the screen shot I attached, it has the text "(new)" against the Folder name...
    All new gl reports are under such a folder to differentiate... You cant deactivate any reports from the Standard Menu... You can just control it by authrization....
    You can also ask your BASIS guy to display only the authorized trans on the user screen so that they are not able to see the std set of transactions
    Br, Ajay M

  • Report Painter Report for Profit Center

    Hi All,
    I am creating a report for profit center in GRR1.I was using library 8A3,& ledger 8A.which uses for PCA line i tems and table used is GLPCT.which shows profit center totals by period.I ran GLPCT in SE16 and found  out No data selected.I see that profit center accounting is not active  in my system ECC6.0
    and I didn't see any line records for profit center in any of the profit center tables.GLPCA.Now if someone  knidly suggets me how to achieve this report, can I still do it profit center wise or  not? which library should i use in GRR1.The layout of my report is as under.Thanks
    CURRENT MONTH*                                                                               
    Current Yr      Current Yr    Prior Yr
    Actual            Budget        Actual          Variance          
    YEAR TO DATE 
    Current Yr      Current          Prior Yr        Annual
    Actual            Budget        Actual           Budget    Variance
    Regards
    Shaun

    Thanks Abhijit , I can now see my report group at the bottom of the list .I assigned you full points.I posted another question regarding report painter .If you could also give me some guidance on that.When I was creating rows and updating cost elements with account numbers.I set up 3 revenue accounts and then ran the report to see if I get any data for profit centers.I did get data but when I double clicked on one of the account,it displays this messsage.I read the msg. but could not make any sense with it.for example in definning row I put account number from/to  400000- 400000    Explode. and thats a characteristic.
    No valid master data for characteristic 'Account Number'
    Report MEG1 does not contain any data pages.
    No valid master data for characteristic 'Account Number'
    Message no. GR633
    Diagnosis
    No valid master data within the specified interval was found for the characteristic 'Account Number'.
    Explanation:
    For each characteristic that is processed in a report, the Report Writer optimizes the interval limits which are relevant for selecting data from the database.
    Example:
    A report contains the characteristic 'account', for which an account interval from 100000 to 200000 has been entered.  However, if the master data validation shows that the lowest/highest account in this interval is 110000/190000, the selection will be limited to accounts 110000 to 190000 only.
    The system returns this error message if no master data exists for the interval.
    This error is typically caused by an invalid version.  In FI-SL Special Purpose Ledger, for example, versions are assigned to the ledger and are defined in configuration.  The report definition can then contain a non-defined version.  A similar situation applies to controlling (cost center accounting): here, versions are assigned to the controlling area and fiscal year and can be defined in planning.
    Another cause of this error is a ledger that is not assigned to the table for which the report was created.
    Technical information:
    The field name for 'Account Number' is 'RACCT'.
    System Response
    The system cancels processing.
    Procedure
    Check the report definition, or the specified master data, or the intervals.
    Regards
    Shaun

  • 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.

  • Profit center is posted to asset account??

    Hello experts,
    I wonder it is correct that profit center is posted to asset account.
    Now our B1 2005B does that.
    For example,
    In AR credit memo (or Sales return) , we input profit center XX into the documents.
    Then B1 create Journal Entry as below;
    Dr
    Sales Revenue 100 , profit center XX
    Inventory 50, profit center XX
    Cr
    AR 100,
    Cost of Goods Sold 50, profit center XX
    Inventory account is asset account, so I'd like to know this is correct and SAP's spec ? or SAP's bug?
    Please give your advise,
    Kaori

    Hi Kaori,
    The functionality is slightly different in the B version so I can tell you how it working in the A version and maybe you can verify this.
    The Profit Center should only be allocated to accounts that has been defined as Account type 'Sales' or 'Expenditure'. If the Inventory account is given this definition it will allocate the profit center to the inventory as well.
    Normally by default P&L account are set as 'Sales' or 'Expenditure' and Balance Sheet accounts set as Account type 'Other'.
    Hope it helps.
    Jesper

  • Wrong profit center on material doc (Goods Receipt against PO for Asset)

    Dear SAP Expert,
    When our company upgrade our SAP version from 4.6C to ECC6, all Profit Center on Material document (Goods Receipt on Purchase Order for Asset) is filled by profit center DUMMY.
    This condition not happend in our previous version (4.6C). Is there any new configuration on ECC6?
    Many Thanks
    Maickel P

    HI Werner,
    Based on Note 684659
    Question 10:
    "Why aren't the correct profit centers derived from the account assignment objects?"
    Response[1]:
    You first have to maintain the account assignment objects as described in the response for question.
    Action:
    I Already assign account assignment object PS_PSP_PNR "WBS Element of Investment Project", transaction type '*', account assignment type 'APC Values Posting' because our transaction is using WBS element as an account assignment on purchase order.
    (Before I assign this account assignment object on t-code ACSET all transaction for asset which account assignment using WBS element doesn't generate controlling document on GR process)
    Response[2]:
    You also have to make sure that the profit center is ready for input in the field status of the account and the posting key.
    Question:
    Where I have to check this condition?
    Please check the field status of the account FS00 if Profit Center and Cost Center maintained optional.
    Action:
    I Already check on "FS00 - Edit cost element" and found that "Default account assignment" is blank

  • Mb1b movement 453 - profit center not from material but from sales order

    Dear All,
    we have the problem that by return process from sales order stock to free stock (453 movement) we would like to have the original Profit center from sales order, but as SAP standard it moves PC from material master.
    we have implemented already oss 978159 sowie 1038490, but did not help.
    Since days we try to find an uxer exit in MM or CO!? where we could write in the correct profit center. But unfortunately PC from material master pops up at the end of the process, and the system overwrites it again and again.
    Had sy of you similair problem? can you please help with an user exit?
    Thanks,
    BB

    Hi
    I think this behaviour is correct.. Since you are moving from Sales order stock to Unrestricted stock, the PC from mat master would prevail...
    As far as I know, this behaviour is correct
    Regards
    Ajay M

  • MB1B / Change profit center in Exit, Badi or Enhancement

    Hi guys,
    we're doing transfer postings in MB1B with reference to existing returns. In the return item a profit center different from the material master is entered. MB1B is creating the material document with the profit center from the materal master.
    The requirement is to get the profit center from the return into the material document.
    I have tried various ways to meet the requirement:
    - Badi MB_DOCUMENT_BADI
    - Badi MB_MIGO_ITEM_BADI
    - Exit EXIT_SAPLIE01_007
    - Enhancement ENHANCEMENT-POINT SEGMENTDATEN_MAT_SETZEN_03
    - Enhancement ENHANCEMENT-POINT MM07MFM0_M_SEGMENTE_GENERIE_04
    In MB_DOCUMENT_BADI and EXIT_SAPLIE01_007 the profit center can't be changed, MB_MIGO_ITEM is not run through.
    In the 2 enhancements the value can be changed, but the profit center in the material document and the follow up documents is still taken from the material master.
    Does anybody know where I can change the profit center in this case? (Badi / Exit / Enhancement).
    It's a requirement that MB1B has to be used, so using MIGO for this is not a solution.
    Thank you very much!
    Best regards, Andreas

    Hi,
    Enhancement - MB_CF001            Customer Function Exit in the Case of Updating a Mat. Doc.  is called in the update task.
    This could be useful.
    Thanks
    Sujay

Maybe you are looking for