Show TOC

 Implementing Your Own Process TypeLocate this document in the navigation structure

Purpose

If you:

  • write your own application log to be displayed in the Process tab strip for the Logs for a Process in Process Chain Maintenance, or:
  • have implemented your own monitor, or
  • have implemented a Customizing interface that goes beyond the parameters of a program, or
  • want to access preceding chain processes in your program, or
  • want to take errors when executing your program in modeling into consideration or are aware of multiple end states (see process type Decisions)

we recommend implementing your own process type.

Prerequisites

Good working knowledge of the ABAP object-orientated language enhancement, see ABAP Objects.

Process Flow
  1. In the SAP menu, choose Tools → ABAP Workbench → Development → Class Builder. Define a class here and implement the interfaces that you need.
    Note

    For more information about the class builder, see Class Builder.

    In the class builder itself, you can find documentation about the IF_RSPC_* interfaces. Enter the name of the interface as the Object Type and choose Display. You can access the documentation in the subsequent screen using the Goto menu.

    The following IF_RSPC_* interfaces are available:

    Interface IF_RSPC_*

    Description

    Method is called in ...

    Implementation is ....

    EXECUTE

    Executes the process.

    This interface is the main interface used to implement your own process type and is the only process chain maintenance interface that is obligatory.

    Note that a non-initial instance and a status must be returned in the EXECUTE method. Otherwise the process terminates with an error during execution.

    Runtime

    Obligatory

    GET_INFO

    Passes information about a process to the successor.

    Maintenance and runtime

    Optional

    GET_LOG

    Returns the log for a variant and an instance to the process chain maintenance, either as a title and text or as a list of messages

    Runtime and log view

    Optional

    MAINTAIN

    Enables process variants to be created and maintained in the process chain maintenance. It also determines the header information for a variant so that it can be displayed in the process chain maintenance.

    Maintenance

    Alternative or in addition to interface IF_RSPC_GET_VARIANT

    GET_VARIANT

    Provides input help (F4) for variants.

    You need to implement this interface and/or interface IF_RSPC_MAINTAIN, in order to be able to add process variants to a chain.

    Maintenance

    Alternative or in addition to interface IF_RSPC_MAINTAIN

    GET_DEFAULT_CHAIN

    Indicates the default chain for a process. For each variant to be scheduled, you can propose which additional processes it would make sense to schedule before or after the process.

    Maintenance

    Optional

    CHECK

    Consistency check at scheduling time for the process/chain

    You can carry out a check to determine:

    • the consistency of a process
    • dependencies with regard to other processes in the same chain and
    • dependencies with regard to other processes in other chains
    • authorizations of current user to execute process

    Maintenance

    Optional

    GET_STATUS

    We recommend implementing this interface for distributed processes. With distributed processes, such as loading processes, a number of different work processes are involved in the relevant tasks.

    The interface allows you to request the status of the instance in the process chain maintenance(for distributed processes when follow-on events are not sent). This makes it possible to recognize terminations in distributed tasks as well.

    Runtime and log view

    Optional

    CALL_MONITOR

    Calls up the process monitor from the log view in the process chain maintenance.

    Log view

    Optional

    TRANSPORT

    Returns TLOGO entry.

    Maintenance

    Optional

    CONTEXTMENU

    Adds functions to the context menu for a process in the process chain maintenance.

    Maintenance

    Optional

    VARIABLES

    Declares whether the process can process runtime variables

    Runtime

    Optional

    SIMULATION

    Passes on and displays the simulation result

    Runtime

    Optional

    MULTI_EVENT

    Declares the possible end states of the process

    Maintenance and runtime

    Optional

     

  2. Enter the process type under Settings → Maintain Process Types (RSPROCESSTYPES view) in the process chain maintenance transaction.

    To do this, choose Edit → New Entries, enter a technical name, short and long description for the process type, enter the name of your class and choose ABAP-OO Class as the Object Type. Make the other settings for your process type and save the entry.

    See also:

    Maintenance of Process Types

  3. If using service class CL_RSPC_APPL_LOG, enter your process type as a sub-object to log object BW_PROCESS.
Result

Your process is available in process chain maintenance for the process category you assigned.