Process recordset in batch of 10

Hi,
I've got a query that returns more than 1000 records.
Now, for each record, there are several methods to be called
and much processing to be done.
If I just do
<cfloop query="queryName">
<!--- Invoke all methods here --->
</cfloop>
This will take too long and will cause major performance
issues on the server.
Therefore I want to process the recordset in batches of 10
(I've tested with 10 records and it's fine).
i.e. Loop 1st 10 records -> for each record call the
appropriate methods, etc. When 1st 10 are finished, proceed to the
next 10.
Any idea how to do this please?
Thanks and regards,
Yogesh Mahadnac

Hi Dan,
I have a program that manages hotel representatives.
Each representative has a number of hotels that he is
assigned to, and several agencies can be assigned to each hotel.
We have around 350 hotels and around 1200 agencies in all.
Take the worst case scenario (I've tested with much less than
that and I got a JRUN Error).
Let's say that 1 representative does ALL Agencies on ALL
hotels.
Therefore you need to loop each hotel and assign each agency
to it so that you can record them.
The code attached below shows the basic process that occurs.
When I run it with more than 10 hotels, the program crashes.
That's why I wanted to process it in batches of 10 i.e. process the
1st 10 records, send a message to the user that the database is
processing the request and then when it completes everything, he
gets a message e.g. All records successfully saved and logged.
What do you propose as an alternative solution to process all
those records without causing too much performance degradation?
Regards,
Yogesh Mahadnac

