Data Migration: Sequence Check

i have a database (target) that i am transfering data to from another database (source)
I need to write a script to check if the sequence on the target will be ok...in a sense, I need to check the max value of the target dababase sequence and see if it is ok to add the new data.
i cant transfer data over if the sequence numbers overlap...like if i have a sequence # of 200 on the source and target...we run into problems. is this logic correct?
how do i write this sql check?
any help would be wonderful. im a novice.
thanks.

It may be easier to ensure up front that the sequences won't overlap. i.e.
CREATE SEQUENCE system1_seq
  START WITH 1
  INCREMENT BY 2
  CACHE 100
CREATE SEQUENCE system2_seq
  START WITH 2
  INCREMENT BY 2
  CACHE 100This way, one system will generate odd numbers, the other will generate even numbers, and you won't have to worry about overlaps.
Alternately, you can add a source id to the primary key on the target system or you can renumber the rows (obviously fixing the relationships) when the data is migrated.
Justin
Justin

Similar Messages

  • FI Master data upload sequence

    Experts,
    Please excuse me if my post sounds vague. I am a Technical Consultant working off-site independently. I couldn't think of a better forum to get functional advice.
    Please look at the below list of FI Master data upload objects, and suggest:
    a. the recommended sequence in which the objects are to be uploaded
    b. points to consider/tips for uploading/recommendations (LSMW/BUS*/BAPIs, etc)
    FI Objects:
    1. Cost Centers
    2. Profit Centers
    3. GL Accounts- COA,CC
    4. Fixed Assets
    5. Bank Data
    6. Cost Elements
    7. Activity Groups
    8. Activity Types
    9. Activity Prices
    Thanks in advance.
    NW

    Hi,
    we have to upload first the Master such as G/l Accounts , Primary Cost Elements & Secondary cost elements.then upload the open items , then p/l balances, then B/S balances , finally asset master with balances
    Pre-Check LSMW: To-Do-List Before Using the Tool
    The LSM Workbench is a tool that supports the transfer of data from non-SAP systems to R/3. Basic functionality of the LSM Workbench:
    1. Import old data from spreadsheet tables or sequential files.
    2. Convert the data from source format into target format.
    3. Import the data into R/3.
    Before using the LSM Workbench, you need a concept for data migration. In particular, note the following items:
    · Make sure that R/3 customizing is complete.
    · Analyze the data existing in the legacy system to determine which data will be needed in the future (also from a business-operational point of view).
    · Consider whether usage of the tool makes sense with regard to the data volumes to be transferred. In case of very small data quantities, it may be easier to carry out the transfer manually. With very large data volumes, however, batch input technology may lead to excessively long runtimes. Rough estimate for the required time: 10000 records per hour; this value, however, may vary strongly depending on the hardware.
    · Identify the transaction(s) in R/3 you want to use for bringing the data into the SAP System. Here, it may also be relevant whether the data is required for statistical (evaluation) purposes or for further processing in the system.
    · Test the relevant transaction in R/3 manually with test data from the old system and make sure that all required fields are filled. There may be required fields that do not correspond to any data window in the legacy system. In such a case, assigning a fixed value or defining the field as optional for data transfer may be appropriate.
    · Check the interfaces provided by the application. Is there a batch input program and an IDoc (for example)? Which method should be used in your project?
    · Develop a mapping plan in written form: Assign the legacy system fields to the R/3 fields.
    · Determine the form (e.g. via u201EMOVEu201C or assigned according to a rule) in which the legacy system data shall be transferred to the SAP System.
    · If applicable, define the allocation rules (LSM-internal name: u201Etranslation rulesu201C).
    · Define the way for extracting the data from the legacy system. (Note: LSMW does not extract data.)
    · Describe the form in which the old data are available: Will the host or the spreadsheet interface of the LSMW have to be used?
    · If only a part of your legacy system will be replaced by R/3, define the functionalities to be provided by the SAP System and those to be provided by the legacy system. If required, create a concept of the data flows and interface architecture.
    These questions can only be answered individually for every customer; as a matter of course, this should be done before the tool is used!
    SKS

  • Data Migration Template for Singapore Payroll.

    Hi
    I need a help on data migration template for Singapore Payroll.
    Would also need guidance on what i srequired in case i want to migrate the last year payroll cluster data from legacy system to ECC 6.0.
    Will appreciate if you can send me the migration template at my mail id.
    Thanks and regards

    Hai..
    Check some of the fields mentioned below.. it may be of some use to u..
    Client
    Personnel Number
    Sequential number for payroll period
    Payroll type
    Payroll Identifier
    Pay date for payroll result
    Period Parameters
    Payroll Year
    Payroll Period
    Start date of payroll period (FOR period)
    End of payroll period (for-period)
    Reason for Off-Cycle Payroll
    Sequence Number
    Client
    Personnel Number
    Sequence Number
    Country grouping
    Wage type
    Key date
    Rate
    Number
    Amount

  • Material Needed on Data Migration

    Hi All,
                   I am working on project as fresher.
                   The major work is on Data Migration.                 
                   Can I have get any material like Basic documents,
                   Sample programs/Codes Concept explanation
                   etc regarding Data Migration (BDC’s and LSMW)?
                   If so can you send me that personal mail id so that
                   it might be useful for me?
                   My personal mail id's are
                   1) [email protected]
                   2) [email protected]
                    Thanks in Advance.
                    Points would be rewarded.
       With Regards
    Jitendra Gujarathi

    Hi
    BDC:
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    Features :
    BDC is an automatic procedure.
    This method is used to transfer large amount of data that is available in electronic medium.
    BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
    BDC uses normal transaction codes to transfer data.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    This method is also called as ‘CLASSICAL METHOD’.
    Features:
    Asynchronous processing.
    Synchronous Processing in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    This is another method to transfer data from the legacy system.
    Features:
    Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    Transfer data for a single transaction.
    Transfers data for a sequence of dialog screens.
    No batch input processing log is generated.
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    LSMW
    1. Maintain Attributes:
    Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.
    2. Maintain Source structure:
    Create a structure name
    3. Maintain Source field:
    In this you have to create a structure same as that of the input file
    eg: name
    age
    4. Maintain structure relations:
    This will link the structure to the input file.
    5. Maintain field mapping and conversion rules:
    Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.
    6. Maintain field mapping and conversion rules:
    If you have any fixed values you can define here.
    7. Specify files:
    Specify the input file path and type.
    8. Assign files:
    This will assign ur file to the Input file
    9. Read Data:
    This will read ur data from teh file.
    10. Dispaly Read Data:
    You can see the uploaded data
    11. Convert Data
    This will convert the data to the corresponding format for processing
    12. Display Converted data:
    13. Create batch input session
    Here this will create a batch input session for processing
    14. Run Batch Input session:
    By clicking on the session and process the same you can do teh needfu.
    http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
    http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt
    http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip
    http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
    http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf
    for Long texts Upload
    Please take a look at this..
    http://help.sap.com/saphelp_erp2005/helpdata/en/e1/c6d30210e6cf4eac7b054a73f8fb1d/frameset.htm
    <b>
    Reward points for useful Answers</b>
    Regards
    Anji

  • Questions on data migration....

    Hi all,
    I'm currently facing the problem that my colleagues from the data migration team are about to migrate legacy data to the new system using BDC/LSMW.
    1.) Is it true that the system bypasses any checks concerning number ranges (even if the range doesn't exist at all)? Example: They're about to migrate master inspection characteristics. Let's assume that the old MIC had the number 1234 and the new MIC is supposed to have the number 0001_1234. Do I need to create and assign the external number range?
    2.) If I don't need the number range described under 1.) and I do the migration accordingly (again NO number range created and/or assigned). What would happen if I access this MIC in the future and try to use it in an inspection plan. Would the system reject the usage because there's no number range or would it work normally?
    Any help on this issue is greatly appreciated. Please let me know as well, if I need to post it in a different forum.
    Regards,
    Bobby

    Hi Boban,
    Defining of number ranges before you transfer the masters is must. For numeric titles use SAP std number range for Alphabetic one use external range.
    BR
    Shekhar

  • Data Migration from Legacy System in IS-U

    Hi All,
    We are going to Implement a new IS-U project,  I have a problem with LSMW(Legacy System Migration Workbench ),  I have some Conversion Objects of IS-U and I need to know whether Data Migration is possible or not, please tell me how to find these Objects and how to know Data Migration is possible or not.
    Objects are like.,
    1. Accounts
    2. Actuate Reports
    3. Business Partner Relationships
    4. Active Campaigns/Campaign Content/Dispositions
    5. Connection Object
    6. Contacts
    7. Contracts
    8. Opportunities
    9. Payment Arrangement History
    10. Payments
    11. Premises
    12. Rate Changes
    13. Security Deposits
    these are few and there are some more..,
    Thanks in Advance,
    Sai.

    Hi Ram,
    Use Transaction Code EMIGALL. It will ask for company code. By default Company Code is SAP. If you entered with the SAP you will get all the objects.Then goto menu IS-U Migration-->User Handbook. It will give you details Idea.
    Also Check the following Procedure
    You can find detailed documentation of EMIGALL in SAP itself. Use Transaction EQ81 to display it. It provides all the concepts and procedures to work with EMIGALL.
    Here are some points about EMIGALL :
    1. It Migrates data Business Object wise
    2. It uses Direct Input Technique
    3. It has more than 100 objects of IS-U
    and the steps for implementation goes like this:
    1)You have to create a user specially for migration which will have all the authorizations related to migration workbench, BASIS and IS-U
    2)You have to create your own company in EMIGALL. There is a default company called SAP.
    3)Company SAP contains all the Business Objects
    4)You have to figure out what business objects u need and then u have to copy those business objects to ur company from Standard Company SAP
    5)Each objects contains more than one structure and each structure can contain more than one fields. The relation goes like this
    Object ---> Structure ---> Field
    6)You have to define field rules for each required field of the object. You have to mark "Not required" for fields u don't need
    7)After field rules for a given object is set u have to generate load report i.e. actual Direct Input Program which will migrate data. This program is generated on basis of field rules set by u.
    8)After the load report is generated u have to prepare an input file (import File) for migration. The import file should be according to structure provided by SAP and must be in binary format. SAP Provides the structure of file according to your configurations. You have to write ur own Data conversion program(in any language) for this task.
    9)You take import file as input and migrate the data using generated load program
    10)Finally u can check the Migration Statistics and Error Log
    Thanks and Regards,
    Jyotishankar Dutta
    Message was edited by:
            Jyotishankar Dutta
    Message was edited by:
            Jyotishankar Dutta

  • Data Migration from CSV file to Database Table.

    Hi,
    I have checked few answered threads on Data Migration Issues but didn't find the solution yet.
    I am reading data from an CSV file to internal table but the complete row is coming under one field of the internal table.
    How i can get values in different fields of the internal table from the CSV file ?
    Thanks & Regards.
    Raman Khurana.

    Hi,
    If you are using GUI_UPLOAD, you might have missed to make has_field_separator  as 'X'.
      EXPORTING
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
       filename                      = 'C:\File.csv'
       filetype                      = 'ASC'
       has_field_separator           = ' X'  "<= Set this as 'X'.
      TABLES
        data_tab                      = itab.
    Regards,
    Manoj Kumar P

  • Data Migration From Peoplesoft , JDEdwards To SAP.

    Hi,
    This is kiran here we are doing data Migration work from Peoplesoft And JDEdwards to SAP.in SAP side it involves Master data tables Related to Customer, Vendor, Material. and Meta data tables related to SD, MM, FI. We as SAP Consultant identified Fields from above tables and marked them as Required, Not required, And Mandatory. The Peoplesoft and JDEdwards flocks come up with the same from their side. Then we want map the Fields. as I am new to data Migration any body suggest me what are the steps involves in data Migration How to do Data Mapping in Migration Thanks in advance.
    Thanks
    Kiran.B

    Hi Kiran,
    Good... Check out the following documentation and links
    Migrating from one ERP solution to another is a very complex undertaking. I don't think I would start with comparing data structures. It would be better to understand the business flows you have currently with any unique customizations and determine how these could be implemented in your target ERP. Once this is in place, you can determine the necessary data unload/reload to seed your target system.
    A real configuration of an ERP system will only happen when there is real data in the system. The mapping of legacy system data to a new ERP is a long difficult process, and choices must be made as to what data gets moved and what gets left behind. The only way to verify what you need to actually run in the new ERP environment is to migrate the data over to the ERP development and test environments and test it. The only way to get a smooth transition to a new ERP is to develop processes as automatic as possible to migrate the data from the old system to the new.
    Data loading is not a project that can be done after everything else is ready. Just defining the data in the legacy system is a huge horrible task. Actually mapping it to one of the ERP system schemas is a lesson in pain that must be experienced to be believed.
    The scope of a data migration project is usually a fairly large development process with a lot of proprietary code written to extract legacy data, transform and load the data into the ERP system. This process is usually called ETL (extract, transform, load.)
    How is data put into the ERP?
    There is usually a painfully slow data import facility with most ERP systems. Mashing data into the usually undocumented table schema is also an option, but must be carefully researched. Getting the data out of the legacy systems is usually left to the company buying the ERP. These export - import processes can be complex and slow, sometimes specialized ETL tools can help, sometimes it is easier to use what ever your programmers are familiar with, tools such as C, shell or perl.
    An interesting thing to note is that many bugs and quirks of the old systems will be found when the data is mapped and examined. I am always amazed at what data I find in a legacy system, usually the data has no relational integrity , note that it does not have much more integrity once it is placed in an ERP system so accurate and clean data going in helps to create a system that can work.
    The Business Analysts (BAs) that are good understand the importance of data migration and have an organized plan to migrate the data, allocate resources, give detailed data maps to the migrators (or help create the maps) and give space estimates to the DBAs. Bad BAs can totally fubar the ERP implementation. If the BAs and management cannot fathom that old data must be mapped to the new system, RUN AWAY. The project will fail.
    Check these links
    http://pdf.me.uk/informatica/AAHN/INFDI11.pdf
    http://researchcenter.line56.com/search/keyword/line56/Edwards%20Sap%20Migration%20Solutions/Edwards%20Sap%20Migration%20Solutions
    http://resources.crmbuyer.com/search/keyword/crmbuyer/Scm%20Data%20Migration%20On%20Peoplesoft%20Peoplesoft%20Data%20Migration/Scm%20Data%20Migration%20On%20Peoplesoft%20Peoplesoft%20Data%20Migration
    Good Luck and Thanks
    AK

  • SAP Legacy data Migration Starategy/Process

    Hi Friends
    I would request you, if anybody let me knwo the process of legacy data migration into sap. What are steps I have to follow while doing legacy data migration. My questions are:
    1) How to upload GL balances from legacy to SAP
    2) How to upload Vendor and Customer open items into sap
    3) Asset balances How to upload
    4) what is the use of Migration clearing accounts.
    Kindly provide if any documents for legacy data migration into sap.
    Thanks in advance
    Rao

    Dear Rao,
    Just check the bwlow link you can understand easly to upload the balances.
    http://www.saptechies.com/sap-pdf-books-download/SAP_Go_live_strategy11248141773.pdf
    Check the bwlow procedure for the same way do it.
    First create 5 Dummy GL codes. These GL code should be zero at the end of uploading balances.
    1     GL Offset Account               Dr
              Asset Offset Account          Cr
              AP Offset Account          Cr
              Sales          Cr
              Other GL's          Cr
    2     Cash               Dr
         Consumption               Dr
         Asset Offset Account               Dr
         AR Offset Account               Dr
         Material Offset Account               Dr
         Other GL's               Dr
              GL Offset Account     x     Cr
    3     AP Offset Account               Dr
              Vendor 1          Cr
              Vendor 2          Cr
              Vendor 3          Cr
    4     Customer 1               Dr
         Customer 2               Dr
         Customer 3               Dr
              AR Offset Account          Cr
    5     Fixed Asset 1               Dr
         Fixed Asset 2               Dr
              Asset Offset Account          Cr
              Acc. Depreciation Account          Cr
    6     Stock Inventory Account               Dr
              Material Offset Account          Cr
    Regards,

  • SAP Data Migration Framework

    Dear All, I read from TechEd that SAP data migration framework involves using Business Objects data services. SAP has provided pre-built Jobs with iDOC as target.
    All is fine but I came to know that we can use Data services as staging area and modify etc our data in Data services beforw loading into SAP ECC system.
    I would like to kow more about using Data services as staging area. Does that mean that when we run jobs then data is stored in iDOC(XML file) on DS or it means we can run DS in demo mode where we don't load data but keep it within memory of DS. This is different from profiling and storing execution/DQ statistics. This is storing real time data in DS and then modify/analyze and then load in SAP ECC.
    Can someone explain if we can run DS in demo mode without loading data?
    Thanks,

    Hi - you can get more information on using Data Services for data migraiton at http://service.sap.com/bp-datamigration.  Also, check out the blogs:
    /people/ginger.gatling/blog/2010/08/27/data-migration-installing-data-services-and-best-practice-content
    /people/ginger.gatling/blog/2011/03/31/data-migration-in-5-minutes

  • Credit card Open sales order data migration

    Hi All,
    My query for today is to know your experiences as to how to handle legacy data migration to SAP for Open transactions having credit card information. I mean in legacy we have Open orders with credit card information and some of them are approved, or rejected or in a yet to receive a response stage. What is the best practice to migrate these open orders. Should we reauthorize these orders? Similarly, if you can tell me about Open Invoices and Open A/ru2019s.
    Thanks
    AriBis

    hello, friend.
    a standard transaction is VA05 or VA05n to check on open orders. 
    if you need to check the database tables, you can check sales order status/header thru table VBUK.  for item level, use VBUP.  you will find fields such as reference status, delivery status, etc.
    regards.
    jy

  • Data Migration Opening Balances are not updating in the Report F.08

    Hi,
    We have uploaded the GL balances in 2008 for the year 2007. But they are not updating in the F.08 report when i executed for 2008.
    Why they are not updating in the report. In which table can i check the Data migration values in the system?
    Thansk
    Kishore

    Hi We have uploaded all the values in 2008 with 2008 date. fiscal year is K4.
    F.08 Report for the year 2008 is showing only 2008 accumulated values. But not showing the Opening balances which we have uploaded in 2008 for the before years like 2007.
    Why it is showing like that?
    Thansk
    kishore

  • DMS Data Migration-Help required

    Hi,
    I don't have enough knowledge on DMS Data migration.
    In our recent Implementation, we are implementing SAP DMS.
    Our client has more legacy data which is in their server. So we have to upload all the data's into SAP DMS.
    I gone through few SCN threads and understand that LSMW & BDC will be used for Data migration.
    Which is the best method for Data migration?
    We are having 50+ document types and it has different processes (status network), Classification & few Object links.
    Please advice me and provide me some examples to upload legacy data in DMS.
    Thanks in Advance,
    Ravi

    Hi Ravi,
    There are few approach discussed in the thread https://scn.sap.com/thread/2119796
    You may check feasibility on these approaches for your scenario.
    We are having 50+ document types and it has different processes (status network), Classification & few Object links.
    Creating these configurations into SAP is one time and should not be a problem.
    I gone through few SCN threads and understand that LSMW & BDC will be used for Data migration.
    Which is the best method for Data migration?
    How much volume of data do you have in legacy system ?
    Have a thought on whether do you really need to migrate all these data into SAP DMS   ???
    OR
    You can configure the DMS system and start fresh leaving the document in legacy system as it is.
    Hope this helps.
    Regards,
    Deepak Kori

  • Data Migration - Data Models Dependency

    Hi,
    In major ERP data migration and transformation project from legacy to SAP or from SAP to SAP, one should finalize the sequence in which data should be migrated. e.g. Vendor data cannot be migrated before customer data, or tax data should be uploaded first then customer data .. etc. Is there available any best practice or reference for such dependencies ? Primary models and secondary models which depend on primary models ?
    Please share such content if you have, I'm sure it will be helpful to many.

    The best way is to use iTunes. Back up your old iPad. Unplug it, plug your new one in and go through the set up process. When you get the question 'set up as new or restore from backup' choose to restore from the backup you just made. Your app data and information will be put onto your new iPad.
    You may need to redownload apps, but since the app data is already there, you should not lose progress on games or the such.
    http://support.apple.com/en-us/HT2109
    has directions. You can also use iCloud backup, but I personally prefer iTunes since it takes the internet out of the equation and things are done locally (beyond redownloading apps if needed)

  • Data Migration (FI/CO)

    Hi,
    Kindly let me know the process for data migration from legacy to SAP system.
    The client wants us to migrate not only the open items but also all the line items (since there are not much transactions as the company was newly incorporated).
    We are following the BDC approach, I need to know if there is a debit item then which account is to be credited.
    If any document please send to my email [email protected]
    Points would be awarded.
    Thanks
    SS

    Hi SS,
    I would recommend you to check the LSMW. You can achieve a lot with this tool to convert master data and transaction. Check also the modules you have. For example the asset module has special functions for conversion purpose.
    Greetings,
    S

Maybe you are looking for