Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SDN Contribution

Custom Process types Remote Trigger and End Time

Applies to:
SAP BW 3.1C and Above.

Summary

Development 1:
We sometimes have loads in our process chains whose status and runtime dont need to show in our
metachain. In fact, including them in the metachain may add dependencies that significantly increase overall
runtime. To overcome this performance issue, we can use a Remote Trigger custom process type.

Development 2:
To know the end time of any process chain we generally have to go in to the log view of that particular chain.
If that chain is a Metachain, then it may take some time to retrieve the log. To overcome this issue we can
use an END TIME custom process type.

By: Anil Raparthi

Company: HCL Technologies Ltd

Date: 25 April 2006

Author Bio.
Anil Raparthi is a SAP BI consultant currently working with HCL Technologies Ltd. (India). He has over
three years of experience in various BW implementation projects around the globe.

2006 SAP AG 1
Table of Contents.
Applies to: ........................................................................................................................................ 1

Summary.......................................................................................................................................... 1

Development 1:................................................................................................................................ 1

Development 2:................................................................................................................................ 1

Author Bio. ....................................................................................................................................... 1

Development Context ...................................................................................................................... 3

Development 1:................................................................................................................................ 3

Development 2:................................................................................................................................ 3

Remote Trigger:............................................................................................................................... 3

Tips: ............................................................................................................................................... 10

Disclaimer and Liability Notice....................................................................................................... 10

2006 SAP AG 2
Development Context

Development 1:
We sometimes have loads in our process chains whose status and runtime dont need to show in our
metachain. In fact, including them in the metachain may add dependencies that significantly increase our
overall runtime. To overcome this performance issue we can use a Remote Trigger custom process type.

Development 2:
To know the end time of any process chain we generally have to go into the log view of that particular chain.
If that chain is a Metachain, then it may take some time to retrieve the log. To overcome this issue we can
use an END TIME custom process type.

Tables: RSPCVARIANTT.
Development 1:

Process Type: Remote Trigger

Normally we may have few Loads where the status and time taken to complete those Loads may not be
required to reflect in our Metachain.

For example: In my Metachain, I have Master data deletion / PSA data deletion process chains which are
included as local chains. So, the success or Failure status, the Time taken for completing these loads will
obviously affect my other consecutive Loads which are after them and on the whole, the time taken to
complete my Metachain will be increased.

So, to overcome this performance issue in the process chain, we have to reduce the dependencies in the
load. This small development will really helps you out in executing the unwanted process chains out side the
Metachain.

Remote Trigger:
This particular Custom Process type will JUST execute the desired process chain immediately out side the
Metachain and the job of this process types will be completed . That means the actual status of that
particular Process chain is not reflected on this Process Type.

We have a Function Module (RSPC_CHAIN_START) which on executing with a process chain tech
name will run the PC immediately

2006 SAP AG 3
Development:

Go to RSPC TransactionSettingsMaintain Process Types

Create a Custom Process Type of type ABAP Process with a proper name Eg: Remote Trigger and also a

desired symbol which can highlight it uniquely For Example:

Now Create a Program in SE38 (Abap editor)

Abap Code: REMOTE TRIGGER ZRSPC_CHAIN_START

******SAMPLE ABAP CODE*************

REPORT ZRSPC_CHAIN_START.

data: l_logid type RSPC_LOGID.

parameters: l_chain type RSPC_CHAIN.

call function 'RSPC_CHAIN_START'

exporting

I_CHAIN = l_chain

importing

E_LOGID = l_logid.

2006 SAP AG 4
Now create the required variants for these programs

Program Name is the above abap program which execute the PC

Program variant is your desired process chain which you want to execute remotely.

2006 SAP AG 5
***Sample Usage of Remote Trigger:

Here you can see I have used our Custom Process Type Remote Trigger to execute
MC_LOAD_ASCOOMOV_ASDPCAR process chain after my PCA and COPA data get loaded BUT, my next
local chain after this load is do not depended on ASCOOMOV_ASDPCAR Load and so there is no need to
waste time till the load get completed success/failure.

So, by this way I could reduce much of the load time by removing the dependencies.

2006 SAP AG 6
Development 2:

Process Type : END TIME

Usage:

Generally to know the end time of any process chain, we have to go in to the Log view of that particular
Chain. Here if that chain is a Metachain then it may take some time to retrieve the log .

This particular development END TIME process type is a small and interesting development, which is on
triggered will over write its own text (Description) with current date and current time, through which we can
easily find the recent end date and end time of that PC directly from the planned view or check view.

Tables: RSPCVARIANTT

Create a custom process type of type Abap Process with a proper name Eg: END TIME and also a desired
symbol which can highlight it uniquely For Example:

Abap Code for ENDTIME: ZAS_ENDTIME

*************************SAMPLE ABAP CODE****************************

REPORT ZAS_ENDTIME.

tables: RSPCVARIANTT.

data: time(10) type c,date(10) type c.

data: t_RSPCVARIANTT type RSPCVARIANTT.

parameters: t_LANGU type SPRAS default 'EN',

t_VAR type RSPC_VARIANT ,

t_TYPE type RSPC_TYPE default 'ABAP',

t_OBJV type RSOBJVERS default 'A'.

select single * from RSPCVARIANTT into t_RSPCVARIANTT

where VARIANTE = t_VAR

and LANGU = t_LANGU

and TYPE = t_TYPE

and OBJVERS = t_objv.

if sy-subrc eq 0.

write sy-uzeit to time using edit mask '__:__:__'.

write sy-datum dd/mm/yyyy to date. "using edit mask 'dd/mm/yyyy'.

concatenate 'Ended On:' date 'at' time into t_RSPCVARIANTT-TXTLG separated by space.

2006 SAP AG 7
modify RSPCVARIANTT from t_RSPCVARIANTT.

endif.

***********************END OF THE CODE********************

Simple demonstration:

No text.

Program name

Variant Name

Before executing the Process chain:

2006 SAP AG 8
Text of the Variant END_TIME_TYP1 in the RSPCVARIANTT table

Process Chain:

After executing the Process chain:

Text of the Variant END_TIME_TYP1 in the RSPCVARIANTT table

Process Chain:

2006 SAP AG 9
Tips:
-> Use the technical name of the process type as the variant of the program

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
this technical article or code sample, including any liability resulting from incompatibility between the content
within this document and the materials and services offered by SAP. You agree that you will not hold, or
seek to hold, SAP responsible or liable with respect to the content of this document.

2006 SAP AG 10

You might also like