Best way to go for Parallel Processing?

Hi all,
I am working on a ALV report, where the user will be selecting some entries and click on process button.
Currently, the entries are processed sequentially in a loop. Now, to save time on processing, the entries have to be grouped by material number, and all the groups have to be processed in parallel.
Example:
If there are 10 items, and 2 materials, the items will be grouped into 2, and two group of items will be processed in parallel, reducing the processing time by half.
I need to know, which concept to use for the parallel processing?
Call FM in Separate Task / Call FM in Background Task or is there any other way to aceive it?
What is the maximum number of parallel/background sessions supported by SAP?
I also got some code samples:
[Starting New Task|http://wiki.sdn.sap.com/wiki/display/ABAP/Parallel+Processing]
[In Background Task|http://wiki.sdn.sap.com/wiki/display/Snippets/ABAPparallelprocessingusingRFC]
Thanks,
Prabhakar.

Hii...
Kindly refer this code.. This will help you..
REPORT  ZRAHUL_WORKPROCESS_TASK.
TABLES : VBRK, BSEG.
SELECTION-SCREEN : BEGIN OF BLOCK B WITH FRAME TITLE TEXT-001.
PARAMETERS : S_ROW TYPE I OBLIGATORY,
             S_LINES TYPE I OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B.
TYPES : BEGIN OF ST_VBRK,
  VBELN TYPE VBRK-VBELN,
  END OF ST_VBRK.
DATA :  IT_VBRK TYPE TABLE OF ST_VBRK,
        WA_VBRK TYPE ST_VBRK.
TYPES : BEGIN OF ST_BSEG,
        BELNR TYPE BSEG-BELNR,
        VBELN TYPE BSEG-VBELN,
      END OF ST_BSEG.
DATA : IT_BSEG TYPE TABLE OF ST_BSEG,
       WA_BSEG TYPE ST_BSEG.
DATA : TEMP_BSEG TYPE TABLE OF ST_BSEG,
       TEMP_VBRK TYPE TABLE OF ST_VBRK.
DATA  : V_INDEX TYPE I VALUE 0,
        TEMP TYPE I VALUE 0,
        REMAINDER TYPE I VALUE 0,
        XXX TYPE I VALUE 0,
        T_ID(8) TYPE C.
START-OF-SELECTION.
  SELECT VBELN FROM VBRK INTO TABLE IT_VBRK UP TO S_ROW ROWS.
  IF SY-SUBRC = 0.
    SORT IT_VBRK.
  ENDIF.
  LOOP AT IT_VBRK INTO WA_VBRK.
    V_INDEX = V_INDEX + 1.
    TEMP = V_INDEX MOD S_LINES.
    IF TEMP = 0.
      APPEND WA_VBRK TO TEMP_VBRK.
      PERFORM PARALLEL_SELECT.
      CLEAR TEMP_VBRK.
    ELSE.
      APPEND WA_VBRK TO TEMP_VBRK.
    ENDIF.
  ENDLOOP.
  REMAINDER = ( S_ROW / S_LINES ).
  WAIT UNTIL XXX = REMAINDER.
  LOOP AT IT_BSEG INTO WA_BSEG.
       WRITE :/ WA_BSEG-BELNR, WA_BSEG-VBELN.
       AT LAST.
         NEW-LINE.
         WRITE :/ SY-TABIX.
       ENDAT.
  ENDLOOP.
*&      Form  PARALLEL_SELECT
*       text
*  -->  p1        text
*  <--  p2        text
FORM PARALLEL_SELECT.
  T_ID = T_ID + 1.
  CALL FUNCTION 'ZRAHUL_APPEND' STARTING NEW TASK T_ID DESTINATION IN GROUP DEFAULT PERFORMING SUBROUT ON END OF TASK
    TABLES
      IT_VBRK = TEMP_VBRK.
ENDFORM.                    " PARALLEL_SELECT
*&      Form  SUBROUTINE
*       text
*      -->P_IT_VBRK  text
*      -->P_=  text
*      -->P_TEMP_VBRK  text
*      -->P_IT_BSEG  text
*      -->P_=  text
*      -->P_TEMP_BSEG  text
FORM SUBROUT USING P_T_ID TYPE CLIKE.
  RECEIVE RESULTS FROM FUNCTION 'ZRAHUL_APPEND'
          TABLES
            IT_BSEG = TEMP_BSEG[].
  APPEND LINES OF TEMP_BSEG TO IT_BSEG.
    XXX = XXX + 1.
ENDFORM.                    " SUBROUTINE
This will be helpful.
Thanks,
Jhings

Similar Messages

  • Troubleshooting the lockwaits for parallel processing jobs

    Hi Experts,
    I am facing difficulty tracing the job which is interfering with a business critical job.
    The job in discussion is using parallel processing and the other jobs running at the time are also using the same.
    If I see a lockwait for some process which may be a dailog process or update process spawned by these jobs, I am having difficulty knowing which one holding the lock and which one is waiting.
    So, Is there any way we could identify the dailog or update processes which are used for parallel processing for a particular backgorund job.
    Please help me as this is business critical and we have a high visibility in this area.
    Any suggestions will be appreciated.......
    Regards
    Raj

    Hi Raj,
    First of all, please indicate if you are using SAP Business One.  If yes, then you need to check those locks under SQL Management Studio.
    Thanks,
    Gordon

  • Regenerate Variants for parallel processing in FI-CA

    Hi everybody,
    does anybody know a possibility to regenerate variants for parallel processing objects (GPART for example) in FI-CA automically in a job? I can start the program RFKKDI05 with a variant but I can not tell the program to automatically regenerate the existing variants.
    Any help appreciated.
    Cheers,
    Markus

    Hello Markus,
    You'll likely need to create a custom program to accomplish this task.  The program may call FM FKK_DI_VARIANT_REFRESH.  This will allow you to specify the object and variant which needs to be regenerated.
    Best regards,
    Matt

  • Unable to clone File Adapter receiver channel for parallel processing

    Hi Experts,
    I am using variable substitution for File - RFC - File with out BPM scenario(using request response, oneway bean).
    While i placed the file in the sender FTP folder, the file didnt get picked up, but in communication channel monitoring, i am getting error ' Unable to clone File Adapter receiver channel for parallel processing'.
    Can anybody provide me suggestions to solve this error.
    Note : without variable substitution , the interface is working good.
    Is it due to, i am trying the source structure field in response file adapter?

    Hi,
    In your CC, do you use some additional paramaters ?
    like these one of point 47/48 of [Oss note 821267 - FAQ: XI 3.0 / PI 7.0/ PI 7.1 File Adapter|https://service.sap.com/sap/support/notes/821267]
    Maybe there is conflict with a parallel connexion and the bean used to do asynch-synch bridge...
    Mickael

  • Java Proxy Generation not working - Support for Parallel Processing

    Hi Everyone,
    As per SAP Note 1230721 - Java Proxy Generation - Support for Parallel Processing, when we generate a java proxy from an interface we are supposed to get 2 archives (one for serial processing and another suffixed with "PARALLEL" for parallel processing of jaav proxies in JPR).
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1230721
    We are on the correct patch level as per the Note, however when we generate java proxy from the IR for an outbound interface, it genrates only 1 zip archive (whose name we ourselves provide in the craete new archive section). This does not enable the parallel processsing of the messages in JPR.
    Could you please help me in this issue, and guide as to how archives can be generated for parallel processing.
    Thanks & Regards,
    Rosie Sasidharan.

    Hi,
    Thanks a lot for your reply, Prateek.
    I have already checked SAP Note 1142580 - "Java Proxy is not processing messages in parallel" where they ask to modify the ejb-jar.xml. However, on performing the change in ejb-jar.xml and while building the EAR, I get the following error:
    Error! The state of the source cache is INCONSISTENT for at least one of the request DCs. The build might produce incorrect results.
    Then, on going through the SAP Note 1142580 again, I realised that the SAP Note 1230721 also should be looked onto which will be needed for generating the Java proxy from Message Interfaces in IR for parallel processing.
    Kindly help me if any of you have worked on such a scenario.
    Thanks in advance,
    Regards,
    Rosie Sasidharan.

  • No destination is currently free for parallel processing - SAPRCK10

    Hello ABAPers,
    We have scheduled SAP standard program "SAPRCK10" in background processing at our production server on daily basis.
    It was worked fine on last week before but its now giving a error says "No destination is currently free for parallel processing ".
    Could you please guide us how to resolve this issue ?
    Thanks,
    vthilagaraj

    Dear François Henrotte,
    Could you please let me know how to increase the number of processe in RZ04 ?
    Thanks,
    vthilagaraj

  • SAP job not using all dialog processes that are available for parallel processing

    He Experts,
    The customer is running a job which is not using all the dialog processes that are available for parallel processing. It appears to use up the parallel processes (60) for the first 4-5 minutes of the job and then maxes out about 3-5 processes for the remainder of the job.
    How do I analyze the job to find out the issue from a Basis perspective?
    Thanks,
    Zahra

    Hi Daniel,
    Thanks for replying!
    I don't believe its a standard job.
    I was thinking of starting a trace using ST05 before the job. What do you think?
    Thanks,
    Zahra

  • What is the best way to prepare for CERTIFICATION?

    what is the best way to prepare for CERTIFICATION?
    what is needed?
    where can i read more about it?

    Hi,
    Do as much as possible exercises based on your course material(which will be more than enough).
    If you know (some) Java and have understand the basics of OOP then this is enough for the exam.
    And do not forget:
    it is a multiple-choice test meaning that you see the possible answers.
    Either a single answer is correct (then you will have radio-buttons) or several answers are correct
    (then you will have checkboxes; in this case almost all questions will have more than one correct answer).
    You can refer to the topics for the certification
    https://websmp102.sap-ag.de/~sapidp/011000358700000499112003E
    Some links which might help
    /message/213564#213564 [original link is broken]
    /message/514469#514469 [original link is broken]
    /message/1315746#1315746 [original link is broken]
    /message/1736299#1736299 [original link is broken]
    /message/1736299#1736299 [original link is broken]
    /message/257122#257122 [original link is broken]
    /message/130164#130164 [original link is broken]
    /message/1916905#1916905 [original link is broken]
    /thread/167254 [original link is broken]
    /message/213564#213564 [original link is broken]
    /message/1315746#1315746 [original link is broken]
    <b>
    you try www.sapdoamin.com
    They provide Certification simulation questions which are veryuseful and a must try site.</b>
    Yes more questions comes on OOPS so get your OOPS concepts very clear.
    You don't need to do extensive coding in OOPS.
    Just get the concepts clear and i am sure the certification will be a cake walkthrough.
    All the best and good luck with your ABAP Accreditation.

  • New MBP - Best way to care for battery?

    Not sure if this is necessary anymore, but I am receiving my new MBP in the mail later today. What is the best way to care for the battery? Should I plug the MBP into the wall for an amount of time before turning it on, or at least wait until it is fully charged before turning it on for the first time? Is anything like that even necessary anymore?
    Thanks,
    Keith

    Here's what Apple recommends:
    http://www.apple.com/batteries/notebooks.html
    Best use is frequently and lightly. Be sure to calibrate your battery every two months or so:
    http://docs.info.apple.com/article.html?artnum=86284
    Hope this helps...

  • Framework for parallel processing

    Hello,
    Can anyone help me by giving some links or examples as to how to use the framework for parallel processing ?? (FPP)
    My scenario is that I have a report that handles huge volumes of data and process it. But at present my report is not able to handle huge volume and it either dumps or hangs. So I would want to use the parallel processing framework which would then can handle huge volumes and also reduce the time for execution.
    Thanks and Regards,
    Sandhya

    Is there anyone can provide some comments?

  • Custom IAC applications the best way to go for putting R/3 screens on web?

    Hi all,
    I am trying to figure out whether a Custom IAC would be a best way to go for putting custom developed R/3 transaction on the web. We want to put the R/3 transactions on the web but want to completely customize the look and feel of it. Is IAC the best way to go for it? will this work with any kind of transactions?
    cheer,
    i028982

    Hello,
    The ITS might not be the "best" way, but it sure would be an easy way.  If the transaction and screens are already created in the R/3 then you could just go to SE80 and create HTML templates to see if it will do what you want.  Steps:
    1. Transaction SE80
    2. Choose "Internet Service"
    3. Type in a custom developed z* name
    4. Right-click on the z* name and choose Create > Theme
    5. Create theme 99 (standard theme)
    6. Right-click on the z* name again and choose Create > Template
    7. Type in all information, theme number, program name and screen number.  Play with the "Generation Style" to see which one would better fit your transaction.
    After creating the screens you can publish to your ITS and give it a test.  Maybe this is all you need, if so, it would be fast and readily available.
    Best regards,
    Edgar Chuang

  • What would the best way to go for an virtual grid?

    I need a 3 x 8 virtual grid that I can change values to:
    Red
    Blue
    Spoiler
    what would the best way to go for this objective?
    Thanks!

    I need a 3 x 8 virtual grid that I can changevalues
    to:
    Red
    Blue
    Spoiler
    what would the best way to go for this objective?
    Thanks!Create a Grid and a Tile class. A
    Grid has a 2D array of Tile objects an
    a Tile has an attribute called Color and, say,
    an x- and y-point. Program some appropriate methods.
    Done.
    Thanks for trying, but Nanook already gave the correct answer in reply 1.Is it possible to restrict these? to like a 8 x 3 grid ?
    or should i use an if statement?

  • What is the best way to export for use on internet?

    what is the best way to export for use on internet?

    It depends. Is this for a personal web site or for a site like YouTube, Vimeo or Facebook?
    For YouTube, Vimeo and Facebook, use Publish & Share/Computer/AVCHD using one of the YouTube presets.

  • Best Way to Check for same Word in string?

    If I have an array of words, would the best way to check for the same word be to use 2 for loops?

    Huh?
    Sounds like homework...
    What is a word? Presumably a String.
    For equality of Strings you use...
        String s1 = ....
        String s2 =....
        if (s1 == s2) { equal depending on null case
        else if ((s1 != null) && (s1.equals(s2))) { equal }
    For the case of checking one array to another....
          while items in array1
                 get itema from array1
                      while items in array2
                           get itemb array2
                                  is itemb equal (see above) to itema
                                         yes - then do something

  • Best way to look for next char in String that is NOT "-" or " " or ","?

    I have a long String that is sent to me and needs to be parsed. Normally I can figure the end of the line by a line break, but sometimes the line break is lost only after the second line. This second line contains the characters:
    These characters can all appear any number of times. I will know I'm at the end of the line when I hit a character that is not one of those three. What is the best way to look for this? Is there an already set method in the Java API?
    Thanks for all the help!

    There are solutions using regular expression, eg; you can split string once a time using minus char, whitespace or comma:
    String tokens[] = anyString.split("\\-|\\x20|,");
    More sophisticated expressions could be done to achieve results:
    String re = "^(.+)(\\-|\\x20|,)(.)(.*)$";
    Matcher m = Pattern.compile(re).matcher(anyString);
    if (m.matches()) {
    String
    before = m.group(1),
    delimiter = m.group(2),
    firstCharAfterDelimiter = m.group(3),
    suffix = m.group(4);
    Regards.

Maybe you are looking for

  • How to change default window in a compnent ?

    Hi Guys, I have created 2 windows in a component . The first window is aumatically set as default. I want to change ths second window as default window. How can I do it ? Regards, Vishesh

  • Base price Calculation

    Friends, I have got a question regarding pricing. I have 2 Base Price condition types PR00 and QR00 . PR00 has a validity from 03.12.2010 and QR00 has a validity from 06.12.2010 . The price declared fro Material M1 using condition type PR00 is Rs. 12

  • Creating tablespace in Timesten

    Hi, I am trying to use Timesten as stand alone database. When I try to create tablespace from sqldeveloper, it is failing. Can anybody please let me know whether it is possible to create tablespaces or not. Thanks

  • Migration from Baan to SAP

    Hi, I am seeking for information about masters / transactions which are reuired to be uplaoded during migration into SAP. In fact, trying to have a document about "Baan to SAP Migration"  or "SAP Data Migration" document which can tell me data which

  • Problem to upgrade my Ipad2 to IOS 7.0.2.

    I tried to upgrad my Ipad2 to IOS 7.0.2. this weekend without success. When the Ipad had been downloading the software via WiFi for a while it asked me to connect to Itunes which I did. After "extracting software" in Itunes for a while I get the erro