Splitting a background job over different application servers

I am running my program in the background and its taking long to complete. I have done some optimizations and it has greatly improved but still not running as fast as I want because its processing large amounts of data and the amount of time that I want all the data to be processed is little compared to the runtime of the program so now I want to split the background job over different application servers. Can someone tell me how do I go about doing that and example ABAP code will be greatly appreciated.
Many thanks

Hello, If you are interested in BANK_PP_JOBCTRL, here are some of the inputs. Its work very efficeintly, though you will have to investigate a little bit froom your end.
With in package bank_pp_jobctrl , you will find these FM. I have mentioned the use of it as well.
RBANK_PP_DEMO_GENERATE_DATA: To create the Business data for Parallel Processing.
RBANK_PP_DEMO_CREATE_PACKMAN: To create Packages out of the business data.
RBANK_PP_DEMO_START : To process data in parallel.
RBANK_PP_DEMO_RESTART: To re-process failed records during parallel Processing.
You will need to call above in your report program in the same sequence as shown above based on you requirement. I did used only first three.
TO generate events you will need to execute SE38: RBANK_PP_GENERATE_APPL to create application this will create the FM with numbers as shown below.
Events: This PPF automatically triggers various events during the execution of theStart Program. Each of this event is associated with a custom function module which contains the business logic.
For implementing this framework, at least the below mentioned methods should be implemented .
0205 – Create Package Templates  : This method is used to write the logic for creating packages which in turn decides the data to be processed in parallel. This function module is called in loop at the loop ends only when the exporting parameter E_FLG_NO_PACKAGE has a value ‘X’ passed back to the Parallel processing framework.
1000 – Initialize Package :This method is the first step in processing a package. It fetches all the parameters required for the parallel processing to start. All the parameters are passed to this FM as importing parameters and it is the responsibility of this FM to save it in global parameters so that it can be utilized by Parallel processing framework.
1100 – Selection per Range : This method is used to read data for a package. The objects selected must be buffered in global data areas of the application for later processing. The package information is stored as interval in global parameters and this information is used to select the package specific data.
1200 – Selection for Known Object List: This method is used instead of method 1100 if it is a restart run. The objects to be processed are known already.
1300 – Edit Objects: The processing logic to be implemented using parallel processing for the selected objects is written in this method. This function module is used to implement the business logic and
Also, obiviously you would like to log your messages , so the framwrok provides macros to do it.
Let me know if you need some further help as I know there is very little information provided on this.
Regards/Ajay

