Calculate mass data

Hi,
i need to do mass data calculation.
i have several table in the DB (oracle), and i need to perform some calculation on them. it's about 50,000 rows to modify.
i don't want to do this in the DB.
what is the best way to get the Data, hold it in the server, do the calculation, and then send the results back to DB ???

The best way to do it is probably in the DB, but if you're dead set against that, you can create a query and get the info over to you. It should all be returned as a ResultSet, which you can iterate and/or change to meet whatever you need. Then send the data back.
Again, I think you should just handle it all with DB commands.

Similar Messages

  • Mass data handling in an Enterprise SOA

    Hello together,
    i'm working on my diploma thesis with the title "Design of a service-oriented architecture based on SAP NetWeaver".
    For this work an enterprise service is designed to calculate a special price matrix (10x5) from a given price for a product.
    Additionally the matrix for a product can have four variations, depending from input values. I think for few products there's no problem.
    But it's also possible that someone wants to export the price matrices for all 15.000 products. So there are 60.000 (4 x 15.000) service requests at once.
    So my questions:
    Is it (without bigger problems) possible for a service to handle so many requests at one time? Or generally, how behaves enterprise SOA in cases of mass data requests like that (network traffic, workload, overhead for enterprise services...)?
    An alternative is to storage all matrices in a DB (would be much redundancy, because variations of the matrices are very similar).
    Thanks for any answers
    Joschi

    Having the same service to get one product price as well as all product prices would not be recommended. Two separate services would be more reasonable
    Mass data handling in SOA is not entirely different than let's say in BAPI/RFC environment. parallelism, multi-threading, locking, commit and many others are typical elements of considerations.
    From a scalability standpoint, you can always be interested in how optimal its performance is whether you call it once or a million times. If the service is a rather slim one (lightweight in terms of number and types of parameters as well as processing code), you'll surely have better chance than with a service that's heavyweight.

  • Parallel processing of mass data : sy-subrc value is not changed

    Hi,
    I have used the Parallel processing of mass data using the "Start New Task" . In my function module I am handling the exceptions and finally raise the application specific old exception to be handled in my main report program. Somehow the sy-subrc is not getting changed and always returns 0 even if the expection is raised.
    Can anyone help me about the same.
    Thanks & Regards,
    Nitin

    Hi Silky,
    I've build a block of code to explain this.
      DATA: ls_edgar TYPE zedgar,
            l_task(40).
      DELETE FROM zedgar.
      COMMIT WORK.
      l_task = 'task1'.
      ls_edgar-matnr = '123'.
      ls_edgar-text = 'qwe'.
      CALL FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' STARTING NEW TASK l_task PERFORMING f_go ON END OF TASK
        EXPORTING
          line = ls_edgar.
      l_task = 'task2'.
      ls_edgar-matnr = 'abc'.
      ls_edgar-text = 'def'.
      CALL FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' STARTING NEW TASK l_task PERFORMING f_go ON END OF TASK
        EXPORTING
          line = ls_edgar.
      l_task = 'task3'.
      ls_edgar-matnr = '456'.
      ls_edgar-text = 'xyz'.
      CALL FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' STARTING NEW TASK l_task PERFORMING f_go ON END OF TASK
        EXPORTING
          line = ls_edgar.
    *&      Form  f_go
    FORM f_go USING p_c TYPE ctype.
      RECEIVE RESULTS FROM FUNCTION 'Z_EDGAR_COMMIT_ROLLBACK' EXCEPTIONS err = 2.
      IF sy-subrc = 2.
    *this won't affect the LUW of the received function
        ROLLBACK WORK.
      ELSE.
    *this won't affect the LUW of the received function
        COMMIT WORK.
      ENDIF.
    ENDFORM.                    "f_go
    and the function is:
    FUNCTION z_edgar_commit_rollback.
    *"*"Interface local:
    *"  IMPORTING
    *"     VALUE(LINE) TYPE  ZEDGAR
    *"  EXCEPTIONS
    *"      ERR
      MODIFY zedgar FROM line.
      IF line-matnr CP 'a*'.
    *comment raise or rollback/commit to test
    *    RAISE err.
        ROLLBACK WORK.
      ELSE.
        COMMIT WORK.
      ENDIF.
    ENDFUNCTION.
    ok.
    In your main program you have a Logical Unit of Work (LUW), witch consists of an application transaction and is associated with a database transaction. Once you start a new task, your creating an independent LUW, with it's own database transaction.
    So if you do a commit or rollback in your function the effect is only on the records your processing in the function.
    There is a way to capture the event when this LUW concludes in the main LUW. That is the PERFORMING whatever ON END OF TASK. In there you can get the result of the function but you cannot commit or rollback the LUW from the function since it already have implicitly happened at the conclusion of the funtion. You can test it by correctly comment the code I've supplied.
    So, if you  want to rollback the LUW of the function you better do it inside it.
    I don't think it matches exactly your question, maybe it lead you on the right track. Give me more details if it doesn't.
    Hope it helps,
    Edgar

  • Report Slow Due to Mass Data , Soln for Performance Tuning

    Dear All,
    I am making report with mass data so for this i have to put For All enteries in & Ranges at lodz of places.
    1. For all enteries in is making my report works very slow.
    2. If i change for all enteries by Ranges then if the no. of records are large the system will thn
        throw dump.
    If the no. of records are large or the logic applied in complex then report is taking very long
    execution time , Can anyone suggest me the method by which i can optimize my report and make it
    run smoother in performance.
    Thanks
    Ankesh Jindal

    Hi,
    >
    Ankesh Jindal wrote:
    > The problem is with FAE and ranges acc to uptill i have discovered,
    > As I have mentioned if I take FAE and number of records are large the execution will take
    > very large amount of time for that i have changed FAE to ranges but still if no. of records are
    > large in ranges system will throw dump
    >
    so far so good. SQL statements must not get too large.
    >
    Ankesh Jindal wrote:
    > so the best soln for this which i have considered for
    > my reports is to use ranges but with some logic applied that is ;
    >  suppose i have 20,000 records then send data to ranges in 3k or 4k lots .
    > so in this case i am using ranges with 3k or 4k lots so the sytem will not throw dump and i will get
    > faster execution of query with ranges...
    >
    General question: How big is the runtime difference for your SELECT with Range (4k) and the default FAE (5 in case of ORACLE)... more than 20%? could you post your actual run time figures?
    Your range approach is faster because you do less database calls. 5 db calls if you have 4 k entries in the range.
    You can influence the number of database calls as well for the FAE.
    Assuming you are running on ORACLE with a default configuration you have 5 entries per call.
    (Parameters rsdb/max_in_blocking_factor, rsdb/max_blocking_factor). So you will end up
    with 4000 db calls with 5 records each. 
    You compare that with 5 db calls with 4000 records for your range... this is not fair
    Hint your FAE with this, this would lead to 5 db calls for the FAE as well.:
        %_hints oracle '&max_in_blocking_factor 4000&'.
    now compare again... .
    Note1: Be care full with big ranges and blocking factors... cost based optimizers may react sensitive to big inlists or or concatenations and may change plans suddenly... .
    Note2: If you are not on ORACLE your blocking factors may be considerably higher (30, 60, ...).
    Kind regards,
    Hermann

  • How to calculate first date and end date of this year in Query

    Hi Expert
    I want to calculate following dates with inputted date in query.
    I have no knowledge on ABAP and I just can create a query with simple logic.
    Could you teach me how to calculate following date?
    (If inputted date is April 12 2009)
    - First date of this year (Ex January 1 2009)
    - End date  of this year (Ex December 31 2009)
    - First date of last year (Ex January 1 2008)
    - End date of last year  (Ex December 31 2008)
    - First date of this month (Ex April 1 2009)
    Thank you!
    Take

    HR_JP_MONTH_BEGIN_END_DATE   use this FM to get the begin and end date of the Date you are passing. eg when u give input as 04/12/2009, it will return
    04/01/2009 as begin date
    04/30/2009 as end date
    pass the Year in this FM HR_E_GET_FISC_YEAR_DATES, you will get the Fiscal year Begin and End Dates
    Abh

  • Mass data load into SAP R/3 - with XI?

    Hi guys!
    I have an issue - mass data migration into SAP R/3. Is XI a good solution? It will be about 60GB of data. Or is there a better way of this data load?
    Thanx a lot!
    Olian

    hi,
    SAP doesn't recomment using XI for mass data migration
    and 60 Gb is certainly too much
    use LSMW for that purpose
    Regards,
    michal

  • Best way to export mass data from SAP R/3 to non-sap system

    Hi,
    I have to transfer mass data from a sap R/3 system to a non-sap system. Any experiences to find the best solution/interface?
    Requirements:
    - fast
    - delta load ability
    Any help will be appreciated.
    Thanks,
    Detlef

    HI,
    Using Proxies is also a good option.
    Thanks,
    Manish

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • Standard tcode for (mass) data change of internal orders or ... ??

    Hi!
    I really need some info if there by any chance SAP has standard transaction for mass data change of internal orders (more particular, distribution rules in settlement rule section, which can be found in <b>KO02 transaction</b>  ).
    I am trying to change distribution rules for settlement receivers in <b>settlement rule section</b>, that is finish past distribution rules by filling TO PERIOD and TO FISCAL YEAR fields on the right of each rule, and then entering new rules (which i get from external source -flat file, ms excel, csv...).
    If i wanted to import data in SAP i guess i would have to develop a Batch Input. But that would take me some time to develop because it is pretty complicated.
    I found tcode KO08 but i do not really know how to use it. Maybe there is another tcode that i am not aware of?
    I would appreciate any suggestions!
    Thnx, UK

    Hi Srilakshimi,
    If you are familiar with MASS transaction, then you can modify User Responsible field for Internal Orders from transaction KOK2.
    As first step you must create a selection variant in order to define which orders you want to modify. Once selection variant was created, excute transaction with it and you'll get a screen similar to MASS transaction. Select the field you want and massively replace it. Do not forget to save.
    Best Regards!
    Mgitur

  • Automatic import mass data regional structure -  Program RSADRLSM01

    Hello,
    regarding the automatic import mass data to the regional structure via
    program RSADRLSM02, we are working in order to replace our third party
    provider.
    That is why, we need to deleted all the data imported from the city
    file and the references before to import new provider data.
    We have checked the SAP procedure defined in SAP note 132948 and the
    mentioned program RSADRLSM01 but we need confirm that the regional estructure informed in the old documents saved in the system could be impacted if the program RSADRLSM01 is executed.
    Any experience in this kind of process?
    Thanks in advance.
    Juan Carlos

    Since no one has replied - why not just try this in your test system and see what happens?

  • How to calculate start date of the week based on week number ?

    i need to get week number of the current date and based on that i need to calculate start date falling in the same week for last year.
    Eg. today is 31st week of year and 31st july date. so what will be the date on the 31st week of last year. i need the start date of that week.
    we can calculate the week number by select to_char(sysdate,'ww') from dual.
    DO we have a single line query for that or will it require writing a pl/sql block ?

    you can try following query
    it can be as inline but for more clean look and create it as select with include select
    with t as
    (select sysdate as dt from dual)
    select to_char(prev_year_dt - to_char(prev_year_dt, 'D') + 1, 'DD.MM.YYYY') as start_of_week from (select
    -- get day from prev year with the same week number
        case
               when to_number(to_char(add_months(dt, -12), 'WW')) > to_number(to_char(dt, 'WW')) then
                dt - (to_number(to_char(add_months(dt, -12), 'WW')) - to_number(to_char(dt, 'WW'))) * 7
               when to_number(to_char(add_months(dt, -12), 'WW')) < to_number(to_char(dt, 'WW')) then
                dt + (to_number(to_char(dt, 'WW')) - to_number(to_char(add_months(dt, -12), 'WW'))) * 7
               else
                add_months(dt, -12)
           end as prev_year_dt
      from t) t1good luck
    Sergii
    'Monday' is not first day of week in 100% ;)
    Edited by: Galbarad on Jul 30, 2012 11:00 PM

  • Calculate due date

    Hello guys:
    I need your help here.
    I try to build an application that has to calculate the due date for 14 days.
    I have two date picker:
    1)P11_BORROW_DATE
    2)P11_RETURN_DATE
    How can i calculate the borrow date plus 14days to become the return date shown in the in the second date picker.
    I am using date format of (DD-MM-YYYY).
    Can u guys explain to me step by step, for example : (html form header region, process, and also htnl attiributes, etc )
    Edited by: user10258545 on 14-Sep-2008 10:57

    hello
    >> It can calculate the date after i press a button. It cannot calculate automatically when i change the borrow date in my application.
    In his example, Denes is using AJAX. You can read more about AJAX with APEX in here - http://htmldb.oracle.com/pls/otn/f?p=11933:63 . This page should answer most of your questions.
    I’m not sure why you think you must press a button in order to fire the AJAX code. You have complete control on the firing timing, by using the appropriate event. Using ‘onchange’ or ‘onblur’ will fire the AJAX code without pressing any button.
    >> Btw, where should i load the process??
    The processes involved with APEX are Application Processes with process point of “On Demand …”. They are been loaded on demand, by part of the AJAX process.
    Regards,
    Arie.

  • Problem in Using Mass Data Getlist.

    Hi All,
    I am using a "Mass Data" Getlist for Salesorder. there are nearly 8000 records in VBAP table wich I want to bring it in Batches of 1000.
    I have modified my Getlist to the requirement as given in the document
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50fa3a06-8bcb-2c10-1daf-c604a4880361?quicklink=index&overridelayout=true]
    FUNCTION Z_SALES_MASS_GETLIST.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(ME_MASS_REP) LIKE  MEREP_MASS_REP1 STRUCTURE
    *"        MEREP_MASS_REP1 OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRET2
    *"  TABLES
    *"      IT_ZSALESORDERHEADER STRUCTURE  ZSALESORDERHEADER
    DATA : LDF_VBELN LIKE VBAK-VBELN.
    LDF_VBELN = ME_MASS_REP-ME_KEY_GREATER_THAN.
    select *
    from   VBAK
    INTO   CORRESPONDING FIELDS OF TABLE IT_ZSALESORDERHEADER
      UP TO     ME_MASS_REP-me_number_of_headers ROWS
                       WHERE     VBELN > LDF_VBELN
                       ORDER BY PRIMARY KEY.
    ENDFUNCTION.
    The Problem is that when I call this BAPI  in the DOE using the adapter and trigger the initial download I am not getting in any data into the middlware from the backend.
    Please let me know where do I pass the values of ME_KEY_GREATER_THAN and ME_NUMBER_OF_HEADERS.
    Is it in the backend or through the middleware?
    Is that the reason why I am not getting in the data to the middleware?
    Edited by: krutheeka on May 3, 2011 6:31 AM
    Edited by: krutheeka on May 3, 2011 6:32 AM

    Hi ,
    I have placed a breakpoint as I mentioned previously in the Generated class GET_KEY at the code,
    e_IT_ZSALESORDERHEADER = lt_header.
    I am getting  the data into e_IT_SALESORDERHEADER. I have mentioned that I need data in batches of 1000 so when I
    excecute this method I get the records into the above structure in batch of 1000.
    but I am not able to see any data in the CDS.
    Someone please tell me what the problem might be..
    Thanks,
    Krutheeka.

  • Issues in mass data Upload

    Hi All,
            Hope you all are doing fine.
            I have to do master data upload for my next project. I have gone through LSMW, DX-WB, Recording etc. and now I am quite comfortable with all of these.
            As i have tested these tools for maximum 8-10 records, I am interested in hearing from you all, your experiences regarding actual data upload where volume is high and data may be difficult to verify manualy.  Particularly I am interested in how to make upload faster,Error free,consistent(No record being posted twice etc.)
            Your inputs would be higlhly appreciated.
            Thanks a lot for patient reading.
    Bye and Regards.

    Hi navdeep,
    the mass data upload depending on tht data u want to upload, there ara several function module to upload data like create reservation or upload long text inspection method tell me what the data u want to upload
    Best Regard
    Waleed Sadat

Maybe you are looking for

  • Disk Utility Error Message - Missing EFI + MediaKit

    Previously setup was with 2 partitions, one for normal use while the other had the Lion Install ESD on it, used when I installed some time ago. The other day my machine suddenly shutdown and when I started it, it stated that the Lion Install ESD part

  • My hard drive crashed - how do I export music from my ipod to itunes

    My hard drive on my windows 8 computer crashed and I didn't  have a backup of my music, video, favorites etc.. I have installed Itunes on new hardrive how do I restore all my music etc.. from my ipad to Itunes on my computer I have not connected the

  • Query parameter question

    Hi What are the diffrence of the query parameter in following format: select * from table_a where row_id=?id select * from table_a where row_id=:id select * from table_a where row_id=&idThe 1st and 2nd works if I use them as named query from Java (To

  • F-47 & F-48 link - Tables

    Dear All, Can you let us know the table(s) where can i find the link between F-47 & F-48. Regards,

  • Compliance Management in LMS 3.2

    I'm having a hard time getting Compliance Manager to accept a "banner login" command I'm attempting to use on 6500 IOS switches. I've edited the template, tried cut-&-paste, looked for the archive file on the server to directly modify it (without suc