How to retrieve parallel process info (aRFC)

Hi guys , I have a program that calls 2 RFC-enabled function modules and runs them in parallel. To my knowledge, each function modules is assigned with a unique task id when performing parallel processing.
My question is, how do I retrieve the information on the individual process such as task name and its duration?
say
call function 'Z_XXX' starting new task 'A' performing 'Z_FUNC'  on end of task.....
and
call function 'Z_XXX' starting new task 'B' performing 'Z_FUNC'  on end of task .....
then execute these functions and let it runs for a while, then how do i retrieve the task name of each process programmatically (A and B)?
sorry I'm still pretty new when it comes to ABAP
edit:-
somehow my previous question was removed along with replies
Edited by: afro100 on Aug 27, 2009 1:51 PM

Hello,
You can use following function module to get the id of transactional processing.
CALL FUNCTION 'ID_OF_BACKGROUNDTASK'
* EXPORTING
*   DEST          = ' '
* IMPORTING
*   TID           =  --> collect ID from this varaible
*   FNUM          =
and for reteriving status you can use:
CALL FUNCTION 'STATUS_OF_BACKGROUNDTASK'
  EXPORTING
    tid                 =
  tables
    errortab            =
* EXCEPTIONS
*   COMMUNICATION       = 1
*   RECORDED            = 2
*   ROLLBACK            = 3
*   OTHERS              = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this helps!
Thanks,
Augustin.

