Parallel processing in background

Hi All,
I am processing 1 million of records in background, which takes approximately around 10 hrs. I wanted to reduce the time to less than 1 hr and tried using parallel processing. But the tasks run in Dialog workprocesses and giving abap short dumps due to time out.
Is there any other solutions using that i can reduce total processing time.
Please note that i cannot split. I am getting 1 million records from a select query and after processing all those records in SAP, I am sending to XI and XI will post in legacy system.
Please note that all other performance tunings done.
Thanks,
Rajesh.

Hi Rajesh,
Refer sample code for <b>Parallel Processing</b>:
By doing this your <b>processing</b> time will be highly optimized.
Go thru the description given in the code at each level.
This code Checks available WORK PROCESSes and assigns data in packets for processing. This way you save a lot of time esp when data is in Millions.
Hope it helps.
REPORT PARAJOB.
Data declarations
DATA: GROUP LIKE RZLLITAB-CLASSNAME VALUE ' ',
"Parallel processing group.
"SPACE = group default (all
"servers)
WP_AVAILABLE TYPE I, "Number of dialog work processes
"available for parallel processing
"(free work processes)
WP_TOTAL TYPE I, "Total number of dialog work
"processes in the group
MSG(80) VALUE SPACE, "Container for error message in
"case of remote RFC exception.
INFO LIKE RFCSI, C, "Message text
JOBS TYPE I VALUE 10, "Number of parallel jobs
SND_JOBS TYPE I VALUE 1, "Work packets sent for processing
RCV_JOBS TYPE I VALUE 1, "Work packet replies received
EXCP_FLAG(1) TYPE C, "Number of RESOURCE_FAILUREs
TASKNAME(4) TYPE N VALUE '0001', "Task name (name of
"parallel processing work unit)
BEGIN OF TASKLIST OCCURS 10, "Task administration
TASKNAME(4) TYPE C,
RFCDEST LIKE RFCSI-RFCDEST,
RFCHOST LIKE RFCSI-RFCHOST,
END OF TASKLIST.
Optional call to SBPT_INITIALIZE to check the
group in which parallel processing is to take place.
Could be used to optimize sizing of work packets
work / WP_AVAILABLE).
CALL FUNCTION <b>'SPBT_INITIALIZE'</b>
EXPORTING
GROUP_NAME = GROUP
"Name of group to check
IMPORTING
MAX_PBT_WPS = WP_TOTAL
"Total number of dialog work
"processes available in group
"for parallel processing
FREE_PBT_WPS = <b>WP_AVAILABLE</b>
"Number of work processes
"available in group for
"parallel processing at this
"moment
EXCEPTIONS
INVALID_GROUP_NAME = 1
"Incorrect group name; RFC
"group not defined. See
"transaction RZ12
INTERNAL_ERROR = 2
"R/3 System error; see the
"system log (transaction
"SM21) for diagnostic info
PBT_ENV_ALREADY_INITIALIZED = 3
"Function module may be
"called only once; is called
"automatically by R/3 if you
"do not call before starting
"parallel processing
CURRENTLY_NO_RESOURCES_AVAIL = 4
"No dialog work processes
"in the group are available;
"they are busy or server load
"is too high
NO_PBT_RESOURCES_FOUND = 5
"No servers in the group
"met the criteria of >
"two work processes
"defined.
CANT_INIT_DIFFERENT_PBT_GROUPS = 6
"You have already initialized
"one group and have now tried
"initialize a different group.
OTHERS = 7..
CASE SY-SUBRC.
WHEN 0.
"Everything’s ok. Optionally set up for optimizing size of
"work packets.
WHEN 1.
"Non-existent group name. Stop report.
MESSAGE E836. "Group not defined.
WHEN 2.
"System error. Stop and check system log for error
"analysis.
WHEN 3.
"Programming error. Stop and correct program.
MESSAGE E833. "PBT environment was already initialized.
WHEN 4.
"No resources: this may be a temporary problem. You
"may wish to pause briefly and repeat the call. Otherwise
"check your RFC group administration: Group defined
"in accordance with your requirements?
MESSAGE E837. "All servers currently busy.
WHEN 5.
"Check your servers, network, operation modes.
WHEN 6.
Do parallel processing. Use CALL FUNCTION STARTING NEW TASK
DESTINATION IN GROUP to call the function module that does the
work. Make a call for each record that is to be processed, or
divide the records into work packets. In each case, provide the
set of records as an internal table in the CALL FUNCTION
keyword (EXPORT, TABLES arguments).
DO.
CALL FUNCTION 'RFC_SYSTEM_INFO' "Function module to perform
"in parallel
STARTING NEW TASK TASKNAME "Name for identifying this
"RFC call
DESTINATION IN GROUP group "Name of group of servers to
"use for parallel processing.
"Enter group name exactly
"as it appears in transaction
"RZ12 (all caps). You may
"use only one group name in a
"particular ABAP program.
PERFORMING RETURN_INFO ON END OF TASK
"This form is called when the
"RFC call completes. It can
"collect IMPORT and TABLES
"parameters from the called
"function with RECEIVE.
EXCEPTIONS
COMMUNICATION_FAILURE = 1 MESSAGE msg
"Destination server not
"reached or communication
"interrupted. MESSAGE msg
"captures any message
"returned with this
"exception (E or A messages
"from the called FM, for
"example. After exception
"1 or 2, instead of aborting
"your program, you could use
"SPBT_GET_PP_DESTINATION and
"SPBT_DO_NOT_USE_SERVER to
"exclude this server from
"further parallel processing.
"You could then re-try this
"call using a different
"server.
SYSTEM_FAILURE = 2 MESSAGE msg
"Program or other internal
"R/3 error. MESSAGE msg
"captures any message
"returned with this
"exception.
RESOURCE_FAILURE = 3. "No work processes are
"currently available. Your
"program MUST handle this
"exception.
YOUR_EXCEPTIONS = X. "Add exceptions generated by
"the called function module
"here. Exceptions are
"returned to you and you can
"respond to them here.
CASE SY-SUBRC.
WHEN 0.
"Administration of asynchronous RFC tasks
"Save name of task...
TASKLIST-TASKNAME = TASKNAME.
"... and get server that is performing RFC call.
CALL FUNCTION 'SPBT_GET_PP_DESTINATION'
EXPORTING
RFCDEST = TASKLIST-RFCDEST
EXCEPTIONS
OTHERS = 1.
APPEND TASKLIST.
WRITE: / 'Started task: ', TASKLIST-TASKNAME COLOR 2.
TASKNAME = TASKNAME + 1.
SND_JOBS = SND_JOBS + 1.
"Mechanism for determining when to leave the loop. Here, a
"simple counter of the number of parallel processing tasks.
"In production use, you would end the loop when you have
"finished dispatching the data that is to be processed.
JOBS = JOBS - 1. "Number of existing jobs
IF JOBS = 0.
EXIT. "Job processing finished
ENDIF.
WHEN 1 OR 2.
"Handle communication and system failure. Your program must
"catch these exceptions and arrange for a recoverable
"termination of the background processing job.
"Recommendation: Log the data that has been processed when
"an RFC task is started and when it returns, so that the
"job can be restarted with unprocessed data.
WRITE msg.
"Remove server from further consideration for
"parallel processing tasks in this program.
"Get name of server just called...
CALL FUNCTION 'SPBT_GET_PP_DESTINATION'
EXPORTING
RFCDEST = TASKLIST-RFCDEST
EXCEPTIONS
OTHERS = 1.
"Then remove from list of available servers.
CALL FUNCTION 'SPBT_DO_NOT_USE_SERVER'
IMPORTING
SERVERNAME = TASKLIST-RFCDEST
EXCEPTIONS
INVALID_SERVER_NAME = 1
NO_MORE_RESOURCES_LEFT = 2
"No servers left in group.
PBT_ENV_NOT_INITIALIZED_YET = 3
OTHERS = 4.
WHEN 3.
"No resources (dialog work processes) available at
"present. You need to handle this exception, waiting
"and repeating the CALL FUNCTION until processing
"can continue or it is apparent that there is a
"problem that prevents continuation.
MESSAGE I837. "All servers currently busy.
"Wait for replies to asynchronous RFC calls. Each
"reply should make a dialog work process available again.
IF EXCP_FLAG = SPACE.
EXCP_FLAG = 'X'.
"First attempt at RESOURCE_FAILURE handling. Wait
"until all RFC calls have returned or up to 1 second.
"Then repeat CALL FUNCTION.
WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '1' SECONDS.
ELSE.
"Second attempt at RESOURCE_FAILURE handling
WAIT UNTIL RCV_JOBS >= SND_JOBS UP TO '5' SECONDS.
"SY-SUBRC 0 from WAIT shows that replies have returned.
"The resource problem was therefore probably temporary
"and due to the workload. A non-zero RC suggests that
"no RFC calls have been completed, and there may be
"problems.
IF SY-SUBRC = 0.
CLEAR EXCP_FLAG.
ELSE. "No replies
"Endless loop handling
ENDIF.
ENDIF.
ENDCASE.
ENDDO.
Wait for end of job: replies from all RFC tasks.
Receive remaining asynchronous replies
WAIT UNTIL RCV_JOBS >= SND_JOBS.
LOOP AT TASKLIST.
WRITE:/ 'Received task:', TASKLIST-TASKNAME COLOR 1,
30 'Destination: ', TASKLIST-RFCDEST COLOR 1.
ENDLOOP.
This routine is triggered when an RFC call completes and
returns. The routine uses RECEIVE to collect IMPORT and TABLE
data from the RFC function module.
Note that the WRITE keyword is not supported in asynchronous
RFC. If you need to generate a list, then your RFC function
module should return the list data in an internal table. You
can then collect this data and output the list at the conclusion
of processing.
FORM RETURN_INFO USING TASKNAME.
DATA: INFO_RFCDEST LIKE TASKLIST-RFCDEST.
RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'
IMPORTING RFCSI_EXPORT = INFO
EXCEPTIONS
COMMUNICATION_FAILURE = 1
SYSTEM_FAILURE = 2.
RCV_JOBS = RCV_JOBS + 1. "Receiving data
IF SY-SUBRC NE 0.
Handle communication and system failure
ELSE.
READ TABLE TASKLIST WITH KEY TASKNAME = TASKNAME.
IF SY-SUBRC = 0. "Register data
TASKLIST-RFCHOST = INFO_RFCHOST.
MODIFY TASKLIST INDEX SY-TABIX.
ENDIF.
ENDIF.
ENDFORM
Reward points if that helps.
Manish
Message was edited by:
        Manish Kumar

