VENKI

ABAP - BW

Start Routine:
The start routine is run for each data package at the start of the transformation. The start routine has a table in the format of the source structure as input and output parameters. It is used to perform preliminary calculations and store these in a global data structure or in a table. This structure or table can be accessed from other routines. You can modify or delete data in the data package.

Routine for Key Figures or Characteristics:
This routine is available as a rule type; you can define the routine as a transformation rule for a key figure or a characteristic. The input and output values depend on the selected field in the transformation rule. More information: the Routine section under

End Routine:
An end routine is a routine with a table in the target structure format as input and output parameters. You can use an end routine to postprocess data after transformation on a package-by-package basis. For example, you can delete records that are not to be updated, or perform data checks.

Expert Routine:

This type of routine is only intended for use in special cases. You can use the expert routine if there are not sufficient functions to perform a transformation. The expert routine should be used as an interim solution until the necessary functions are available in the standard routine.


ABAP-BW WIKI LINKS
https://wiki.sdn.sap.com/wiki/display/BI/ABAP+in+BW
https://wiki.sdn.sap.com/wiki/display/BI/ABAP+in+BW
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=35458
http://wiki.sdn.sap.com/wiki/display/BI/Useful+functions+for+Data+Transformation


Datasources Enhancement

LO Datasource
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0af763b-066e-2910-a784-dc6731660f46?QuickLink=index&overridelayout=true
******************************************************************************
*&---------------------------------------------------------------------*


*& Report ZBI_ACTIVATE_TRANSFORMATION

*&

*&---------------------------------------------------------------------*

*&

*&

*&---------------------------------------------------------------------*



REPORT zbi_activate_transformation.



TYPES: t_tran TYPE rstran,

i_tran TYPE STANDARD TABLE OF t_tran.



DATA: r_tran_maintain TYPE REF TO cl_rstran_maintain,

lv_subrc TYPE sy-subrc,

lv_output(255) TYPE c,

tab_tran TYPE i_tran,

i_s_source TYPE rstran_s_tlogo,

i_s_target TYPE rstran_s_tlogo.



SELECTION-SCREEN BEGIN OF BLOCK b1.

SELECTION-SCREEN SKIP 1.



PARAMETERS: p_id TYPE char35.



SELECTION-SCREEN END OF BLOCK b1.



START-OF-SELECTION.



FIELD-SYMBOLS: TYPE t_tran.



REFRESH tab_tran.



SELECT * FROM rstran INTO TABLE tab_tran WHERE tranid = p_id

AND objvers = 'A'

AND objstat = 'INA'.

SORT tab_tran.



IF tab_tran IS NOT INITIAL.

LOOP AT tab_tran ASSIGNING .

TRY.

CREATE OBJECT r_tran_maintain

EXPORTING

i_tranid = -tranid

i_s_source = i_s_source

i_s_target = i_s_target

i_expert = rs_c_false

i_mode = rsawc_c_tfc-display

i_with_message = rs_c_true.



CATCH cx_rstran_not_found .

CATCH cx_rstran_input_invalid .

CATCH cx_rstran_cancelled .

CATCH cx_rstran_not_authorized .

CATCH cx_rstran_display_only .

CATCH cx_rstran_already_exist .

CATCH cx_rstran_error_with_message.

ENDTRY.



CALL METHOD r_tran_maintain->check

EXPORTING

i_with_display = rs_c_true

IMPORTING

e_subrc = lv_subrc.



IF lv_subrc = 0.

CONCATENATE 'Activated Transformation : '

-tranid

' : '

-sourcename

'->' -targetname INTO lv_output.

ELSE.

CONCATENATE 'Transformation : '

-tranid

' : '

-sourcename

'->'

-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.

*****************************************************************************


Five Ways to Enhance BI Functionality Using ABAP--Part V--ABAP in Process Chain

http://wiki.sdn.sap.com/wiki/display/BI/Five+Ways+to+Enhance+BI+Functionality+Using+ABAP--Part+V--ABAP+in+Process+Chain?bc=true