Blogs

List of Scheduled Process Chains in SAP BW
Uday Pothireddy 
Business Card
Company: BW Consultant
Posted on Nov. 18, 2009 11:33 PM in ABAP, Enterprise Data Warehousing/Business Warehouse

Subscribe.Subscribe
Print. Print
Permalink Permalink
Share
Overview

In SAP BW, there is no simple and straight forward way to get a list of scheduled Process chains. The program discussed in this blog will give you a list of scheduled process chains and their respective schedule start date and time.

Laborious way

Let us look at the lengthy process to get the name, date and time for each process chain job you find in SM37.

 

1. In SM37, find jobs with job name 'BI_PROCESS_TRIGGER' and Job status 'Released'

2. Double click on a job to see job details that contain scheduled date and time

image

 

3. Click the image button to go to Step Overiew

image

 

4. Select the step line and use menu path Goto - Variant

image

 

5. Here you see the Process Chain name

image

 

6. This process is very lengthy and has to be repeated for each process chain

Simple Approach

All the technical details we need come from two tables

  • Table TBTCO: Job Status Overview Table (Job scheduled Date and Time)
  • Table TBTCP: Background Job Step Overview (Program name and Variant)
  • Function module RS_VARIANT_CONTENTS provides details of the Variant
  • The details of the variant include name of Process chain and start process
Program

Here is a simple program to display some basic details

REPORT  ZBI_SCH_PROCESS_CHAINS.

TYPES: BEGIN OF l_s_scheduled,
       chain      TYPE rspc_chain,
       sdlstrtdt  TYPE tbtco-sdlstrtdt,
       sdlstrttm  TYPE tbtco-sdlstrttm,
       jobname    TYPE tbtco-jobname,
       jobcount   TYPE tbtco-jobcount,
       progname   TYPE tbtcp-progname,
       variant    TYPE tbtcp-variant,
  END OF l_s_scheduled.

DATA: l_t_scheduled TYPE STANDARD TABLE OF l_s_scheduled,
      l_t_valtab    TYPE STANDARD TABLE OF rsparams,
      l_w_valtab    TYPE rsparams.

FIELD-SYMBOLS    <l_f_scheduled> TYPE l_s_scheduled.

SELECT a~jobname a~jobcount a~sdlstrtdt a~sdlstrttm b~progname b~variant
INTO CORRESPONDING FIELDS OF TABLE l_t_scheduled
   FROM tbtco AS a JOIN tbtcp AS b
              ON a~jobname = b~jobname AND
                 a~jobcount = b~jobcount
WHERE a~jobname = 'BI_PROCESS_TRIGGER' AND
      a~status = 'S'. "Scheduled

SORT l_t_scheduled BY sdlstrtdt sdlstrttm ASCENDING.

WRITE :/ 'Chain Name               ', '|' ,'Start Date', '|', 'Start Time'.

ULINE.
LOOP AT l_t_scheduled ASSIGNING <l_f_scheduled>.
  REFRESH l_t_valtab.
  CALL FUNCTION 'RS_VARIANT_CONTENTS'
    EXPORTING
      report               = <l_f_scheduled>-progname
      variant              = <l_f_scheduled>-variant
    TABLES
      valutab             = l_t_valtab
    EXCEPTIONS
      variant_non_existent = 1
      variant_obsolete       = 2
      OTHERS                   = 3.
  IF sy-subrc = 0.
    READ TABLE l_t_valtab INTO l_w_valtab
    WITH KEY selname = 'CHAIN'.
    IF sy-subrc = 0.
      <l_f_scheduled>-chain = l_w_valtab-low.
    ENDIF.

    WRITE :/ <l_f_scheduled>-chain, '|', <l_f_scheduled>-sdlstrtdt, '|' , <l_f_scheduled>-sdlstrttm.
  ENDIF.
ENDLOOP.
ULINE.

Result

The Result of this program looks like below

image

You can enhance the report with other fields that are available in tables TBTCO and TBTCP.

Uday Pothireddy   is a Principal SAP BW Consultant currently helping a major public sector company with BW HR Implementation


Comment on this articleWould love to hear back if this is useful or any other smart ways of achieving this.
Comment on this weblog
Showing messages 1 through 7 of 7.

Titles Only Main Topics Oldest First

  • Process chain run times
    2009-12-12 04:46:32 Jim Spath Business Card [Reply]

    We use an enterprise scheduler (CA AutoSys) to start process chains, so already know when they start (or are supposed to start), when they fail, and how long they run.


    What has been challenging to view are how many are running at any one time. I put together a slightly flawed graphic with data pulled from the same place that ST03 displays. I posted that logic on the SCN wiki code snippets area: Analyzing BW Process Chain Run Times. Surprisingly, this worked in 3.5 and in 7.0.


    Jim

  • Transaction RSPCM
    2009-12-07 09:03:38 Vijayasarathy Ravichandran Business Card [Reply]

    Another alternative we use,
    We maintain all our process chains in RSPCM. This would let us know when a process chain last ran
  • Another alternative: CPS
    2009-11-27 07:04:21 Anton Goselink Business Card [Reply]

    Hi,


    Another alternative could be to use SAP Central Process Scheduling (CPS).
    CPS allows you not only to run regular SAP jobs and process chains in all your SAP systems, but it can also monitor SM36/37 jobs and BI process chains that are not started by CPS at all.
    For BI chains, it will automatically show all processes of the same chain in a hierarchy to indicate what belongs together.
    Especially if you need to monitor multiple SAP systems, or multiple types of jobs at the same time, this can be very helpful.


    Regards,


    Anton.

  • Alternative
    2009-11-19 01:23:00 Stefan Witteck Business Card [Reply]

    Hi there,


    at least in BI7 you have the transaction RSM37 which does pretty much the same.

    • Alternative
      2009-11-19 05:34:14 Uday Pothireddy Business Card [Reply]

      Hi Stefan,
      Thanks for your comment and details. After looking at RSM37, I agree that it is a better way of getting this information. I am also not sure if RSM37 is available in 3.X.


      Thanks,
      Uday


Showing messages 1 through 7 of 7.