Transaction type for the legacy data for Auc

Dear Experts,
When i use the AS91 to load the legacy for Auc, the system issues the error ' Trans. type 900 can only be used for legacy assets from prev. years'
The asset value data is '2011/04/05', the transaction type is 900. The asset transfer data is '2011/04/25'
Should I have to use the transaction for the Auc's legacy data input? Can i choose other transaction tpye like 100?
Br
Sophie

Hi
100 is used for uploading Non AUC assets
900 is used for AUC.. AS per SAP recommendation, 01/01/20xx to be used when uploading AUC... I misplaced that SAP note which says so
Normally changing the asset val date impacts the dep calculation.. Since, AUC has 0000 dep key, it does not impact Dep calculation
br, Ajay M

Similar Messages

  • XD02 transaction to change the customer data for updating KNA1 table?

    Hi all,
    How can we use XD02 transaction to change the customer data for updating KNA1 table?
    Give the steps.
    Thanks in advance
    rk

    Hi KR,
    Why don't u use BDC to run XD02.
    With Regards,
    Zafar Ali

  • LIS - To get the data for the missing data for the infostructure S906

    Hi
    We have performed  an unicode conversion In our SAP ECC 6.0 system,  after the conversion, the infostructure S906 (copy of S006) was not updated for the period 22nd June to 25th June 09.
    Then we regenerated the infostructure S906 using the tcode MCS/ on 26th June and after which the update rules are working correctly in S906.
    Now when we run the SOP report for this week, the data is missing for the period 22nd June to 25th June 09.
    We have gone thru the note 64636 - to setup the infostructure from the begining, which needs more downtime.
    Is there a possibility to get the missing data for the above period only, instead of setting up the infostructure from the beginning.
    Thanks & Regards
    Senthil

    You did not tell us what kind of update are you using. Some transactions (e.g. OLI1) allow to run it by posting date; others (e.g. OLI9) for a range of the documents. You can find what document numbers were created in the period of question and then run it for them. Although I would recommend the full rebuild.

  • The meta data for the IDoc type "MATMAS05" is unavailable

    Dear Gurus:
    I need  help in completing small test that I am doing to send MATMAS IDOC to xMII.
    I have done:
    1.     RFC connection SM69 and tested ok
    2.             xMII IDOC Listner config with my SAP client
    3.     Connection appears in –smgw ok (in logon client screen)
    4.     Completed Distribution channel and we20,we21
    All above looks in place when I send one IDOC (BD10) it remains in 03 even after I run RBDMOIND. Besides IDOC is not appearing in C:\Lighthammer\JCO\Output.
    On tRFC I see error “The meta data for the IDoc type "MATMAS05" is unavailable.”
    Note that
    a) I am NOT using transaction on routing tab
    b) xMII version 11.5
    c) I used "How to send IDOC ...." Version 2 PDF that is available on web (thanks to Bimal)
    d) I looked at other two posts which has to do with LOIPRO message type and with JCO issue
    Please help.
    Thanks
    Jay

    Jay,
    What version of ERP are you using, perhaps this note will help: 770239
    Also the SAP Help has some suggestions as well...<a href="http://help.sap.com/saphelp_nw04/helpdata/en/8a/b8b13bb3ace769e10000000a11402f/content.htm">Click Here</a>
    -Sam
    null

  • Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).

    Hi,
    I have a file where fields are wrapped with ".
    =========== file sample
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    "asdsa","asdsadasdas","1123"
    ==========
    I am having a .net method to remove the wrap characters and write out a file without wrap characters.
    ======================
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    asdsa,asdsadasdas,1123
    ======================
    the .net code is here.
    ========================================
    public static string RemoveCharacter(string sFileName, char cRemoveChar)
                object objLock = new object();
                //VirtualStream objInputStream = null;
                //VirtualStream objOutStream = null;
                FileStream objInputFile = null, objOutFile = null;
                lock(objLock)
                    try
                        objInputFile = new FileStream(sFileName, FileMode.Open);
                        //objInputStream = new VirtualStream(objInputFile);
                        objOutFile = new FileStream(sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString(), FileMode.Create);
                        //objOutStream = new VirtualStream(objOutFile);
                        int nByteRead;
                        while ((nByteRead = objInputFile.ReadByte()) != -1)
                            if (nByteRead != (int)cRemoveChar)
                                objOutFile.WriteByte((byte)nByteRead);
                    finally
                        objInputFile.Close();
                        objOutFile.Close();
                    return sFileName.Substring(0, sFileName.LastIndexOf('\\')) + "\\" + Guid.NewGuid().ToString();
    ==================================
    however when I run the bulk load utility I get the error 
    =======================================
    Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 3 (NumberOfMultipleMatches).
    ==========================================
    the bulk insert statement is as follows
    =========================================
     BULK INSERT Temp  
     FROM '<file name>' WITH  
      FIELDTERMINATOR = ','  
      , KEEPNULLS  
    ==========================================
    Does anybody know what is happening and what needs to be done ?
    PLEASE HELP
    Thanks in advance 
    Vikram

    To load that file with BULK INSERT, use this format file:
    9.0
    4
    1 SQLCHAR 0 0 "\""      0 ""    ""
    2 SQLCHAR 0 0 "\",\""   1 col1  Latin1_General_CI_AS
    3 SQLCHAR 0 0 "\",\""   2 col2  Latin1_General_CI_AS
    4 SQLCHAR 0 0 "\"\r\n"  3 col3  Latin1_General_CI_AS
    Note that the format file defines four fields while the fileonly seems to have three. The format file defines an empty field before the first quote.
    Or, since you already have a .NET program, use a stored procedure with table-valued parameter instead. I have an example of how to do this here:
    http://www.sommarskog.se/arrays-in-sql-2008.html
    Erland Sommarskog, SQL Server MVP, [email protected]

  • The meta data for the IDoc type "LOIPRO01" is unavailable

    Hello,
    i'm trying to send idocs via rfc from SAP ERP ECC 6.0 to SAP MII 12.06, but we always get errors like:
    The meta data for the IDOC type LOIPRO01 is unavailable
    I've checked the parameters on MII side of the IDOC Listener:
    Servername  MII_JCI33 
    server Properties 
    gwhost H33-I0.rz.k-plus-s.net 
    gwserv sapgw02 
    progid MII_JCI33 
    trace 1 
    params   
    snc_myname   
    snc_qop   
    snc_lib   
    unicode 1 
    max_startup_delay   
    Client Properties 
    client 303 
    user RFC-I33 
    alias_user   
    passwd   
    lang en 
    sysnr 02 
    ashost h33-i0.rz.k-plus-s.net 
    mshost H33-I0.rz.k-plus-s.net 
    gwhost H33-I0.rz.k-plus-s.net 
    gwserv sapgw02 
    r3name H33 
    group   
    tpname MII_JCI33 
    tphost H33-I0.rz.k-plus-s.net 
    type 3 
    trace 1 
    codepage 1 
    There is no saprouter between ERP and MII as in the thread from Christoph Mertins in November 2008. The user rfc-i33 on the ERP has SAP_ALL permissions.
    Has anyone an idea ?
    Kind Regards,
    Thomas Strecker

    Thomas,
    There is a link for a basic IDoc installation that may help.
    [IDocListener|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/bpx-community/manufacturing/how%20to%20send%20an%20idoc%20from%20sap%20ecc%20to%20the%20sap%20mii%20idoc%20listener.pdf]
    One other issue that has occurred to cause problems is registering the program in Visual Administrator.  If you registered the ProgID in Visual Administrator, there will now be two ProgIDs registered (MII does self registration with the RFC Destination upon starting the server).  Delete the registration in VA, if you did it.
    If there are other error messages available, please post them.
    Good luck,
    Mike
    I also just remembered, if you have two ProgIDs that are the same, running on two separate MII instances, you may run into a problem.  Not sure it will have the same symptoms or error messages, but something else to check with (especially when migrating from dev to prod).
    Edited by: Michael Appleby on Feb 10, 2009 5:02 PM

  • Urgent-change the end date for a existing wage type.

    Hi,
    Can u pls let us know how to change the end date for a existing wage type.
    The current end date is 30.8.2008  and we would like to change to 31.12.9999.
    Rgds,

    Use This report RPCLGV00
    The Wage Type Distribution report enables you to display wage types for several payroll periods. It does not take into consideration differences resulting from retroactive payroll. The report shows the current values (number and amount) for each wage type. The report evaluates the payroll records that are marked with update indicator ‘A’ when the report is run. Subsequent reporting runs may not give the same result if - in the intervening period - retroactive payroll has taken place for the evaluation period. The wage type distribution uses the data from the results table RT for the relevant payroll result. The employee’s organizational assignment is also evaluated from the payroll result. This data is taken from the Work Center Basic Pay table (WPBP).
    The wage type distribution offers you the following options for evaluation:
    Individual reporting for a specific personnel number or name.
    Totals evaluation without specifying a personnel number or name.
    You cannot use wage type distribution to run a report for several countries. You can only select payroll areas from one country for reporting.
    Scope of Function
    You use the following parameters to determine how the appearance of the wage type statement:
    Wage type for evaluation
    Enter all wage types that are to be evaluated. If you do not make an entry here, the system selects all wage types. Note that you can only select wage types that occur in the RT table.
    Evaluation start date
    Evaluation start date and evaluation end date define the evaluation period. Enter the year and payroll period for the start of the evaluation.
    Evaluation end date
    This parameter delimits the evaluation period. If you do not make an entry here, only the period from the period from the parameter Evaluation start date is evaluated.

  • To change the classification data for a material using BDC

    I have to update clssification data for material in MM02 using BDC so when i record the transaction MM02 using SHDB i am not able to see the value assignment window which i a able to see when i am changing using MM02 transaction directly. So can anyone have an idea regarding this ?
         I have even tried updating classification data using a BAPI BAPI_OBJCL_CHANGE but i am not getting desired results....can anyone suggest me what are the parameters need to be passed to the BAPI. Thanks in advance for your help....

    Hi Nagarjuna,
                       <b>BAPI_OBJCL_CHANGE</b>  :  This BAPI changes an existing classification, or creates the classification if it does not yet exist. The classification is defined by the required entry fields for the object key (ObjectKey), object table (ObjectTable), class name (AllocDetail-Class_Num), and class type (AllocDetail-Class_Type). The default value for the optional date field (KeyDate) is the system date, on which all classifications become valid. The new characteristics and/or values are transferred to different tables according to data type. Numeric, time, and date characteristics are transferred to table AllocValuesNumNew, character and boolean characteristics are transferred to table AllocValuesCharNew, and currency characteristics are transferred to AllocValuesCurrNew.
    The object key (OBJECTKEY) must be transferred in internal format. This means before conversion exits. For example, a material number must be transferred with leading zeros.
    If the BAPI runs without errors, table Return contains no messages of type "E".
    Assignment created:  message CL735
    Assignment changed:  message CL737
    Assignment not changed:  message CL738
    This BAPI only changes the parameters of an existing assignment (or creates a whole new assignment), but it does not delete the assignment to a class and replace it with an assignment to another class. If you want to reassign an object, the old assignments must be read with BAPI_OBJCL_GETCLASSES and deleted with BAPI_OBJCL_DELETE, then the new assignments must be created with BAPI_OBJCL_CREATE.
    The information transferred by this BAPI replaces all old information. An empty field means "delete entry!", not "no change".
    This BAPI does not change the database. To change the database, call BAPI BapiService.TransactionCommit afterwards.
    You can only use this BAPI for objects that are not classes!
    This BAPI only processes assigned values for classification - not for configuration.
    Reward points if helpful.
    Regards,
    Hemant

  • Please send detail steps for uploading legacy data

    Hi friends,
    please send detail steps for uploading legacy data
    Thanking u in advance,
    Diwa.

    HI U CAN USE LSMW TO UPLOAD LEGACY DATA
    LSMW is used for migrating data from a legacy system to SAP system, or from one SAP system to another.
    Apart from standard batch/direct input and recordings, BAPI and IDocs are available as additional import methods for processing the legacy data.
    The LSMW comprises the following main steps:
    Read data (legacy data in spreadsheet tables and/or sequential files).
    Convert data (from the source into the target format).
    Import data (to the database used by the R/3 application.
    But, before these steps, you need to perform following steps :
    Define source structure : structure of data in the source file.
    Define target structure : structure of SAP that receives data.
    Field mapping: Mapping between the source and target structure with conversions, if any.
    Specify file: location of the source file
    Of all the methods used for data migration like BDC, LSMW , Call Transaction which one is used most of the time?
    How is the decision made which method should be followed? What is the procedure followed for this analysis?
    All the 3 methods are used to migrate data. Selection of these methods depends on the scenario, amount of data need to transfer. LSMW is a ready  tool provided by SAP and you have to follow some 17 steps to migrate master data. While in BDCs Session method is the better choice because of some advantages over call transaction. But call transaction is also very useful to do immediate updation of small amout of data. (In call transaction developer has to handle errors).
    SO Bottom line is make choice of these methods based of real time requirements.
    These methods are chosen completely based on situation you are in. Direct input method is not available for all scenario, else, they are the simplest ones. In batch input method ,you need to do recording for the transaction concerned. Similarly, IDoc, and BAPI are there, and use of these need to be decided based on the requirement.
    Try to go through the some material on these four methods, and implement them.  You will then have a fair idea about when to use which.
    LSMW Steps For Data Migration
    How to develop a lsmw for data migration for va01 or xk01 transaction?
    You can create lsmw for data migration as follows (using session method):
    Example for xk01 (create vendor)
    Initially there will be 20 steps but after processing 1 step it will reduced to 14 for session method.
    1. TCode : LSMW.
    2. Enter Project name, sub project name and object name.
        Execute.
    3. Maintain object attributes.
        Execute
        select Batch Input recording
        goto->Recording overview
        create
        recording name.
        enter transaction code.
        start recording
        do recording as per ur choice.
        save + back.
        enter recording name in lsmw screen.
        save + back
    Now there will be 14 steps.
    2. MAINTAIN SOURCE STRUCTURES.
        Here you have  to enter the name of internal table.
        display change
        create
        save + back
    3. MAINTAIN SOURCE FIELDS.
        display change
        select structure
        source_fields->copy fields.
        a dialogue window will come .
        select -> from data file
        apply source fields
        enter No. of fields
        length of fields
        attach file
        save + back
    4. MAINTAIN STRUCTURE RELATIONS
        display change
        save + back
    5. MAINTAN FIELD MAPPING & CONVERSION RULE
        display change
        click on source field, select exact field from structue and enter
        repeat these steps for all fields.
        save+back
    6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED
        execute
        save + back
    7. SPECIFY FILES.
        display change
        click on legacy data
        attah flat file
        give description
        select tabulatore
        enter
        save + back
    8. ASSIGN FILE
        execute
        display  change
        save + back
    9. IMPORT DATA.
        execute
        display  change
        save + back
    10. DISPLAY IMPORTED DATA
          enter ok, it willl show records only.
          back
    11. CONVERT DATA
          execute
          display  change
          save + back
    12. DISPLAY CONVERTED DATA
          execute
          display  change
          save + back
    13. CREATE BATCH INPUT SESSION
          tick keep batch input folder
          F8
          back
    14. RUN BATCH INPUT SESSION.
          sm35 will come
          Object name will be shown here
          select object & process

  • Multiple MM schedule lines for the same date

    Hello All Gurus,
    I am facing a problem where the MM schedule lines are divided into various quantites for the same date. For example on 02/11/2010 the total quantity is 120, it is appearing in the below form in ME38:
    02/11/2010 - 40
    02/11/2010 - 40
    02/11/2010 - 40
    Although this is not an error, but my client is not happy with this. Can someone tell me why I am getting this error? Is it because of the rounding value that we maintain in MRP 1 view of material master record? Or is there any other setting that I am missing?
    Please let me  know. I would be very much thankful to you.
    Thanks and Regards,
    Umakanth

    Hi,
    Before changing the setup, note that sometimes it is beneficial to split one demand into multiple delivery schedules. Especially if the demand is bigger than equipment type (container/truck etc.). If you want to manage inbound transportation for such delivery schedules, it is much simpler to do this when each delivery schedule is not bigger than one equipment.
    Regards,
    Dominik Modrzejewski

  • Transaction type 100 cannot be used for activity 'Acquisition from invoice'

    Hi
    My user got the error message : Transaction type 100 cannot be used for activity 'Acquisition from invoice receipt w/ affil. comp.'
    when post the invoice via MIRO t code for 98% of the total amount.
    The posting was is related to affiliated company, & by right it should pick transaction type 153 but it is pointing to 100.
    If user post 100% , no error.
    Please advice.

    Check any of the following notes:-
    =>  Note 972556 - MIRO: Incorrect movement type with affiliated companies
    =>  Note 1060719 - Error AAPO 176 for postings from Logistics without vendor
    thanks
    G. Lakshmipathi

  • What are the T-codes that contain the master data for material and vendor?

    what are the T-codes that contain the master data for material and vendor?

    hi ,
    - Display Material  tcodes...
    MM01 - Create Material
    MM02 - Change Material
    MM03 - Display Material
    MM50 - List Extendable Materials
    MMBE - Stock Overview
    MMI1 - Create Operating Supplies
    MMN1 - Create Non-Stock Material
    MMS1 - Create Service
    MMU1 - Create Non-Valuated Material
    ME51N - Create Purchase Requisition
    ME52N - Change Purchase Requisition
    ME53N - Display Purchase Requisition
    ME5A - Purchase Requisitions: List Display
    ME5J - Purchase Requisitions for Project
    ME5K - Requisitions by Account Assignment
    MELB - Purch. Transactions by Tracking No.
    ME56 - Assign Source to Purch. Requisition
    ME57 - Assign and Process Requisitions
    ME58 - Ordering: Assigned Requisitions
    ME59 - Automatic Generation of POs
    ME54 - Release Purchase Requisition
    ME55 - Collective Release of Purchase Reqs.
    ME5F - Release Reminder: Purch. Requisition
    MB21 - Create Reservation
    MB22 - Change Reservation
    MB23 - Display Reservation
    MB24 - Reservations by Material
    MB25 - Reservations by Account Assignment
    MB1C - Other Goods Receipts
    MB90 - Output Processing for Mat. Documents
    MB21 - Create Reservation
    MB22 - Change Reservation
    MB23 - Display Reservation
    MB24 - Reservations by Material
    MB25 - Reservations by Account Assignment
    MBRL - Return Delivery per Mat. Document
    MB1C - Other Goods Receipts
    MB90 - Output Processing for Mat. Documents
    MB1B - Transfer Posting
    MIBC - ABC Analysis for Cycle Counting
    MI01 - Create Physical Inventory Document
    MI02 - Change Physical Inventory Document
    MI03 - Display Physical Inventory Document
    MI31 - Batch Input: Create Phys. Inv. Doc.
    MI32 - Batch Input: Block Material
    MI33 - Batch Input: Freeze Book Inv.Balance
    MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng
    MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.
    MIQ1 - Batch Input: PhInvDoc. Project Stock
    MI01 - Create Physical Inventory Document
    MI02 - Change Physical Inventory Document
    MI03 - Display Physical Inventory Document
    MI31 - Batch Input: Create Phys. Inv. Doc.
    MI32 - Batch Input: Block Material
    MI33 - Batch Input: Freeze Book Inv.Balance
    MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng
    MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.
    MIQ1 - Batch Input: PhInvDoc. Project Stock
    MI01 - Create Physical Inventory Document
    MI02 - Change Physical Inventory Document
    MI03 - Display Physical Inventory Document
    MI31 - Batch Input: Create Phys. Inv. Doc.
    MI32 - Batch Input: Block Material
    MI33 - Batch Input: Freeze Book Inv.Balance
    MICN - Btch Inpt:Ph.Inv.Docs.for Cycle Ctng
    MIK1 - Batch Input: Ph.Inv.Doc.Vendor Cons.
    MIQ1 - Batch Input: PhInvDoc. Project Stock
    MI21 - Print physical inventory document
    MI04 - Enter Inventory Count with Document
    MI05 - Change Inventory Count
    MI06 - Display Inventory Count
    MI09 - Enter Inventory Count w/o Document
    MI34 - Batch Input: Enter Count
    MI35 - Batch Input: Post Zero Stock Balance
    MI38 - Batch Input: Count and Differences
    MI39 - Batch Input: Document and Count
    MI40 - Batch Input: Doc., Count and Diff.
    MI08 - Create List of Differences with Doc.
    MI10 - Create List of Differences w/o Doc.
    MI20 - Print List of Differences
    MI11 - Physical Inventory Document Recount
    MI07 - Process List of Differences
    MI37 - Batch Input: Post Differences
    for vendor..
    XKN1  Display Number Ranges (Vendor)
    XK01  Create vendor (centrally)
    XK02  Change vendor (centrally)
    XK03  Display vendor (centrally)
    XK04  Vendor Changes (Centrally)
    XK05  Block Vendor (Centrally)
    XK06 Mark vendor for deletion (centrally
    XK07  Change vendor account group
    XK11  Create Condition
    XK12  Change Condition
    XK13  Display Condition
    XK14  Create with cond. ref. (cond. list)
    XK15  Create Conditions (background job)
    reward points if useful,
    venkat.

  • Min,Max for a time Range and Sum of Records for the last date/time

    Hi All,
    I have a table with the following structure/data:
    create table  Events   (
                                        [EventID]       
    int                   NOT NULL,
                                        [Title]            
    nvarchar(200)  NOT NULL,
                                        [SourceName]  nvarchar(20)    NOT NULL,
                                        [Type]             
    int                  NOT NULL,
                                        [eDate]           
    datetime
    insert into Events values(100, 'Event 1', 'S01', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S07', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S08', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S09', 3,'2014-01-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S010', 3,'2014-01-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S03', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S04', 3,'2014-01-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S05', 3,'2014-01-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S06', 3,'2014-01-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S01', 3,'2014-02-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S02', 3,'2014-02-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S03', 3,'2014-02-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S04', 3,'2014-02-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S05', 3,'2014-02-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S06', 3,'2014-02-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S01', 3,'2014-03-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S02', 3,'2014-03-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S03', 3,'2014-03-01 00:00:00.000')
    insert into Events values(100, 'Event 1', 'S04', 3,'2014-03-01 00:00:00.000')
    insert into Events values(101, 'Event 2', 'S05', 3,'2014-03-01 00:00:00.000')
    insert into Events values(102, 'Event 3', 'S06', 3,'2014-03-01 00:00:00.000')
    And I wrote the following query:
     select EventID as [Event ID],
           Title, 
           count(distinct(SourceName)) as [Instances], 
           Type,
           min(eDate) as  [First Detected],
           max(eDate) as [Last Detected],
           datediff(d,min(eDate),max(eDate)) as [Delta (days)]
    from  Events
    where type = 3
    group by EventID, Title, Type
    having max(eDate) <> min(eDate)
       and max(eDate) =(select top 1 eDate from Events order by eDate desc)
    and I get the following results (see the instance number)
    Event ID Title         Instances Type First Detected                      Last Detected                    
       Delta (days)
    =============================================================================================================================
    100         Event 1         5         3    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000    
    59
    101         Event 2        
    3         3    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000     59
    102         Event 3        
    2         3    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000     59
    This is normal for this query however what I need to do is a little different.
    In other words, while I need to show when we recorded a specific event first and last time,
    I need to display the results for the last date/time when it was recorded. 
    For example what I need to provide should look like this:
    Event ID  Title                Instances        Type       First Detected                    
    Last Detected                          Delta (days)
    =============================================================================================================================
    100         Event 1            2                   3           
    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000      59
    101         Event 2            2                   3           
    2014-01-01 00:00:00.000     2014-03-01 00:00:00.000      59
    102         Event 3           
    2                   3            2014-01-01 00:00:00.000     2014-03-01 00:00:00.000     
    59
    Could you please help me to fix this query?
    TIA,
    John

    ;With cte As
    (Select EventID as [Event ID],
    Title,
    SourceName,
    Type,
    min(eDate) Over(Partition By EventID, Title, Type) as [First Detected],
    max(eDate) Over(Partition By EventID, Title, Type) as [Last Detected],
    eDate,
    datediff(d,min(eDate) Over(Partition By EventID, Title, Type),max(eDate) Over(Partition By EventID, Title, Type)) as [Delta (days)],
    max(eDate) Over() As MaxEDate
    from Events
    where type = 3)
    Select [Event ID],
    Title,
    COUNT(Distinct SourceName) As Instances,
    Type,
    [First Detected],
    [Last Detected],
    [Delta (days)]
    From cte
    Where eDate = MaxEDate And [First Detected] <> [Last Detected]
    Group By [Event ID],
    Title,
    Type,
    [First Detected],
    [Last Detected],
    [Delta (days)];
    Tom
    P.S. Thanks for providing the DDL and data.  That is always very helpful.

  • Table that contains the change date for every cost element

    Hi everyone!
    Can anyone please help me find a table which contains the change date for every cost element?
    Thanks,Jess

    If you basically want to find out if anyone changed the cost element, you need to use transaction KA05 and enter the cost element and controlling area.
    This would actually bring you whatever field was changed and on double clicking give you the actual change and the date on which the change was made.
    Problem is this change date is actually the creation date of a change document which is in the table CDHDR.Its not like the change date is on any master tables.
    Hope this helps
    Deepa

  • JCo connection for the application data

    Dear All,
    Now, we configure BP for MSS. When we set JCo connection for the application data, from this link  http://help.sap.com/saphelp_erp2005/helpdata/en/29/d7844205625551e10000000a1550b0/frameset.htm we selected the method "Ticket".
    When we run the page in "Team" area, we found some errors as follow:
    - You do not have the authorization to start service sap.com/pcui_gp~isr/IsrStatusoverview
    - You do not have the authorization to start service sap.com/mssreccand/CandidateStatusOverview
    - Pages about "Employee Information" display Blank iViews.
    But if we set JCo connection for application data by using "User/Password" method (UserID have "SAP_ALL" profile in back-end system), the application work fine.
    Kindy advise us which method should be used to set JCo connection (Ticket or User/Password).
    If the method should be "User/Password", please advise authorization and user type for UserID that be used to map JCo connection.
    Thank you very much,
    Anek.

    Hi,
    Go through the contents in,
    http://help.sap.com/saphelp_ep60sp2/helpdata/en/8f/67d27676ace84080964d4c4223bb3c/content.htm
    Hope this helps !
    Regards
    Srinivasan T

Maybe you are looking for