Similar Messages

  • QM In-Process Inspection for Batch Managed Material

    Hi,
    I have a issue related to UD of In-Process inspection for batch managed material. The production process is discrete manufacting for a cold rolling mill. A production order can have mutiple coils as per the production amount. To track the individual coil , batch management has ben activated. We have both in-process as well as inspection after production here.
    For inspection after production we are fine as we are doing partial confirmation after every coil and have separate inspection lot having different batch number.
    But for in-process I can have only one inspection lot for the production order (created on release of the production order). I can do the result recording but while trying to do UD u2013 it is asking for a batch number as the material is batch managed. W/o entering the batch number system is not allowing me to do the UD.
    Is there any solution/work around of this problem.
    -Regards
    ashim

    Hi Ashim,
    you raised a very good question? i am helpless here to execute same scenario,
    but i disussed with my QM guy here, he said, once the material is batch managed then it has to ahve batch in UD.
    so i discussed ur case, which is very much valid for heavy ind like cement and all,
    so what i suggest, u create a dummy batch in the UD for in process (no inventory posting)
    and at confimation give ur usual batch (if system propose the dummy batch which u give in the UD for inprocess, try to change there--- i hope it should allow)
    i would really like to here answer from u for this.
    try to do as suggested, and let me know the results.
    REgards,
    Pravin mukkawar

  • Picking process in OPM Batch

    Hi Team,
    To set the Bulk picking process to happen for created batches and when executed no batch order number is getting defaulted for selecting it.
    Kindly let me know is there any set up missed for this feature.
    Regards,
    PAM

    Could you please explain me what steps need to be done for picking process in OPM batch?

  • At the time of Process order creation Batch determination

    Dear All,
    When i am creating process order at the time system not allowing me to execute batch determaination after release only it is allowing me to do.
    My requirement is At the time of order creation i want assign batches ( Execute Batch Detrmination)for the material.
    how to do this one, kindly hel me
    Regards,
    s.sakthivel

    Hi sakthivel 
    Go to OPKP (Production scheduling profile)  txn code and select in Batch management tab Automatic Batch creation at order creation (1) and check this profile is assigned to material in work scheduling view
    Regards

  • Parallel process define for batch job

    Hi,
    I would like to run a batch job with a few processes run parallel together. May I know where can i define it ? T-code ?
    Regards
    Lauran

    Hi Lauren,
    First of all there is no transaction code as such.
    First of all the report that  needs to be run in background should enable you to do parrallel processing. For that code has to be written accordingly.
    Check this link:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/096e92543b11d1898e0000e8322d00/content.htm
    It gives details of function modules needed for this purpose.
    After this you need to create a variant for the report and schedule it to run in background using either SE38 (dirrectly) or by creating a job explicitily- SM36.
    A standard report that has parallel processing feature available is RBDAPP01.
    Also check transactions like BD18. They also make use of parallel processing.
    Regards.
    Ruchit.

  • Auto batch detmn for components in Process Order selects batch in Q status.

    Hi Gurus,
    We have the following issue with automatic batch determination for component batches for a Process Order:
    Say for a Process Order it requires components A,B, and C.
    The issue is with component C. if the PO requires 100 Qty of C. the system is picking batch X having 80 qty  and picking 20 from another batch Y which is still in u201CQu201D status (due to some defects it is not cleared .  for which inspection should have completed 3 days before Process Order is released).
    Also there are only these two batches for this component in MMBE.
    What I understand is system adds GR date + GR processing days ( for inspection) and release component for production after that (ie., moves to Un restricted stock). Therefore system selects this batch as per the availability check (by calculating the GR+ GR processing date) even thoe it is not cleared yet.
    Also, I want to know If this is correct procedure, how can we make system to not to include batch with Q stock (batch which is having some defects).
    Thanks,
    N.

    Hi
    Use separate Checking Group(Availability Check) in MRP-3 view for comp C with the settings in OPJJ(Availability Check+Checking rule combination) with untick incl.quality insp stock. Idea is to select the un-restricted batch stock qty during Auto Batch determination for Components
    Regards
    Brahmaji

  • ESB Process reads a Batch file for a limited set of records only..?

    Dear All,
    I am having an ESB process that reads a Batch file (csv) that has around 10,000 Products information.
    I have another BPEL process that will create the Product in Oracle Apps through standard API (Main BPEL process that calls a child process for creating product).
    I am invoking the BPEL process from ESB, and that works fine.
    Now, the Issue is: I am able to create at a time around 10 Products (the main process calls the child process in a loop.). The main process instance is not getting created but the child process instance is getting created for a set of records, afterwards the child process instances get stops creating. The main process instance could not be found in the console. Not getting why the process is not getting visible as well it is not completing the process.
    What could be the problem for this... Am I need to change any environment configurations...?
    Please update...
    Many Thanks in advance...

    Does this apply to you?
    https://social.technet.microsoft.com/Forums/en-US/9ccd8e50-b0af-4f58-9787-6435834e4c52/dfsr-not-working-on-new-windows-2008r2-server
    Thanks for the link, but no - not the same scenario although the error is the same.   The RGs I'm working with are all in sync and communication is working, it's just getting the backlog reported correctly.
    To reiterate, I can paste two versions of the exact command into the DOS window buffer; one copied from OneNote and one copied from my batch file.  Executing the one from OneNote succeeds and reports the RG in sync and the one copied from the batch
    file fails.
    I can repeat the results by up arrow once to the command pasted into the buffer from the batch file and see it fail.  Then up arrow twice to retrieve the command pasted from OneNote into the buffer and it will report correctly (illustrated in the grahic).
    Let me add that the command in the batch file was originally copied from OneNote and pasted in to the batch file; as if going into the batch file somehow corrupts it.
    - a -

  • SM35 - manual processing of the batch input session

    Hello,
    In SM35 I see that some batch input sessions were processed by user XXX-XXXX (user type:System) (in our case INT-3528) in N mode. The question is: how to determine the exact user who has really processed that session? We need to stop that - I guess - automatic processing of the sessions and process them manually.
    Thanks for help,
    Slawek

    Hi,
    also, you can check the logs directly in SM35. So if any documents were posted (or anyting updated in the system) information about what happened should be shown there.
    If there were acounting documents (table BKPF), I think the user name will be the same system user "who" has processed the sessions.
    I think that your basis team has set up the system in a way that batch input sessions are processed automatically. This is simialr when scheduled jobs are running under a pseudo user name (system user, IT user, not a real person behind). You can ask the basis team to switch off this automatic processing competely or only for selected sessions.
    Hope that helps, points welcome
    Csaba

  • Get work process table in batch mode

    I need to get the content of sm50 periodically in a shell script using dpmon. Is there any way to run dpmon in batch mode to get the work process table ?  The dpmon utility provides an inactive way to get the work process table, dpmon ->m ->p but don't see a way to run this in a shell script.
    Does anyone a transparent table (exists in oracle)  in sap, which has the work process information ?
    Jay

    Hi Jay,
    Could you let us know how your issue was solved?
    Because I am facing the same issue..I want to get the output of dpmon in batch form, using scripts...
    When I tried to check the reply "echo "q" | /sapmnt/$/exe/dpmon pf=/sapmnt/$/profile/$_$_$ p", I found that ultimately the cursor does not come out of the interactive mode...This is my main issue...How to come out of the interactive mode of dpmon...Could anyone help me with this?
    Thanks & Regards,
    Kunal Patel

  • Creating Process Orders using batch processing

    Hi :
    I am creating process orders automatically by using batch processing.I have a custom T.code and custom table.The batch program should be build based on custom table.From where will i get the data for batch processing? from custom table? if so how can i prepare a file for that.
    I have to submit this batch program to the custom T.Code so that it creates Process Orders automatically.
    Can u guide how to procede in this.
    Thx.
    Raghu

    Hi Raghu,
      What i think is u have a custom program which creates Process Orders using some user data. this user data is posted to a custom tabel.
    Now if i am right then u want to create a batch program around this custom program so as to achieve benifits of batch processing.
    yopu can check these links to better understand how to create a BDCprogram.
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sappoint.com/abap/bdcconcept.pdf
    http://www.sappoint.com/abap/bdcconcept.pdf
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm
    http://www.planetsap.com/bdc_main_page.htm
    http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_gci1068429_tax293481,00.html
    Hope this helps.
    Award rewar points if its useful.

  • Processing Record by batch

    Hi Experts,
    I have an scenario, In the internal table suppose If I  have a 50,000 records ( fifty thousand records) , suposse I want to process the records in the batch of 5000 ( five thousand ) , I need to process 10 times to compelete this 50,000 records.
    or if I need to process 50,000 records in  the batch of 2000 then ,I need to process it 25 times...
    The number of records per batch will be given by the user ...
    But how to calculate the iterations and process all the records in ABAP langauage...
    Thanks in Advance...
    Regards,
    IFF
    Edited by: IFF on Feb 18, 2008 6:15 PM
    First Iteration : 1-5000
    Second Iteration : 5001-10000
    Last iteration:45001-5000
    The batch size may be directly given by the user
    Regards,
    IFF

    hi
    after the user inputs the no. of records per batch..
    using usual code send those number of records to the batch and delete it from the internal table..
    as u put it in the loop, the process continues until all the records are processed (that is the internal table become empty).
    Regards,
    K.Tharani.

  • Attach/Dettach 412-e process happen after batch determination,

    Hi, Experts,
    We are using here MTO scenarion, After production , Stock availble against one Sales order(Exa- X1), After that i have create one delivery document agsint SO -X1, & batch determination also done, Only PGI is pending,
    But after that user can do attch/dettach process (movement 412-e-T.code MB1B) X1 SO stock to another SO X2, So i want to restirct atttach/dettach process after createion of delivery agsinst SO- X1,
    Can anybody suggest me for this validation, I think standard validation available but i am not aware of this validation,
    Thanks a lot in adavance,
    Regards:
    Happy

    Dear ayethebing  Sir,
    As per your suggestion,
    I have maintained - Dynamic availability check for goods movement -  B& F also
    Checking Rule for Availability Check - Maintain as a - B
    & then I have created one SO & created delivery docuemnt against that SO(PGI only pending), After that i have created new SO, then try to do for MB1B- 413 -E , System is allowing me for posting,
    Request you to inform me other solution, Given solution not working,
    Once again Thanks for your prompt response,
    Regard:
    Happy

  • Mark T/R items with the 'Processed' Indicator in batches

    Hi, guys,
    I need to mark a great bulk of transfer request(non or partial processed items) with 'Processed' Indicator, is there any way can get it done in batches? Thanks...
    Best regards
    Michael

    No mass transaction exists for this purpose...try trx LL01...or LSMW...
    Edited by: Csaba Szommer on May 18, 2009 2:38 PM

  • Problems processing a large batch of data within a Weblogic 5.1 cluster

    I have about exhausted my sources of information on this, so I ask the
              experts:
              The project I am involved with is attempting to build a scheduled
              process on a 5.1 cluster which will retrieve hundreds to thousands of
              database rows from a small group of Oracle tables and then submit them
              into a legacy system for processing. The problems we face are:
              1. We cannot have duplicate data submitted from startup classes on
              different servers in the cluster
              2. We need the process to run if even only one machine in the cluster is
              available and therefore do not want to tie the process to a single
              machine
              3. We would prefer to distribute the workload across all servers
              currently available in the cluster, but this is not mandatory.
              One solution is to retrieve each record as an Entity bean, attempting to
              update it to "in process" and rejecting any failures thus utilizing
              database locking, but due to the large number of records being processed
              this is much too resource intensive as well as time consuming.
              We have looked into JMS based solutions, but it appears that JMS under
              5.1 is tied to a specific server (failing case 2).
              One acceptable approach that we have yet to find a way of implementing
              is to have a "singleton" session bean, only one of which exists on the
              cluster (though it may exist anywhere on the cluster). I have run
              across a number of other applications for just this sort of EJB, but is
              it possible to implement?
              Sadly, Weblogic 6.0 cannot be part of the solution as our company will
              not be adopting it until well after this project's delivery date.
              Are we missing something obvious?
              Many thanks!
              -Steve
              

    You have to have all the servers in the cluster polling for work out of the
              database. Use the database as a scheduling / routing mechanism. Use timers
              on each server in the cluster to kick off a "find me one thing to do"
              process every n minutes or seconds.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Steven Wicklund" <[email protected]> wrote in message
              news:[email protected]...
              > I have about exhausted my sources of information on this, so I ask the
              > experts:
              > The project I am involved with is attempting to build a scheduled
              > process on a 5.1 cluster which will retrieve hundreds to thousands of
              > database rows from a small group of Oracle tables and then submit them
              > into a legacy system for processing. The problems we face are:
              > 1. We cannot have duplicate data submitted from startup classes on
              > different servers in the cluster
              > 2. We need the process to run if even only one machine in the cluster is
              > available and therefore do not want to tie the process to a single
              > machine
              > 3. We would prefer to distribute the workload across all servers
              > currently available in the cluster, but this is not mandatory.
              >
              > One solution is to retrieve each record as an Entity bean, attempting to
              > update it to "in process" and rejecting any failures thus utilizing
              > database locking, but due to the large number of records being processed
              > this is much too resource intensive as well as time consuming.
              >
              > We have looked into JMS based solutions, but it appears that JMS under
              > 5.1 is tied to a specific server (failing case 2).
              >
              > One acceptable approach that we have yet to find a way of implementing
              > is to have a "singleton" session bean, only one of which exists on the
              > cluster (though it may exist anywhere on the cluster). I have run
              > across a number of other applications for just this sort of EJB, but is
              > it possible to implement?
              >
              > Sadly, Weblogic 6.0 cannot be part of the solution as our company will
              > not be adopting it until well after this project's delivery date.
              >
              > Are we missing something obvious?
              > Many thanks!
              > -Steve
              >
              

  • Stop processing of billing batch in VF04 at the time of pricing check

    Hi,
    T-code is: VF04
    We are calling external system SABRIX using RFC "RFC_CALCULATE_TAXES_DOC"  to get the tax information and once if it returns any error it should not create the billing document for that particular sales document in the batch.
    The problem is Billing document is creating though we have the error in Tax info from SABRIX system. All the user exits are calling before this sabrix call and we didn't find any way to stop the billing for that particular sale doc.
    Can anyone throw a light that we can place the SABRIX call to any of the user exit at the time of pricing and stop the billing if any error in tax information.
    It is mostly appreciated and we got stuck up with a serious issue on this!!!!!!!!!!!!!!!!!!!

    Hi Ajay
    Thanks for the reply.
    The COPA Documents Generated 2 Times through settlement.
    *When document generated.*
    1 After Delivery Sales order is settled
    2 After Billing  Sales order is settled
    *What sort of value*
    There i maintain the PA Stracture as same as CCS. But in the COPA report system is updating Material Cost 2 times.
    *Record Type*
    Record Type for documents is C in both cases
    Settlement after Billing  & Delivery.