Similar Messages

  • SAP R/3 Enterprise : Background job run on application servers

    Hello All,
    For our SAP system (SAP_BASIS 620, SAP_ABA 620,SAP_APPL 470), there are 5 application servers and one central instance.
    We have a  Background job that connects to external non sap system for data delivery via RFC of Type "G" i.e.HTTP Connection to Ext. Server with port 443 . RFC works fine.
    In transaction STRUST, SSL certificates are also installed to enable the https connectivity from R3 system.
    Our current issue is that background jon runs on one of the application server correctly and is able to transfer that data to external system. However if same job runs on other 4 application server, it fails to connect to external server and throws error:
    RFC Destination XXXX not defined
    407 Unknown error
    Failed to store the XML content
    Error in the XML document: 1301540.xml
    407 Unknown error
    This is very starnge for us .RFC is working correctly every time but background job works on one AS and not on other AS.
    Where and What can be the difference in application servers.
    Please help to send in ur replies. Thanks
    Edited by: Chetna  Verma on Apr 27, 2011 1:46 PM

    Hi,
    Is there a firewall between the non SAP system and the SAP system ? It could be that firewall rules have only been set for one only of the SAP application servers ?
    Did you check the HTTP connections from each application server ?
    Did you check that the ICM is running on each SAP application server ?
    Regards,
    Olivier

  • How to trace users across different Application Servers?

    Hi,
    We trace users using ST01. But how do we trace users logged in to different application servers? Please help.
    Regards
    MK

    Hi Ahmed,
    SM51 or AL08 shows in which Application server the user is logged in. But ST01 does not allow us to select or to specify the application server while tracing a user. Can you be a little more vivid. How do you specify the application server in ST01?
    Please help.
    Regards
    MK

  • Get the Cookie Value from Different Application Servers

    Hi All,
    I am using the two applications with different application servers. How to get the cookie values from one to another application. Shall i know any sample codes?
    Thanks
    Maalan

    A cookie carries a domain name. The browser will only return cookies whose domain matches to domain to which the request is made, however although you can use a partial domain name providing it's not too generic. So, when you add a cookie you need to explicitly set the domain name on the cookie to, for example, your company suffix like ".acme.com", then the cookie should be returned to all the servers under that domain e.g. server1.acme.com and server2.acme.com.

  • Schedule background job with different user

    hi ,
    i want to schedule a background job under a different user
    i have used the parameter AUTHCKNAM of 'job_submit'
    it is giving sy-subrc = 0 .
    but it is not working
    i have also used the FM 'bp_job_create' in place of 'job_open'
    it is giving sy-subrc = 0 .
    but not working as needed
    kindly help
    regards...

    hi
    Try this
    We can do that via SUBMIT statement:
    Go through the documentation os SUBMIT statement with addition:
    ... USER user VIA JOB job NUMBER n
    Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN.
    OR
    go through this link , i hope this ll help you to solve your problem
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5f/ff2138faeb3807e10000009b38f889/content.htm
    Hope this helps.
    Thanks
    Tushar

  • Shared object and different application servers - how to resolve this issue

    Dear SDN Members,
    We are occuring a big problem. We create a shared object in a program and after we call in an another one. In central system architecture, it is working well. But on a distributed architecture (4 application servers), we have a dump some times. In fact, the read of the shared object can be occured in the AS 4 but the share object has been created in AS1.
    How to manage this problem to avoid this dump ?
    Dupplicate the shared object in the application servers ?
    Encapsulate different calls with RFC link to only one AS ?
    Any parameters on server or share objects ?
    Thanks a lot for your help,
    Points will be given to right or good answers.
    Br,
    Aurélien

    What is the dump you are getting ?
    AFAIK, "Shared Memory"(SHM) is an area defined in the app server. I am not sure if you can access SHM of a different app server (as in your case trying to access SHM of AS1 from AS4). [http://help.sap.com/abapdocu_70/en/ABENSHARED_MEMORY_GLOSRY.htm]
    In this case you can opt for "DataBase Clusters". Relevant ABAP statements: [IMPORT|http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm#!ABAP_ALTERNATIVE_4@4@]/[EXPORT|http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm#!ABAP_ALTERNATIVE_4@4@] FROM/TO DATABASE.
    Hope this helps.
    BR,
    SUhas

  • How to create multi connections using JCO in different application servers

    Hi all,
    I want to connect to sap using jco from different servers at the same time.
    There are 3 Jave application servers now. But I can only connect the sap servers using ONE server ( random ) at same time. It means when one server connect to sap , the other 2 servers CANNOT connect to sap.
    Anyone konw what wrong?
    Thanks in advance.
    Ned

    ......

  • Transactions over multiple application servers

    Hello,
    we have following situation.
    We have a bunch of core services deployed on a central application server and some applications deployed on individual application servers.
    The services are developed as normal remote interfaces.
    The core service interfaces have special annotations, so the service locator knows, that he has to lookup them on other servers.
    Now we have the following case:
    This code is executed in application server 1.
    Service2 is deployed in application server 2 and Service3 in application server 3.
    public void doSomething() {
            ServiceLocator locator = ServiceLocator.getInstance();
            Service2 service2 = locator.getService(Service2.class);
            service2.doSomething();
            Service3 service3 = locator.getService(Service3.class);
            service3.doSomething();
    }Each of the calls to service2 and service3 performs some database operations.
    But, if service3.doSomething() fails, the database operations done by service2.doSomething() are not rolled back. (no surprise)
    What do we have to do, so that the service2 operations are also rolled back on service3 failures?
    Thanks
    Dirk

    Doesn't work... :(
    Here my sample code:
    Service1 (deployed on AS1)
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
        public void doSomething() {
            Logger.getLogger(getClass().getName()).info("doSomething");
            ServiceLocator locator = ServiceLocator.getInstance();
            Service1Entity entity = new Service1Entity();
            entityManager.persist(entity);
            Service2 service2 = locator.getService(Service2.class);
            service2.doSomething();
            Service3 service3 = locator.getService(Service3.class);
            service3.doSomething();
        }Service2 (deployed on AS2)
    @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void doSomething() {
            Logger.getLogger(getClass().getName()).info("doSomething");
            Service2Entity entity = new Service2Entity();
            entityManager.persist(entity);
        }Service3 (deployed on AS3)
    @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void doSomething() {
            Logger.getLogger(getClass().getName()).info("doSomething");
            Service3Entity entity = new Service3Entity();
            entity.setUuid("Bang");
            entityManager.persist(entity);
        }Each service has a XA datasource configured. The all access the same database.
    But when I call service1.doSomething(), I get a javax.ejb.EJBTransactionRequiredException from service 2.
    Does somebody has an idea?
    thanks
    Dirk

  • How to run long background jobs in ADF applications

    Hi,
    I'm looking for some guidance on how to run an asynchronous job within an ADF application with proper progress notification in the current page.
    Let's assume we have some long running task (e.g. generating notification emails from a bunch of rows in my view object and send them) with the corresponding classes implemented in the DataModel as part of the business logic (e.g. a class that sends a mail to a given recipient).
    Let's assume all the relevant methods can be exposed in the appmodule's client interface so they can be invoked from the ViewController if needed.
    In my jspx page I have implemented the standard af:poll+af:progressIndicator mechanism to give feedback about the running task, backed by a custom BoundedRangeModel
    with methods getValue() and getMaximum(). This works.
    However, all the examples I've found on the net are very very simplistic and only deal with simple counters or countdowns.
    But how to actually implement the whole mechanism in a real life scenario? How do I run the job itself and make it give feedback to my BoundedRangeModel class
    (which in turn is used by the progressIndicator on the page)?
    Is there a recommended way to do this within ADF apps? I've tried to search something about asynchronous method execution in ADF but there seems to be nothing out there.
    Do I need to use standard Java techniques such as a separate Thread running a Runnable worker? Should I use an observer/observable pattern to notify BoundedRangeModel
    and update its internal variables (current value and maximum)? Would this work across a Datacontrol interface?
    Is anything of this allowed within the ADF framework or I'm just gonna break the whole framework model because do-it-yourself concurrent programming isn't allowed in a multithreaded pooled environment?
    Some explanation about the current recommended best practices and/or some practical examples or articles about that would be great.
    (BTW: I'm using version 11.1.1.2.0 and yes, I've checked the contextual events thing too, but that's just an inter-page communication mechanism so it has has nothing to do with what I need to do.)

    Hi
    I have implement a "Runner" class to generate a pdf to every customer of a mailmerge file, which was uploaded. Its simply easy to do something like this. Just add a button, bound the button with a methode out of you applicationModule and start your implementing Thread in this methode.
    public class Runner implements Runnable {
        private String docFileName;
        private String csvFileName;
        private byte[] csvData;
        private byte[] docData;
        private FtpClient client;
        private String category;
        public Runner(String category, String docFileName, byte[] docData,
                      String csvFileName, byte[] csvData, FtpClient client) {
            this.category = category;
            this.docFileName = docFileName;
            this.docData = docData;
            this.csvFileName = csvFileName;
            this.csvData = csvData;
            this.client = client;
        public void run() {
    }In your applicationModule, you can start your Runner like this:
            Runner runner =
                new Runner(category, docFileName, docData, csvFileName, csvData, client);
            new Thread(runner).start();And to the problem with your progressBar. I would create a managedBean with a HashMap<String, HashMap<String, String>>. Every thread you start, add a HashMap<String, String> to this hashmap with the id of the username/session/whatever (must be bound to the user, which starts the thread). This added HashMap<String, String> should be used by your thread to put some status-information into. Now you can try to bind this info to your progressBar.
    I dont know if this will work, it is just an idea ;-)
    Regards
    Majo

  • Oracle portal use in different application servers

    Instead of Oracle 9iAS, can Oracle Portal run on other Application Server?

    Hello,
    When you using JDBC resource in a J2EE container you should use a DataSource that will be an abstraction layer to your code.
    Are you doing that?
    This will simplify the integration to the development, test and production machines.
    You can take look the the data source how-to on OTN.
    Regards
    Tugdual Grall

  • Problem with background job using SUBMIT under different user

    Hi All,
    I am submitting a background job under different user name. I am submitting this job by using JOB_OPEN , SUBMIT report and JOB_CLOSE. But submit statement is returning sy-subrc 8, becuase of this the job_close is failed. Can you please help me to solve this problem.
    Thanks in advance.
    Tjgupta

    Hi,
    The user is having all authorizations. is there any difference with user types?
    This user is having  user type " as communication data".
    Thanks,
    Tjgupta

  • Restrict background Jobs thro' ABAP Program

    Hello,
    While I was working in one of the customer place , they restricted the background jobs thro' one ABAP program for customer reports . Unfortunately , I don't have the source code with me. As you are all aware that users fires the background jobs for different periods so that he/she can submit the reports to the higher up in time.
    Scenario : I have 10 application servers and each application has 20 work processes ( 12-Dialog,4-Background,3-spool,1-Gateway). I would like to restrict 1 background process/per appl server  for customer reports(Y OR Z programs) during the business hours .
    It would be great help  to Basis Consultants , if you can contribute to restrict the background jobs .
    Thanks
    Regards,
    S.Srinivasan

    Hi Daniel,
    The program MEREP_DISTRIBUTOR(Client Data Distributor) determines delta data independent of a download request from the client.This is mainly used to reduce the load on the server and scheduling of this program is part of "SAP MI Administration" which is generally performed as part of OR after MI Post Installation steps that recommends you to Schedule Background Jobs for Generic and Smart Sync which you wanted to confirm in your post.So the programs
    (1)WAF_MW_MAPPING
    (2)WAF_DEPLOYMENT_FROM_ROLES &
    (3)MEREP_RETRY_BP
    are good enough for scheduling Generic & Smart Sync(in your case for MAM).Apart from these you may have to check up the Handler Settings that is mentioned in my previous post.
    Hope this helps.
    Thanks
    Gisk

  • Sending of email triggered in a background job ends with error.

    Hello all,
    I have created a API which triggers mail to a distribution list using class CL_BCS. When i execute this API in foreground it works fine and the mails are triggered.
    However i am calling this API in a report which will scheduled as a  background job in my application and this job executes for some 5 to 6 hours and after that i trigger the mail. However at this point the job gets cancelled due to an abort message raised in
    one of the CL_BCS methods.
    The method is cl_cam_address_bcs=>create_internet_address which is called in my API and internally this calls many other methods. The abort meessage is thrown from the method instantiate_imp_class of class CL_EXIT_MASTER.
    The ST22 log reads like this:
    Runtime Errors:  LOAD_SWITCHSTATES_MISMATCH
    Short text:  Current switch statuses are incompatible with program switch statuses.
    What happened?
        The current switch statuses that are read for the execution of the
        program "CL_IM_CVI_ADDRESS_UPD_IMPL====CP" are incompatible with the switch
         statuses with which the
        program "CL_IM_CVI_ADDRESS_UPD_IMPL====CP" was generated at the time
         20090902114544.
    Any advice would be greatly helpful.
    Warm Regards,
    Naveen M

    Hi!
    How you determine sender (method set_sender) ? if you use current user, when it runs on background use a backgorund user and it maybe can not determine an email.
    Try force a sender (harcode your user for test when sy-batch eq 'X')
    If it works, you need to determine the user to be used on jobs to solve this problem.
    I hope it helps
    Regards!!!!

  • Sessions in jspx between different Application Server

    Hello All,
    I have two applications running in two different Application servers.
    I call the jspx in one applications server from jspx of another applications server using the href.
    My requirement is, when I logout the first application it shud automatically inviladate session in the second jspx also.
    Is there any way of acheive this..
    Also please pass on any links to work on sessions in jspx.
    Thanks
    Krrish

    Hi frank,
    Thank you for the reply..
    Can you please provide any links to SSO enabling the custom application.
    Thanks
    Krrish

  • Multiple PIA/Application servers to one database?

    We're planning an upgrade to PT 8.50, FSCM 9.1 and with this upgrade we want to add access for outside customers/vendors. What's the best way to configure an internal employee site/app, and a customer site/app to one production database? Is it as simple as installing different application servers and PIAs, point them all to the one database, and configure 1 PIA as EMPLOYEE and the others as CUSTOMER? Or should we also need use Portal 9.0? I've been doing some research into this, but was hoping to hear some real-world experience and advice from anyone else that's set up anything similar.
    Thanks,
    -rob

    you can have a PIA built for outside customers hitting the same database.
    you can even have separate PIA hitting same app servers and db.
    If you are planning on having an external site outside your firewall - for CUSTOMER (portal) make sure the external site is built to work only for CUSTOMER portal.
    u might also want to design your customer ID base - using specific permissions and roles.
    hope this helps.
    Subhash

Maybe you are looking for

  • Feeding blank pages

    I recently purchased an HP Laserjet Pro 200 MFP M276mw for my business. I'm running Mac osx 10.10. Every time I print an email, or a form off the internet, it only prints on the odd pages and adds 2 extra blank pages at the end. An example, I want to

  • Issue in receiver SFTP seeburger adapter

    Dear all, We have a proxy to sFTP scenario. The target message is being delivered to a sFTP system using a receiver sFTP Seeburger adapter. I have this error being shown in the receiver channel. Message processing failed. Cause: javax.resource.Resour

  • Top N in each group

    Hi, I have a table with the following rows: date   product_name   product_type   quantity_sold I want to get the best selling products in each category i.e. the Top ten products in each product_type on a particular date. I am using oracle 8.0.6. So I

  • Migration from Classic WHT functionality to Extended WHT functionality

    Hi Experts, For a US based client we have a requirement which requires migration from Classic WHT to Extended WHT. I would appreciate any pointers on this, especially if you have a document containing all the steps required for migration, please do s

  • Actions to exclude

    Hi all. I put defaultGlobalWizard and Forward in actions to exclude section. Unfortunatelly this action does not make any difference to the UWL. Is there any missing step(s) that I haven't to perform? I suspect existing user does not attach to this p