Similar Messages

  • Need help with parallel process in background; not able to call FM in bgnd

    Hello,
      I am trying since 2 days to solve the issue of parallel process in background without using FPP.
    For which I want to call function module of class method in new task but to be processed by background process and not dialog.
    I searched so many websites but everyone has suggesteed to 'call function in background task' . But the fact is the processing of function happens by dailog process even in this case.
    I want to loop at table and call FM or class method inside each loop.
    Kindly suggest me how can I call function or class method in new task in everycall and prcoess it in background.
    thanks

    Balaji,
    Is the name of the button between single or double quotes?
    Regards,
    Dan
    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

  • Parallel processing in background using Job scheduling...

    (Note: Please understand my question completely before redirecting me to parallel processing links in sdn. I hve gone through most of them.)
    Hi ABAP Gurus,
    I have read a bit till now about parallel processing. But I have a doubt.
    I am working on data transfer of around 5 million accounting records from lagacy to R/3 using Batch input recording.
    Now if these all records reside in one flat file and if I then process that flat file in my batch input program, I guess it will take days to do it. So my boss suggested
    to use parallel processing in SAP.
    Now, from the SDN threads, it seems that we have to create a Remote enabled function module for it and stuf....
    But I have a different idea. I thought to dividE these 5 million records in 10 flat files instead of just one and then to run the Custom BDC program with 10 instances which will process 10 flat files in background using Job scheduling.
    Can this be also called parallel processing ?
    Please let me know if this sounds wise to you guys...
    Regards,
    Tushar.

    Thanks for your reply...
    So what do you suggest how can I use Parallel procesisng for transferring 5 million records which is present in one flat file using custom BDC.?
    I am posting my custom BDC code for million record transfer as follows (This code is for creation of material master using BDC.)
    report ZMMI_MATERIAL_MASTER_TEST
          no standard page heading line-size 255.
    include bdcrecx1.
    parameters: dataset(132) lower case default
                                 '/tmp/testmatfile.txt'.
       DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
      If it is nessesary to change the data section use the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record,
    data element: MATNR
           MATNR_001(018),
    data element: MBRSH
           MBRSH_002(001),
    data element: MTART
           MTART_003(004),
    data element: XFELD
           KZSEL_01_004(001),
    data element: MAKTX
           MAKTX_005(040),
    data element: MEINS
           MEINS_006(003),
    data element: MATKL
           MATKL_007(009),
    data element: BISMT
           BISMT_008(018),
    data element: EXTWG
           EXTWG_009(018),
    data element: SPART
           SPART_010(002),
    data element: PRODH_D
           PRDHA_011(018),
    data element: MTPOS_MARA
           MTPOS_MARA_012(004),
         end of record.
    data: lw_record(200).
    End generated data section ***
    data: begin of t_data occurs 0,
          matnr(18),
          mbrsh(1),
          mtart(4),
          maktx(40),
          meins(3),
          matkl(9),
          bismt(18),
          extwg(18),
          spart(2),
          prdha(18),
          MTPOS_MARA(4),
        end of t_data.
    start-of-selection.
    perform open_dataset using dataset.
    perform open_group.
    do.
    *read dataset dataset into record.
    read dataset dataset into lw_record.
    if sy-subrc eq 0.
    clear t_data.
    split lw_record
       at ','
    into t_data-matnr
          t_data-mbrsh
          t_data-mtart
          t_data-maktx
          t_data-meins
          t_data-matkl
          t_data-bismt
          t_data-extwg
          t_data-spart
          t_data-prdha
          t_data-MTPOS_MARA.
    append t_data.
    else.
    exit.
    endif.
    enddo.
    loop at t_data.
    *if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                 'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '=AUSW'.
    perform bdc_field       using 'RMMG1-MATNR'
                                 t_data-MATNR.
    perform bdc_field       using 'RMMG1-MBRSH'
                                 t_data-MBRSH.
    perform bdc_field       using 'RMMG1-MTART'
                                 t_data-MTART.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                 'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                 'X'.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                 t_data-MAKTX.
    perform bdc_field       using 'BDC_CURSOR'
                                 'MARA-PRDHA'.
    perform bdc_field       using 'MARA-MEINS'
                                 t_data-MEINS.
    perform bdc_field       using 'MARA-MATKL'
                                 t_data-MATKL.
    perform bdc_field       using 'MARA-BISMT'
                                 t_data-BISMT.
    perform bdc_field       using 'MARA-EXTWG'
                                 t_data-EXTWG.
    perform bdc_field       using 'MARA-SPART'
                                 t_data-SPART.
    perform bdc_field       using 'MARA-PRDHA'
                                 t_data-PRDHA.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                 t_data-MTPOS_MARA.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                 '=YES'.
    perform bdc_transaction using 'MM01'.
    endloop.
    *enddo.
    perform close_group.
    perform close_dataset using dataset.

  • Error in handling Print Params In Parallel Processing of background jobs

    Hi Friends,
    My requirement is to optimize the performance of standard pgm RELEABL1 that takes a long time to complete when scheduled in background,and for that i have created a zpgm which will split the input data and run the jobs in parallel . I am using the submit statement and JOB_OPEN and JOB_CLOSE function modules to schedule the standard prg RELEABL1 in background with the input from my zpgm. The problem here is there is a push button " PRINT PARAMETERS" near the execute button on the selection screen of the standard pgm RELEABL1 in which the printer details have to be mentioned. Whenever i schedule the job in backgroung it throughs an error stating that " Define the Print Parameter First " . I tried my luck with all possible combinations but not able to handle this through my zpgm.....otherwise my pgm works fine. Can someone please guide me on how to handle this print parameters either through submit or what ever way possible.
    Thanks & Regards,
    Balaji.K

    Hi Balaji,
    We have the same performanced problem. 8 processes in parallel, still suffers from bad performance. How many subscribers are there on the system and how many processes do you use ?
    Best Regards,
    Ugur Uygan

  • 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

  • Parallel Process Option for Optimization in Background.

    Hi,
    I am testing the SNP Optimizer with various settings this week on  demo version from SAP for a client.  I am looking for information that anyone might have on the SNP Parallel Processing Option in the execution of the Optimizer in the background.   The information that I could find is very thin.   I would be interested in any documentation or experience that you have.
    Sincerely,
    Michael M. Stahl
    [email protected]

    Hello,
    While running the transaction /SAPAPO/SNPOP - Supply Network Optimization  in the background, In the variant of it you can enter Parallel Processing profile in the field Paral. Proc. Profile.
    This profile you will require to define in the Customization(SPRO) before use it in the variant.
    Path to maintain it is as below Use transaction SPRO
    Advanced Planning and Optimization --> Supply Chain Planning -->Supply Network Planning (SNP) --> Profiles --> Define Parallel Processing Profile
    Here you will require to define your profile... e.g. as below
    Paral. Proc. Profile SNP_OPT
    Description          SNP OPTIMIZER PP PROFILE
    Appl. (Parallel Pr.) : Optimization
    Parallel Processes   2
    Logical system :
    Server Group :
    Block Size:
    You will require to take Basis team's help to enter value for Server Group and Block size.
    I hope, above information is helpful for you.
    Regards,
    Anjali

  • How to get BI background jobs to utilize parallel processing

    Each step in our BI process chains creates exactly 1 active batch job (SM37) with in turn utilizes only 1 background process (SM50).
    How do we get the active BI batch job to use more than 1 background process similar to parallel processing (RZ20) in an ERP system?

    Hi there,
    Have you checked the number of background and parallel processes. Take a look in SAP Note 621400 - Number of required BTC processes for process chains. This may be helpful ...                                                                               
    Minimum (with this setting, the chain runs more or less serially):        
    Number of parallel SubChains at the widest part of the chains + 1.        
    Recommended:                                                              
    Number of parallel processes at the widest part of the chain + 1.         
    Optimal:                                                                  
    Number of parallel processes at the widest part of the chain + number of  
    parallel SubChains at the widest part + 1.                               
    The optimal settings just avoids a delay if several SubChains are         
    started in parallel at the same time. In case of such a Process Chain     
    implementation and using the recommended number of background processes   
    there can be a short delay at the start of each SubChain (depends on the  
    frequency of the background scheduler, in general ~1 minute only).                                                                               
    Attention: Note that a higher degree of parallel processing and           
    therefore more batch processes only make sense if the system has          
    sufficient hardware capacity.                                                                               
    I hope this helps or it may lead you to further checks to make .
    Cheers,
    Karen

  • Use of parallel processing profiles with SNP background planning

    I am using APO V5.1.
    In SNP background planning jobs I am noticing different planning results depending on whether I use a parallel processing profile or not.
    For example if I use a profile with 4 parallel processes, and I run a network heuristic to process 5 location products I get an incomplete planning answer.
    Is this expected behaviour? What are the 'good practices' for using these profiles?
    Any advise appreciated...

    Hello,
    I don't think using parallel processing profile is a good idea when you run network heuristic, since in network heuristic, the squence of the location/product is quite important. The sequence is determined by low-level code, as you may already know.
    For example, in case of external procurement, it must first plan the distribution center then the supplying plant, and in case of inhouse production, it must first plan the final product then the components.
    If you use parallel processing, the data set which is sorted by low-level code would be divided into several blocks and be processed at the same time. This may mess the planning sequence. For example, before the final product is planned in one block, the component is already planned in another block. When it plans the final product, new requirement of the component is generated, but the component will not be planned again, which results supply shortage of the component .
    If there're many location products, maybe dividing the data set manually is a good practice. You can put those related location products in one job, and set several background jobs to plan different data set.
    Best Regards,
    Ada

  • Parallel processing+execute in background

    Hi,
    We have a program which calls 4 function modules using the addition 'STARTING NEW TASK'. The main program will be scheduled to execute in background. When program is scheduled in background, since it calls 4 different function modules in separate tasks, these are assigned to dialog work process and not to the background work process as the main program is assigned.
    Since the FM code are being executed in dialog work process, we get dumps due to time-limit exceeded.
    I need to know, is there any way where we can force these FM to execute using background work process and execute in parallel. The addition 'IN BACKGROUND TASK' also executes the code in a new dialog work process and not in background work process. Any other solution other than increasing the work process run time.
    Hope you understand the problem. Please reply back if you need clarification.
    Regards,
    Sakthi.

    Hi
    Thanks for the approach and ideas.
    But I have changed all the function module calls as the ordinary calls (removed the parallel processing). The execution time taken was a bit more but it was OK.
    I tried using 'IN BACKGROUND TASK' but even this executes the FM in a dialog work process and not in a background work process. Again the possibility of time_out error.
    Also I could break this program into 4 programs but then I need to select the required data in all the 4 programs (There are >10 SELECT statements and each will pick up 16000 records).
    So thought of using one background task and do the processes sequentially.
    Thanks for the inputs.
    Regards,
    Sakthi.

  • Parallel Processing when running in background

    Hi
    We have implemented a parallel processing solution using the Call Function Starting New Task Destination in Group format to split a large number of updates across an RFC Server Group.
    This works well when running the ABAP in dialog, but when we schedule for background processing, the parallel processing does not seem to occur, we get a single background process.
    Does anyone have any ideas why this may be occuring ?
    Thanks
    Paul

    Paul,
    Starting new task will start a new LUW in dialog process and not in background. This is the reason you are having a problem. While technically STARTING NEW TASK is used for parallel processing, you need to consider whether the program will be run in foreground or background mode.
    In case of background, you need consider using multiple jobs via job open, submit, job close. This way you can initiate more than one process in your server group to do the work.
    You will need to consider the # of background WP available and the # of WPs you can use for this program.
    So if there are 100 WPs available and you can use only 10 at any give time, then you should schedule 10 jobs and then check the status of the 10 jobs before you can start scheduling the next jobs.
    You can use the FM SPBT_INITIALIZE to check the # of WPs that are currently available in the server group.
    Hope this helps.
    Thanks,
    Vikram.M

  • Parallel process(ora_pnnn)

    ps -ef|grep ora_|grep DCC로 background process를 찾아보니,
    ora_pnnn_DCC가 8개가 나오더군요.(물론, init file에 parallel_min_servers=0 , parallel_max_servers=8 로 지정되어 있습니다.)
    ora_pnnn은 parallel process이고, init file에서 parallel_min_servers와 parallelserver_idle_time값을 확인해보면 된다라고 하는데...
    현재 사용 DB가 8i 버전으로 parallel_server_idle_time이 hidden parameter가 되었더라구요... 이 hidden parameter 값 확인을 어떻게 하나요?
    한가지 더, dba_tables/dba_indexes 컬럼 중 degree값은 무엇을 의미하는 것인가요? degree > 1 인 경우, parallel process와 관련이 있는 것 같은데, 잘 모르겠습니다.
    글 수정:
    sglim79

    ps -ef|grep ora_|grep DCC로 background process를 찾아보니,
    ora_pnnn_DCC가 8개가 나오더군요.(물론, init file에
    parallel_min_servers=0 , parallel_max_servers=8 로
    지정되어 있습니다.)
    ora_pnnn은 parallel process이고, init file에서
    parallel_min_servers와 parallelserver_idle_time값을
    확인해보면 된다라고 하는데...
    현재 사용 DB가 8i 버전으로 parallel_server_idle_time이 hidden
    parameter가 되었더라구요... 이 hidden parameter 값 확인을 어떻게
    하나요?
    한가지 더, dba_tables/dba_indexes 컬럼 중 degree값은 무엇을 의미하는
    것인가요? degree > 1 인 경우, parallel process와 관련이 있는 것
    같은데, 잘 모르겠습니다.
    글 수정:
    sglim79일반적인 parameter 확인하는 것과 동일합니다.
    SQL> show parameter parallelserver_idle_time
    로 확인하시면 됩니다.
    참고로, sys user 로 접속해서 아래 sql문을 실행하면
    사용할 수 있는 hidden parameter 리스트들을 모두 확인하실 수 있습니다.
    select ksppinm
    from x$ksppi
    where substr(ksppinm,1,1) = ‘_’
    degree 값은 degree of parallelism 를 말하며
    이 값이 degree > 1 인 경우
    table에 대해 설정되어 있기 때문에
    sql문에서 parallel hint 를 설정하지 않더라도
    parallel 로 실행됩니다.
    하지만, parallel hint 를 사용하게 되면 table에 설정된
    degree of parallelism 를 override 합니다.
    아래 내용은 테이블 생성 시에 parallel_clause 사용할 때
    주의해야 될 사항입니다.
    Notes on the parallel_clause
    If table contains any columns of LOB or user-defined object type, this statement as well as subsequent INSERT, UPDATE, or DELETE operations on table are executed serially without notification. Subsequent queries, however, will be executed in parallel.
    For partitioned index-organized tables, CREATE TABLE ... AS SELECT is executed serially, as are subsequent DML operations. Subsequent queries, however, will be executed in parallel.
    A parallel hint overrides the effect of the parallel_clause.
    DML statements and CREATE TABLE ... AS SELECT statements that reference remote objects can run in parallel. However, the "remote object" must really be on a remote database. The reference cannot loop back to an object on the local database (for example, by way of a synonym on the remote database pointing back to an object on the local database).
    참고로, 테이블 생성시에 degree of parallelism 를 사용하는 건
    바람직하지 않고, 필요한 sql문에 hint 를 사용하는 것을 권장합니다.

  • 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.

  • Parallel process in process chains

    Hi All,
    I have created a process chain with two parallel jobs (for forecast run) in APO DP. whenever i'm checking it, it is showing me that <b>"Too many parallel processes for chosen server"</b>
    In the diagnosis, the message is "On the server  you have chosen, there are only 1 batch processes available. The process chain has been designed in such as way that 2 processes must be processed parallel".
    Do I need to maintain any settings.Please let me know.
    Thank you.
    Regards,
    Raj

    Hi Raj,
    What it is complaining about is that the number of batch processes(background processes) available on the system are only 1 and you have given it 2 background processes..now if the system only has 1 bckgnd process,, how will it run 2 processes ) ??
    You can check the number of background processes in SM50 and then modify the number of background processes in RZ10(start up profile)......Ask your basis guy to increase/check that???
    Thanks
    Abhi

  • Parallel Process in a Process chain design

    Hi
    BAsed on what factors can we make a decision on How many parallel data loads (process) we can include while designing a Process chains
    Thanks

    Hi Maxi,
    There is no hard and fast rule for that, for trial purpose you can add specific no. of parallel processes and schedule the chain, if there are not enough background processes available to fulfill your request then SAP will give you warning there you can see how many processes are available.
    But if you go for maximum parallel process then it actually depends on how many processes are available at the time of process chain scheduling. Though your server have enough process but if they are utilized by other processes then still you will get warning while executing process chain.
    So just check in your server how many background processes are there and then take some optimum decision.
    Regards,
    Durgesh.

  • Parallel Process Model vs Asynchrono​us Sequence

    I've been studying the features of TestStand, and learning how to use it for about a month, so still very new to the environment (although I have been using Labview and Veristand pretty heavily for about a year).  I wanted to get a little clarification on the use of the different process models, because I think I may be misunderstanding some of the terminology.  
    Here is a little background of my project:
    I have a Labview VI that I created to interface with a remote target (emulator).  I previously used the VI to run tests manually, and would like to use it as a code module in TestStand so that I can run automated tests.  I intend to use the same VI repeatedly throughout the test sequence.  The functionality of the system is dependent on maintaining constant communication with the emulator, so I can't be opening and closing the code module repeatedly.  Once it is open, it has to stay open and continually communicate  (I'm hoping I will not have to create "wrapper" code modules to be the go-between with my current VI).  Breaking communication would cause most of the test results to become invalid.  For these reasons, I had chosen to call the VI as a code module in a sub sequence so that it can be run asynchronously, outside of the main sequence.
    Now, as I learn more about the details of TestStand, I am introduced to the concept of "Process Models".  I had initially been using the default Sequential Process model, but would like to know if I should switch to the Parallel Process model.  From what I can tell, the parallel process model is used when testing multiple UUTs, or running tests in parallel.  Is this correct?  To clarify my situation, I will only be testing 1 UUT, I will only be using 1 code module, and I will be running several test steps with that 1 code module.  I will need to continually pass data back and forth with the code module as it runs in parallel to the main sequence, and there will likely be several sub sequences called during the process, so that I can maintain modularity with my testing.
    So the question is, do I switch to the Parallel Process Model, or should I continue with the Sequential Process Model and the asynchronous sequence to run my code module in parallel?  Thanks much.
    GSinMN          
    Solved!
    Go to Solution.

    Hey GSinMN,
    Are you wanting to run your test steps in parallel with each other, or will that need to be a sequential process? The Parallel model is probably not the right choice for this application. The purpose of the Parallel model is to run the same test program on multiple UUT's at once, as you mentioned. Since you are just testing with a single UUT, the best approach would be to run the emulator communication module asynchronously, as you mentioned. You can easily pass data to this code module using a TestStand queue or a similar synchronization object.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

Maybe you are looking for