Maybe you are looking for

  • Installing ColdfusionMX 7 on Windows Vista

    I know Vista is relatively new, but I'm hoping some out there ca help me. I'm trying to install Coldfusion MX 7 on Vista Home Prenium edition. I'm getting an error: HTTP Error 404.3 - Not Found I tried adding the MIME Type (.cfm cfm-application/octet

  • Why can't I use the tab key to highlight links on a webpage?

    In previous versions of FF and in other browsers, I can use the tab key to navigate through all the links on a webpage - I can't seem to do this with FF5, the tab key will only highlight the address bar, search bar, and any form fields within a webpa

  • Flash images not displaying correctly

    Hi there, First post here, but could really us the help. I'm looking after this site:  http://theacademy.me/index.htm The previous web developer set up a swfobject image rotator which didn't work before I got here. I wanted to get it working, but now

  • Startp13N.bat gives Authenticate Error

    Hi, When I try to run startP13N.bat , it gives me the following authenticate error.The password that I have entered is the same as for system(the one entered during installation and which starts StartPortal.bat).Is there anything else that needs to b

  • Font Book Questions

    Not sure if this is the best place for them but I can't find anywhere else. Do I need to keep font book open to have the fonts working? Whenever I close the window, the little black triangle disappears, which would indicate that the app has quit. Doe