Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Applies to:
SAP BI 7.0. For more information, visit the Business Intelligence homepage
Summary
This paper provides a code which can be used to activate inactive Transformation’s and DTP’s. SAP has
provided various programs for activating info-providers, transfer rules, etc but these two programs were
missing from the standard set of programs.
Author Bio
Arminder Singh is working as SAP BI Consultant in Accenture Services Private Ltd having extensive
experience in implementation of SAP BI projects. His expertise includes SAP BI, ABAP and Business
Objects.
Table of Contents
Overview ............................................................................................................................................................. 3
Code ............................................................................................................................................................... 3
Code to Activate Transformation: ................................................................................................................... 3
Code to Activate DTP:..................................................................................................................................... 4
Step by Step Guide............................................................................................................................................. 6
Disclaimer and Liability Notice ............................................................................................................................ 8
Overview
In SAP BI we have the choice of using various activation programs which are available as function modules,
programs or BAPI’s to activate inactive multiproviders, info-cubes, info-sets, transfer rules, etc. But for a long
time everyone felt the need of having a program for activating the Transformations and DTP’s which are not
provided as a standard from SAP.
This article provides the code to achieve the same and also a step by step guide to create a Z-program using
transaction SE38.
Code
Code to Activate Transformation:
REPORT ZTEST_ARMI_TRANS.
START-OF-SELECTION.
CATCH cx_rstran_already_exist .
CATCH cx_rstran_error_with_message .
ENDTRY.
IF lv_subrc = 0.
CONCATENATE 'Activated Transformation : ' <fs_trans>-
tranid ' : ' <fs_trans>-sourcename '->' <fs_trans>-targetname INTO lv_output.
ELSE.
CONCATENATE 'Transformation : ' <fs_trans>-tranid ' : ' <fs_trans>-
sourcename '->' <fs_trans>-targetname 'Could Not be Activated' INTO lv_output.
ENDIF.
IF lv_subrc = 0.
TRY.
CALL METHOD r_tran_maintain->execute
EXPORTING
i_wrkmode = cl_rstran_stat=>wrkmode_activate
IMPORTING
e_subrc = lv_subrc.
CATCH cx_rstran_cancelled .
CATCH cx_rstran_error_with_message .
CATCH cx_rstran_display_only .
ENDTRY.
ENDIF.
WRITE:/ lv_output.
ENDLOOP.
ELSE.
WRITE:/ 'Transformation is not Inactive'.
ENDIF.
START-OF-SELECTION.
IF lv_subrc = 0.
CONCATENATE 'Activated DTP : ' <fs_dtp>-dtp ' : ' <fs_dtp>-src '-
>' <fs_dtp>-tgt
INTO lv_output.
ELSE.
CONCATENATE 'DTP : ' <fs_dtp>-dtp ' : ' <fs_dtp>-src '->' <fs_dtp>-
tgt ' Could Not be Activated'
INTO lv_output.
ENDIF.
ENDIF.
WRITE:/ lv_output.
ENDLOOP.
ELSE.
WRITE:/ 'DTP is not Inactive'.
ENDIF.