Need help on enhancement of 0CO_OM_OPA_1 with Material and Plant

Hi,
I have a requirement that need to build a BW report which shows Actual costs and Planned Costs of Service Orders. We are getting Actual costs from 0CO_OM_OPA_6 and now i am getting planned costs from 0CO_OM_OPA_1. For actual costs we are getting Service Orders, Material and plant from Satandard DS 0CO_OM_OPA_6. Where as For Planned Costs standard data source 0CO_OM_OPA_1 is not having Material and Plant information. For this we decided to enhance 0CO_OM_OPA_1 with Material and Plant.
But we are not sure the source tables for material and plant and the logic to extract these data from the tables. Can anybody please help me out.
Thanks for your supprt in advance.

It's possible you may need to use a CO-PA (profitability analysis) datasource instead of 0CO_OM_OPA_6.  0CO_OM_OPA_6 extracts data from CO tables. 
Based on the path you provided "...Profit. segment...", the requested data might exist with CO-PA.
If you determine the required data resides in CO-PA, you'll have to create a datasource based on the operating concern.  You can perform a search within the online docs for steps to create this datasource.
Hope this helps.
Rod

Similar Messages

  • Need help in optimizing the query with joins and group by clause

    I am having problem in executing the query below.. it is taking lot of time. To simplify, I have added the two tables FILE_STATUS = stores the file load details and COMM table that is actual business commission table showing records successfully processed and which records were transmitted to other system. Records with status = T is trasnmitted to other system and traansactions with P is pending.
    CREATE TABLE FILE_STATUS
    (FILE_ID VARCHAR2(14),
    FILE_NAME VARCHAR2(20),
    CARR_CD VARCHAR2(5),
    TOT_REC NUMBER,
    TOT_SUCC NUMBER);
    CREATE TABLE COMM
    (SRC_FILE_ID VARCHAR2(14),
    REC_ID NUMBER,
    STATUS CHAR(1));
    INSERT INTO FILE_STATUS VALUES ('12345678', 'CM_LIBM.TXT', 'LIBM', 5, 4);
    INSERT INTO FILE_STATUS VALUES ('12345679', 'CM_HIPNT.TXT', 'HIPNT', 4, 0);
    INSERT INTO COMM VALUES ('12345678', 1, 'T');
    INSERT INTO COMM VALUES ('12345678', 3, 'T');
    INSERT INTO COMM VALUES ('12345678', 4, 'P');
    INSERT INTO COMM VALUES ('12345678', 5, 'P');
    COMMIT;Here is the query that I wrote to give me the details of the file that has been loaded into the system. It reads the file status and commission table to show file name, total records loaded, total records successfully loaded to the commission table and number of records that has been finally transmitted (status=T) to other systems.
    SELECT
        FS.CARR_CD
        ,FS.FILE_NAME
        ,FS.FILE_ID
        ,FS.TOT_REC
        ,FS.TOT_SUCC
        ,NVL(C.TOT_TRANS, 0) TOT_TRANS
    FROM FILE_STATUS FS
    LEFT JOIN
        SELECT SRC_FILE_ID, COUNT(*) TOT_TRANS
        FROM COMM
        WHERE STATUS = 'T'
        GROUP BY SRC_FILE_ID
    ) C ON C.SRC_FILE_ID = FS.FILE_ID
    WHERE FILE_ID = '12345678';In production this query has more joins and is taking lot of time to process.. the main culprit for me is the join on COMM table to get the count of number of transactions transmitted. Please can you give me tips to optimize this query to get results faster? Do I need to remove group and use partition or something else. Please help!

    I get 2 rows if I use my query with your new criteria. Did you commit the record if you are using a second connection to query? Did you remove the criteria for file_id?
    select carr_cd, file_name, file_id, tot_rec, tot_succ, tot_trans
      from (select fs.carr_cd,
                   fs.file_name,
                   fs.file_id,
                   fs.tot_rec,
                   fs.tot_succ,
                   count(case
                            when c.status = 'T' then
                             1
                            else
                             null
                          end) over(partition by c.src_file_id) tot_trans,
                   row_number() over(partition by c.src_file_id order by null) rn
              from file_status fs
              left join comm c
                on c.src_file_id = fs.file_id
             where carr_cd = 'LIBM')
    where rn = 1;
    CARR_CD FILE_NAME            FILE_ID           TOT_REC   TOT_SUCC  TOT_TRANS
    LIBM    CM_LIBM.TXT          12345678                5          4          2
    LIBM    CM_LIBM.TXT          12345677               10          0          0Using RANK can potentially produce multiple rows to be returned though your data may prevent this. ROW_NUMBER will always prevent duplicates. The ordering of the analytical function is irrelevant in your query if you use ROW_NUMBER. You can remove the outermost query and inspect the data returned by the inner query;
    select fs.carr_cd,
           fs.file_name,
           fs.file_id,
           fs.tot_rec,
           fs.tot_succ,
           count(case
                    when c.status = 'T' then
                     1
                    else
                     null
                  end) over(partition by c.src_file_id) tot_trans,
           row_number() over(partition by c.src_file_id order by null) rn
    from file_status fs
    left join comm c
    on c.src_file_id = fs.file_id
    where carr_cd = 'LIBM';
    CARR_CD FILE_NAME            FILE_ID           TOT_REC   TOT_SUCC  TOT_TRANS         RN
    LIBM    CM_LIBM.TXT          12345678                5          4          2          1
    LIBM    CM_LIBM.TXT          12345678                5          4          2          2
    LIBM    CM_LIBM.TXT          12345678                5          4          2          3
    LIBM    CM_LIBM.TXT          12345678                5          4          2          4
    LIBM    CM_LIBM.TXT          12345677               10          0          0          1

  • Need help forwarding an e mail with photos and graphics intact in the body of the email

    When I forward an e mail with photos or graphics the forwarded e mail is delivered with text only. How can I correct this?

    Firefox doesn't do email, it's a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, see this forum for support.
    [http://www.mozillamessaging.com/en-US/support/] <br />
    or this one <br />
    [http://forums.mozillazine.org/viewforum.php?f=39]

  • Need help bad!!  issues with usb and updating to 10.4.11

    So a few weeks back I was getting error that was something like IOUFamily.kext was missing and it would not let me attach a usb flash stick. but the usb mouse and keyboard have worked fine. TOday i installed the 10.4.11 update from 10.4.9, now the mac is stuck at the loggin screen and i can't get any mouse or keyboard to work! so i can't even access the mac! Please help!

    First, which machine is it? There are no G5 Intels. There are G3, G4, G5s, and there are IntelMacs.
    Try booting from the install CD/DVD. You may have to unplug everything for a few minutes first.

  • Update delivery with material and quantity.

    hai abap gurus,
          My requirement is to create a sales order and create a delivery with sales order reference.
          I done both.But now i want to  update my delivery with material and quantity.
          Is there is any bapi or function module.
          can any one help for my request.
                                                             with regards,
                                                                  mallik

    Hi,
    You're on good way while using FM SERNR_ADD_TO_LS and SERIAL_LISTE_POST_LS .
    In the second function module you don't need to pass anything.
    Don't forget to make a commit work to avoid database error during synchronisation.
    I had also one case of updating the serial to the document. It was the Sales order. I have worked with the function module SERNR_ADD_TO_AU which is internally using the function module SERNR_ADD_TO_DOCUMENT. The following is the sample code for it:
      CALL FUNCTION 'SERNR_ADD_TO_AU'
        EXPORTING
          sernr                 = w_sernr
          profile               = c_zd01
          material              = w_matnr
          quantity              = '1'
          document              = w_vbeln
          item                  = '00010'
          debitor               = fs_header-sap_ship_to
          vbtyp                 = 'C'
          sd_auart              = w_doc_type
          sd_postyp             = w_item_cat
        IMPORTING
          anzsn                 = w_anzsn
          zeilen_id             = w_zeile
          serial_commit         = w_serial_commit
        EXCEPTIONS
          konfigurations_error  = 1
          serialnumber_errors   = 2
          serialnumber_warnings = 3
          no_profile_operation  = 4
          OTHERS                = 5.
      IF sy-subrc eq 0.
        CALL FUNCTION 'SERIAL_LISTE_POST_AU'.
        COMMIT WORK.
      ENDIF.
    And one more thing, don't forget to have the call to the function module 'SERIAL_LISTE_POST_AU' amd commit work if the return code is 0. This is also mandatory.
    regards
    Satish

  • Enhancing Customer Reports with Commands and Parameters

    Hi All,
    I am implementing the mentioned tutorial. I have succesfully deployed the AccessStatisticApplication PAR on portal. While scheduling the report from Content Management -> Reports -> Running Reports, it is giving error "<b>Can't find bundle for base name com.sap.netweaver.km.stats.reports.DocumentAccessReport, locale en_US</b>". Has anyone faced the problem, can anyone please help to remove this runtime error.
    Related Link: <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7d28a67b-0c01-0010-8d9a-d7e6811377c0">Enhancing Customer Reports with Commands and Parameters</a>
    Regards
    Poonam

    <i>True, the application property service is apparently not to be used for a real-life scenario</i>
    You can definitely use the application property service in production scenarios - it's used by other components in a standard KM install, i.e. out-of-the-box.
    <i>in our case it forced the server down with deadlocks. </i>
    This should definitely not happen! Did you get SAP support to take a look at this? Was it the most popular documents report that caused this, or some other custom code? There should be no such problem with this service, since it's been around for quite some time and in production use.
    <i>
    Even if the code sample is not to be used for real-life scenarios it could at least make use of something else than the application property service which isnt't optimal for this use.
    </i>
    The application property service is good for a lot of scenarios, so it is realistic to use in in real-life scenarios. The only time I have seen this approach (storing the number of hits on documents in the database) fail is in very high-load scenarios.
    <i>Could you provide me with a link to the documentation for the logging framework?</i>
    <a href="http://http://help.sap.com/saphelp_nw70/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm">Logging and Tracing</a> on help.sap.com and <a href="https://help.sap.com/javadocs/NW04S/current/en/index.html">Logging and Tracing API (J2EE Engine API)</a> for NW 7.0.

  • Re: Beginner needs help using a array of class objects, and quick

    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ? In html, I assume. How did you generate the html code of your three classes ? By help of your IDE ? NetBeans ? References ?
    I already posted my question with six source code classes ... in text mode --> Awful : See "Polymorphism did you say ?"
    Is there a way to discard and replace a post (with html source code) in the Sun forum ?
    Thanks for your help.
    Chavada

    chavada wrote:
    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.You think she's still around almost a year later?
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ?Just use [code] and [/code] around it, or use the CODE button
    [code]
    public class Foo() {
      * This is the bar method
      public void bar() {
        // do stuff
    }[/code]

  • I need to sync my mac calendar with ipad and iphone and visa versa.

    I need to sync my mac calendar with ipad and iphone and visa versa. I have read up on it and Mobileme seemed the way to go, but isn't for sale anymore.  Will installing lion allow me to integrate calendars???

    You should post in the SL forum for more help.
    Since you're using SL, you should be able to sync using iSync application or iTunes. I'm not familiar with it, but I know it can be done.
    And yes, if you install Lion and use iCloud, you will be able to sync iCal between all devices. Once set up, whatever change made on one automatically updates the other. Same for AddressBook.

  • With holding tax report with material and qty fields

    Dear All,
    Is there any standard report available with with holding tax data with material and qty fields.
    Thanks,
    Sekhar.

    dear Friend,
    Withholding tax will deduct on services. Hence Material and quantity is not relavent.
    There is no report is available also.
    reg
    Madhu M

  • I need help, i am having a brain fart and i can' think. Dice rolling Game

    here is what i am supposed to do:
    write an app to simulate the rolling to 2 Player (Player and Computer)
    Show each rolling in Map size 50 channel
    Just like this: Player play frist
    1 2 3 4 5 6 7 8 9 10
    11 12 13 14 15 16 17 18 19 20
    21 22 23 24 25 26 27 28 29 30
    31 32 33 34 35 36 37 38 39 40
    41 42 43 44 45 46 47 48 49 50
    [0] ... Press any key to rolling
    You got : 6
    Your position : 6
    1 2 3 4 5 [P] 7 8 9 10
    11 12 13 14 15 16 17 18 19 20
    21 22 23 24 25 26 27 28 29 30
    31 32 33 34 35 36 37 38 39 40
    41 42 43 44 45 46 47 48 49 50
    [0] ... Computer is rolling
    Computer got :2
    Computer position: 2
    1 [C] 3 4 5 6 7 8 9 10
    11 12 13 14 15 16 17 18 19 20
    21 22 23 24 25 26 27 28 29 30
    31 32 33 34 35 36 37 38 39 40
    41 42 43 44 45 46 47 48 49 50
    [0]... Press any key to rolling
    You got: 6
    Your position : 12
    1 [C] 3 4 5 6 7 8 9 10
    11 [P] 13 14 15 16 17 18 19 20
    21 22 23 24 25 26 27 28 29 30
    31 32 33 34 35 36 37 38 39 40
    41 42 43 44 45 46 47 48 49 50
    [0].... Computer is rolling
    Rolling until someone got 50
    Show Game over
    That is about it. I need help, i am having a brain fart and i can' think. it is done in java in console, no graphics or nuthin.
    thanks

    That is about it. I need help, i am having a brain
    fart and i can' think. it is done in java in console,
    no graphics or nuthin.So to fill in your question:
    "Please someone do my homework for me ? "
    Or do you have an actual question ?

  • I want to deployment WSUS for our company. So I need step by step guide line with screenshot and video link

    I want to deployment WSUS for our company. So I need step by step guide line with screenshot and video link.
    Thanks,
    Qamrul

    I was more interested in writing a script in PowerShell to automatically deny Itanium server updates.
    Would you happen to know a good article on this?
    I believe this topic has been discussed in this forum, so I'd start by searching the forum.
    Beyond that, your best friend in PowerShell script efforts is going to be CodePlex. There may be one posted there, already written.
    As a technical reference, you'll need to be familiar with the WSUS API, and the
    Software Development Kit is available on MSDN.
    You can definitely do this with PowerShell. (I actually do it with a feature of SolarWinds Patch Manager which does it via an API call.)
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • I need help restoring the ability to view Youtube and all videos of my 4 year old MacBook after receiviving a meaage the the Adobe ineeds to be updated?  Thanks.ng

    I need help restoring the ability to view Youtube and all videos of my 4 year old MacBook after receiving a message the the Adobe ineeds to be updated?  Thanks.

    Did you upgrade whatever product from Adobe was out of date yet?

  • I need help! I have the iphone 5 and I want to buy the whastsaap, but it turns out I get to put the answers up and answer the questions but I do not remember. Someone could help me? Help! Thank you!

    I need help! I have the iphone 5 and I want to buy the whastsaap, but it turns out I get to put the answers up and answer the questions but I do not remember. Someone could help me? Help! Thank you!

    Security questions:
    https://discussions.apple.com/thread/4533485?tstart=0

  • Hello need help I download a game from 4shared and it an iPhone game . It show up and my iTunes but I can't sync it to my phone I need help

    Hello need help I download a game from 4shared and it an iPhone game . It show up and my iTunes but I can't sync it to my phone I need help

    Wowowowow I was told I can get any app from the net and it will work thank

  • User Exit to check whether chapter id for Material and Plant combination is maintained while creating sales order

    Hello all,
    my requirement is, system should give error message while creating sales order, if chapter ID is not maintained for a material and plant combination.
    please suggest the user exit.

    Hi
    CASE 1 : All Plants are excisable.
    In Material master , Foreign Trade data tab-  mentioned Control code field mandatory. ( i.e nothing but Chapter ID)
    CASE 2 : Few Plants are excisable
    In the Case 2 you need to go for Enhancement
    Program Name : MV45AFZB 
    User Exit:            USEREXIT_CHECK_VBAP ( Item Level Check )
    By using above user exit you write a logic with the help of ABAPer
    Plant and Chapter ID combination table : J_1IMTCHID

Maybe you are looking for