Similar Messages

  • Parallel processing using arfc.

    Hi experts,
    Does any have a presntation on how to proceed with parallel processing with ARFC?
    Thanks in Advance.

    look at the piece of code ....
    FORM start_onhand_extract_task .
      DO.
        IF g_num_running < g_avail_wps.
          EXIT.
        ENDIF.
        WAIT UP TO 5 SECONDS.
      ENDDO.
    Creating the file name with task number
      ADD 1 TO g_task_num.
      CONCATENATE p_file1 g_task_num INTO g_task_name.
      CONCATENATE g_filename g_task_name  INTO task_tab-filename1.
      CONDENSE task_tab-filename1 NO-GAPS.
      task_tab-task_name    = g_task_name.
      APPEND task_tab.
      CLEAR g_msg_text.
      CALL FUNCTION 'ZMIO_GET_MARD_DATA'
        STARTING NEW TASK g_task_name
        DESTINATION IN GROUP p_grp
        PERFORMING decrease_wp ON END OF TASK
        EXPORTING
          i_filename = task_tab-filename1
        TABLES
          i_matnr    = r_matnr
          i_werks    = r_werks.
      CASE sy-subrc.
        WHEN 0.
          ADD 1 TO g_num_running.
          g_num_submitted = g_num_submitted + 1.
        WHEN 1.
          error_rec-task_name    = g_task_name.
          error_rec-filename1    = task_tab-filename1.
          APPEND error_rec.
          APPEND it_exp_t001w TO it_err_t001w.
          ADD 1 TO g_num_err.
          g_hold_num = g_num_running.
          WAIT UNTIL g_num_running < g_hold_num OR
                     g_hold_num = 0
                     UP TO 5 SECONDS.
        WHEN OTHERS.
          error_rec-task_name    = g_task_name.
          error_rec-filename1    = task_tab-filename1..
          error_rec-msg_text     = g_msg_text.
          APPEND error_rec.
          APPEND it_exp_t001w TO it_err_t001w.
          ADD 1 TO g_num_err.
      ENDCASE.
    ENDFORM.                    " start_onhand_extract_task

  • How to do parallel processing with dynamic internal table

    Hi All,
    I need to implement parallel processing that involves dynamically created internal tables. I tried doing so using RFC function modules (using starting new task and other such methods) but didn't get success this requires RFC enabled function modules and at the same time RFC enabled function modules do not allow generic data type (STANDARD TABLE) which is needed for passing dynamic internal tables. My exact requirement is as follows:
    1. I've large chunk of data in two internal tables, one of them is formed dynamically and hence it's structure is not known at the time of coding.
    2. This data has to be processed together to generate another internal table, whose structure is pre-defined. But this data processing is taking very long time as the number of records are close to a million.
    3. I need to divide the dynamic internal table into (say) 1000 records each and pass to a function module and submit it to run in another task. Many such tasks will be executed in parallel.
    4. The function module running in parallel can insert the processed data into a database table and the main program can access it from there.
    Unfortunately, due to the limitation of not allowing generic data types in RFC, I'm unable to do this. Does anyone has any idea how to implement parallel processing using dynamic internal tables in these type of conditions.
    Any help will be highly appreciated.
    Thanks and regards,
    Ashin

    try the below code...
      DATA: w_subrc TYPE sy-subrc.
      DATA: w_infty(5) TYPE  c.
      data: w_string type string.
      FIELD-SYMBOLS: <f1> TYPE table.
      FIELD-SYMBOLS: <f1_wa> TYPE ANY.
      DATA: ref_tab TYPE REF TO data.
      CONCATENATE 'P' infty INTO w_infty.
      CREATE DATA ref_tab TYPE STANDARD TABLE OF (w_infty).
      ASSIGN ref_tab->* TO <f1>.
    * Create dynamic work area
      CREATE DATA ref_tab TYPE (w_infty).
      ASSIGN ref_tab->* TO <f1_wa>.
      IF begda IS INITIAL.
        begda = '18000101'.
      ENDIF.
      IF endda IS INITIAL.
        endda = '99991231'.
      ENDIF.
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = pernr
          infty           = infty
          begda           = '18000101'
          endda           = '99991231'
        IMPORTING
          subrc           = w_subrc
        TABLES
          infty_tab       = <f1>
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        subrc = w_subrc.
      ELSE.
      ENDIF.

  • How to retrieve security question info...

    How to retrieve security question info if I have deleted the original recovery email. I go to change password, get stopped at security questionnaire, I do not have the recovery email. Is there a way I can reset the "security question info" recovery email?

    1. See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities.
    2. Here are two different but direct methods:
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contacting Apple for support
            and service.
    3. For other queries about Apple ID see Frequently asked questions about Apple ID.
    4. Rescue email address and how to reset Apple ID security questions

  • How to achieve parallel processing in a single request?

    Hi all,
    I have a method in a Session EJB that will perform some business logic before it returns an answer to the client. The logic it will perform is to collect data from the applications database and two external systems, before sending all data to a third external system to get a response and send it back to the client. Each external system is quite slow so I would like to do all the collecting of data concurrent, parallel processing. How should I handle this? I'm not allowed to create my own threads in EJB's. Can I use MDB in some way? To the calling client this should be a synchronous call...
    Greatfull for any suggestions
    Cheers
    Anders =)

    Usually, the request is received by a component located in the web container, such as by an HTTP request (including Web Services). This component is able to start threads to allow parallel processing. Now, if for some reason the request arrives directly at EJB level and that you cannot move its receiver to web component, I think JMS is not a viable solution because you will switch to asynchronous processing and you have no way to make your EJB wait for the responses while preserving the client request (waiting implies programmatic life cycle management, which is forbidden in EJB container). Maybe a resource adapter (JCA) can bring a solution. A resource adapter acts as a datasource (a datasource is a specialization of a resource adapter) and thus it is a logical way to implement an adapter to an external, eventually non-J2EE, resource, as the name implies :) But I don't have enough knowledge in JCA to be sure of this.
    Hope it helps.
    Bruno Collet
    http://www.practicalsoftwarearchitect.com

  • How to monitor parallel processing

    Hi All,
    I have 2 short questions:
    1. When we want parallel processing, we can either use a parallel hing in the query, or alter a table to be parrallel. My question is what is the difference in the following 2 syntax:
    a. ALTER TABLE myTable PARALLEL (DEGREE 3);
    b. ALTER TABLE myTable PARALLEL 3;
    Does the "DEGREE" keywor make any difference? or they both are same statements?
    2. When we enable parallel processing, how can we monitor oracle processes, to confirm that a certain table is being actually processed by multiple threads of a singe user process?
    An early response would be highly appreciated. Thanks.

    user566817 wrote:
    2. When we enable parallel processing, how can we monitor oracle processes, to confirm that a certain table is being actually processed by multiple threads of a singe user process?There are a number of virtual performance views that can be used. Please refer to the Oracle® Database Reference guide for details on these.
    Had a look though my scripts and I have this one.. cannot recall if I "borrowed" it from somewhere and customised it and how old it is.. but it should (hopefully) still be mostly correct. It uses the virtual view v$px_process to determine the list of current PQ slaves in the pool and if they are used, map them to the Oracle session using them.
    select  distinct
            x.server_name           as "PQ",
            x.status                as "Status",
            x.sid                   as "OraPID",
            w2.sid                  as "Parent OraPID",
            v.osuser                as "O/S User",
            v.schemaname            as "User",
            w1.event                as "Child Wait",
            w2.event                as "Parent Wait"
    from    v$px_process    x,
            v$lock          l,
            v$session       v,
            v$session_wait w1,
            v$session_wait w2
    where   x.sid =! l.sid(+)
    and     to_number (substr(x.server_name,3)) = l.id2(+)
    and     x.sid = w1.sid(+)
    and     l.sid = w2.sid(+)
    and     x.sid = v.sid(+)
    and     nvl(l.type,'PS') = 'PS'Use at own risk - best would be to verify that this is still valid using the Reference Guide. Or create similar ones using the available V$ views for the details you want to see (e.g. SQL statement executed per PQ, etc).

  • How to manage parallel processing for queue JMS/MDB?

    Hello, we are developing a system in WebLogic Server 10g (10.3.0) that contains multiple JMS queues associated with each in an MDB. We need know how manage the parallelism of the message for each queue? for example:
    Queue 1: up to 4 messages in parallel
    Queue 2: up to 2 messages in parallel
    Queue 3: up to 5 messages in parallel
    Can also perform this configuration from the WebLogic Server Admin Console?
    Thank you very much,
    Lucas.

    Thanks a lot Tom for the reply, I have read about the descriptor setting 'max-beans-in-free-pool' and I searched this concept at the Administration Console without success.
    I suppose other way is create a “Session Pools” under the JMSServer, and then create a “Consumer” and define the setting “Messages Maximum”. One of the disadvantages is that “Session Pools” don’t support JTA, from the documentation:
    +Session pools enable an application to process messages concurrently. Session pools are now used rarely, as they are not a required part of the J2EE specification, do not support JTA user transactions, and are largely superseded by message-driven beans (MDBs), which are a required part of the J2EE specification.+
    I continue reading the MDB chapter of the performance and tuning guide in the documentation, thanks for any contribution to the topic.
    Lucas.

  • How to enable Parallelism process in 10.1.0.5 database

    Hi All,
    We have oracle database 10.1.0.5 running in windows 2003 server.
    I am trying to enable parallelism process in the database by including the following init parameters
    PARALLEL_AUTOMATIC_TUNING
    PARALLEL_SERVER
    PARALLEL_MIN_SERVERS
    PARALLEL_MAX_SERVERS
    But while i am trying to bring the database i am getting an error message like these parameter has been deprecated.
    Could anyone help me to enable parallel process in 10g database.
    Thanks in advance.
    Regards
    Aruna

    >
    I am trying to enable parallelism process in the database by including the following init parameters
    PARALLEL_AUTOMATIC_TUNING
    PARALLEL_SERVER
    PARALLEL_MIN_SERVERS
    PARALLEL_MAX_SERVERS
    But while i am trying to bring the database i am getting an error message like these parameter has been deprecated.
    >
    PARALLEL_AUTOMATIC_TUNING is deprecated since 10g. It's always true now. PARALLEL_SERVER is related to OPS (prior to RAC) and long time deprecated.
    You enable parallel query with an ALTER TABLE statement like
    SQL> ALTER TABLE SALES PARALLEL;or with a hint like
    SQL> select /*+ parallel(sales) */ * from sales;Kind regards
    Uwe
    http://uhesse.wordpress.com

  • How to retrieve GP process context data by GP API

    How can I retrivev the context data of GP process instance by using GP API, just like the funtionality in GP Monitor?

    Hi,
    Please check these links
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/01754e5ba20c4be10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/bd/996642c4764454e10000000a1550b0/content.htm
    Thanks and Regards,
    Prabhakar Dharmala

  • How to implement parallel processing in oracle.

    Hi Gurus,
    In one our procedures we are calling 7 procedures internally. We want to execute them parallely insted of sequentially.
    Please help me to resolve this issue.
    thanks in advance...

    Hi,
    You have dbms_job package in Oracle 9i and dbms_scheduler from Oracle 10g.
    Though you can run all these procedures parallel submitting via dbms_job, any exception/error out in any of these procedures need to be handled explicitly. Just be aware that once you submit these jobs, your application loses control of the execution and you have to build a whole infrastructure for rerun in case of an exception(log/exception tables, monitoring application to periodically check the exception tables, alerts from procedures in case of an exception and so on ...)
    It's going to become more complex if you have any dependencies between these procedures.

  • Accessing internals: how to retrieve connection count info

    Hi,
    I'm wondering if it is somehow possible to get the actual state of the Toplink JPA pool, i.e. how many connections are in the pool, how many are active etc.
    I was unfortunately not abel to figure out how to access this information, ie. the same thing which was possible with jdbc:
    org.apache.commons.dbcp.BasicDataSource.getNumActive();
    org.apache.commons.dbcp.BasicDataSource.getNumIdle();
    Would be helpful to monitor the state of the pool and how many connections are currently opened to the db.
    thanks
    erich

    Erich,
    In JavaSE where the TopLink connection pool is most commonly used the following should work for you:
            Server server = ((EntityManagerImpl) getEntityManager()).getServerSession();
            int numWrite = server.getDefaultConnectionPool().getTotalNumberOfConnections();
            int numRead = server.getReadConnectionPool().getTotalNumberOfConnections();Doug

  • How to retrieve  users info

    does anyone Knows how to retrieve the users info.
    for example if I want to create a LOV that contains the emails of all the users.
    thanks in advance.

    Retrieve them using and LDAP Search via DBMS_LDAP. Or you could cheat and search the ODS schema tables directly which contain all of the LDAP info. See the DS_ATTRSTORE table. Pull all attributes with a name like "mail"

  • Parallel processing of the IDOCs through the program RBDAPP01

    Hello All,
    We are prcoessing the inbound IDOCS using the program RBDAPP01 by scheduling but this processing is taking lot of time to process the IDOCs.
    Please let me know how do we improove the performance of this program RBDAPP01 by making use of
    parallel processing of IDOCS?I read some documentation in this forum but not understand clearly.
    Please give some info regarding this who have already done this requirement earlier.
    Regards
    Mahesh

    Hi,
    Thanks a lot for your quick reply just by giving the package size it will initiate parallel processing?
    in our partner profiles we have setting to trigger through back ground only.
    How to use parallel processing tab in the selection screen of the program RBDAPP01?
    Regards
    Mahesh

  • Parallel process Before Remote client copy

    i m going to perform remote client copy from production to sandbox how to enable parallel processing before that .
    and its is hugh client and i want to do it fast can i start it in Foreground and if yes what parameter i have to set to what value to do it in foreground

    Hi,
    As far as i know there is no tcode where you can set parallel processing, you can just select remote cleit copy or local client copy this methods have parallel processing .
    Regards,
    Vamshi.

  • Parallel Processing Issue : call function starting new task

    Hi
    I am using the parallel processing functionality using the call function new task  destination in group default  Performing    on end of task  inside a loop ( i am splitting the internal table )
    However when i am debugging the code, i am able to see the function module( it opens a new session in debugging ) ,  and i see that new task is started after the RFC Function module is executed .
    How is this parallel processing ? I mean the new task starts after control returns back to main program , after the execution of the RFC FM.
    I thought the idea was to have the same FM executing in multi threads. So that time is saved.

    Thanks for the answers.
    There were too many  complications in the 'call function in new task '  option.
    So we are trying it with the job submit option. So we are splitting up the data into smaller tables and submiting it with this statement : Submit  'prog' with selection-table 's_sel' via job 'job' and return .
    Thanks

Maybe you are looking for

  • Use a g-Raid for DLNA playback?

    Not sure if this is the right forum for this topic, but here it goes.  I currently have an OLD Win XP used as a home server to store lots of photos and video. The short story is that I'm thinking of making the switch from my current laptop to a Macbo

  • Cannot get to old site designed on iWeb '08 via iWeb '09

    Hi there. I recently upgraded to Leopard and iWeb '09. I had previously designed some webpages using iWeb '08 (or possibly '07) which have been dormant for a while and I now want to take offline and revise. The pages were hosted at web.mac.com/leight

  • How to update my xperia ray to lollipop

    My phone is very hanged . How to update my phone to lollipop 5.0

  • Importing CSV files into Multiple Tables in One Database

     I have a web based solution using Microsoft SharePoint and SQL Server that is created to centralize dat collection and reporting of program metrics used in montly reviews. A person from each program enters dat manual or by pushing the data using aut

  • How do i Increase the number albums displayed in iTunes 11 currently only showing 5

    How do i Increase the number albums displayed in iTunes 11 currently only showing 5 in iTunes 10 it showed ten. With only five albums showing in a line at one time it takes a long time to look at my collection. In the previous version you could alter