ABAP concurrent processes

 

Modern program / class design makes it necessary to be able to control the program flow using concurrent execution threads.

In typical ABAP programs there is only one execution thread. Of course another instance can be started in another thread (execution environment), but those instances are separated in a way so that it is hard to let them interact with one another.

Possibilities for concurrent process design in ABAP

  • CALL FUNCTION
    in new task
    in background taskThese expressions allow to start a new execution thread but there is no easy way to synchronize the new execution thread with other execution threads.
  • RFBKSYNCJOB SAP Report
    Synchronization of Concurrent Process Branches

    This report has two parameters that can’t be set in selection screens (normal SE38 execution).

    P_FORKID TYPE BKKD_DISPID NO-DISPLAY,
    P_CLASSN TYPE ABAP_ABSTYPENAME NO-DISPLAY.

    P_CLASSN defines a class that has to be inherited from L_CL_FORK (see below)

    The include IBKKCOND_CL_PROC defines the following local classes:

    • L_CL_FORK
    • L_CL_PROCESS

    It uses an include which defines several local classes: IBKKCOND_CL_APPL

    • L_CL_PROC_EOFD inherited from L_CL_PROCESS
    • L_CL_MASSRUN inherited from L_CL_PROCESS
    • L_CL_DISP inherited from L_CL_FORK

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.