SlideShare ist ein Scribd-Unternehmen logo
1 von 49
Downloaden Sie, um offline zu lesen
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
How to Write Start Routine in
Update Rules, Transformations
and How to Debug the Routines
Applies to:
SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BW 3.5/SAP BI 7.X. For more
information, visit the EDW homepage
Summary
This Article tells about, “How to write a Start Routine in Update Rules, Transformations and How to Debug
the Routines”. Here I taken one example i.e., needs to delete the unwanted data in Start Routine of Update
Rules/Transformations based on Customer number.
Author: Surendra Kumar Reddy Koduru
Company: ITC Infotech India Ltd. (Bangalore/INDIA)
Created on: 20 June 2011
Author Bio
Surendra Kumar Reddy Koduru is a SAP BI Lead Consultant currently working with ITC Infotech India
Ltd (Bangalore/INDIA). He has got rich experience and worked on various BW/BI
Implementation/Support Projects and he is the author for various Articles and Blogs (SAP-BW/BI) in
SAP Community Network.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Table of Contents
How to Write a Start Routine in Update Rules: ..................................................................................................3
Introduction: ........................................................................................................................................................3
Live Scenario: .....................................................................................................................................................3
InfoCube Details:.............................................................................................................................................3
Create Start Routine: ......................................................................................................................................4
Code before Start Routine: .............................................................................................................................5
Code After Start Routine:................................................................................................................................6
Data Loading:..................................................................................................................................................9
Monitor the Data Load:..................................................................................................................................10
Request Details:............................................................................................................................................12
Display Data in InfoCube: .............................................................................................................................13
Data in PSA : .............................................................................................................................................................13
Data in Source Flat File: ............................................................................................................................................14
How to Debug the Start Routine in Update Rules: ...........................................................................................14
Change Start Routine:...................................................................................................................................14
Data Loading:................................................................................................................................................16
InfoPackage Settings:................................................................................................................................................16
Monitor the Data Load:..................................................................................................................................17
Manual Update/Simulation:...........................................................................................................................18
Debugger Window:........................................................................................................................................19
Our Code:......................................................................................................................................................19
Data Package:...............................................................................................................................................20
How to Write Start Routine in Transformations: ...............................................................................................22
Introduction: ......................................................................................................................................................22
Live Scenario: ...............................................................................................................................................22
InfoCube Details:...........................................................................................................................................22
Create Start Routine: ....................................................................................................................................23
Code Before Start Routine:...........................................................................................................................24
Code After Start Routine:..............................................................................................................................27
Data Loading:................................................................................................................................................31
Monitor the Data Load:..................................................................................................................................33
Request Details:............................................................................................................................................36
Display Data in InfoCube: .............................................................................................................................37
Data in PSA: ..............................................................................................................................................................37
Data in Source Flat File: ............................................................................................................................................38
How to Debug Start Routine in Transformations:.............................................................................................38
Introduction: ......................................................................................................................................................38
Live Scenario: ...............................................................................................................................................38
Change Start Routine:...................................................................................................................................38
Data Loading:................................................................................................................................................40
InfoPackage Settings:................................................................................................................................................40
Monitor the Data Load:..................................................................................................................................41
DTP and Settings for Debug: ........................................................................................................................42
Debugger Window:........................................................................................................................................45
Related Content................................................................................................................................................48
Disclaimer and Liability Notice..........................................................................................................................49
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
How to Write a Start Routine in Update Rules:
Introduction:
“How to write a Start Routine in Update Rules”. Here I taken one example i.e., needs to delete the unwanted
data in Start Routine of Update Rules based on Customer number.
Live Scenario:
We are loading the data to InfoCube, the Source system is Flat File (the logic, code and execution is same
for even any SAP Source systems also) and we need to delete the unwanted records/data in Update rules at
the time of data loads based on some Customer numbers.
InfoCube Details:
See the below screens, which will give the details of the InfoCube ZIC_DEMO2.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Note: I taken ZIC_DEMO2 InfoCube, which is having just simple Transfer rules and Update Rules (in BW 3.5)
Create Start Routine:
Click on Create Start Routine like below.
It opens the below code window.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
Code before Start Routine:
PROGRAM UPDATE_ROUTINE.
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
*$*$ end of global - insert your declaration only before this line *-*
* The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CSZIS_DEMO2.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
*$*$ begin of routine - insert your code only below this line *-*
* fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
* to make monitor entries
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
*$*$ end of routine - insert your code only before this line *-*
*
ENDFORM.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Code After Start Routine:
Write the below code in code window, here I written Customer is equal to 000000C100 or C100, because
0CUSTOMER length is 10 and so if record will come with or without leading zeros the code will work.
PROGRAM UPDATE_ROUTINE.
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
*$*$ end of global - insert your declaration only before this line *-*
* The follow definition is new in the BW3.x
TYPES:
BEGIN OF DATA_PACKAGE_STRUCTURE.
INCLUDE STRUCTURE /BIC/CSZIS_DEMO2.
TYPES:
RECNO LIKE sy-tabix,
END OF DATA_PACKAGE_STRUCTURE.
DATA:
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
WITH HEADER LINE
WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
FORM startup
TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring
MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
DATA_PACKAGE STRUCTURE DATA_PACKAGE
USING RECORD_ALL LIKE SY-TABIX
SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
*
*$*$ begin of routine - insert your code only below this line *-*
* fill the internal tables "MONITOR" and/or "MONITOR_RECNO",
* to make monitor entries
***Start Rt, Begin****Surendra Kumar Reddy Koduru*******
DATA: WA_DATA_PACKAGE LIKE DATA_PACKAGE,
ZINDEX LIKE SY-TABIX.
LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE.
CLEAR ZINDEX.
ZINDEX = SY-TABIX.
If WA_DATA_PACKAGE-CUSTOMER = '000000C100' OR
WA_DATA_PACKAGE-CUSTOMER = 'C100' OR
WA_DATA_PACKAGE-CUSTOMER = '000000C101' OR
WA_DATA_PACKAGE-CUSTOMER = 'C101' OR
WA_DATA_PACKAGE-CUSTOMER = '000000C102' OR
WA_DATA_PACKAGE-CUSTOMER = 'C102' OR
WA_DATA_PACKAGE-CUSTOMER = '000000C103' OR
WA_DATA_PACKAGE-CUSTOMER = 'C103'.
DELETE DATA_PACKAGE INDEX ZINDEX.
CONTINUE.
ENDIF.
ENDLOOP.
***Start Rt, End******Surendra Kumar Reddy Koduru*******
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
*$*$ end of routine - insert your code only before this line *-*
*
ENDFORM.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
After that Check the Syntax then Save, and come back.
In above screen, you can fine the message called No Syntax Errors Found.
So our code is correct and now we can Save, Activate the Update Rules.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Data Loading:
After activation, load the data form Flat File.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10
Monitor the Data Load:
After Load, go to Monitor, see the below screen.
See the number of records; in Flat file we have only Five records, so it is displaying only Five records.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 11
Click on Header Tab and then click on Termination if records occur…, see below screen.
It opens the detailed window about the status of records updating, see below screen, totally we have 5
records in Flat file and 5 sent and 5 received, PSA got 5 records, but finally updated only One record in
InfoCube, because Start Routine in Update rules worked properly.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 12
Request Details:
See the Request in InfoCube using Manage
In above screen, we can find One request with 5 Transferred and 1 Added records.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 13
Display Data in InfoCube:
See the Data In the InfoCube using Display Data
See one single record which is Customer = C104, other records are deleted.
Data in PSA :
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 14
Data in Source Flat File:
How to Debug the Start Routine in Update Rules:
Change Start Routine:
Click on Change Start Routine like below.
It opens the below code window like below, keep break point i.e. BREAK-POINT.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 15
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 16
Data Loading:
InfoPackage Settings:
See the above screen, Open the InfoPackage and then go to Processing Tab and then choose Only PSA.
The reason is after PSA Load we will load the data into InfoCube, in between we will debug the Start
Routine.
After PSA Settings then open Schedule tab and then Start Data Loading.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 17
Monitor the Data Load:
After Load, go to Monitor, see the below screen.
See the number of records; in Flat file we have only Five records, so it is displaying only Five records.
In addition that you can see the Process Manually, because we loaded up to PSA.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 18
Manual Update/Simulation:
Open Details Tab and select the Data Package 1 and right Click and Choose Simulate Update.
Select the Activate Debugging in Update Rules, because we written Start Routine in Update Rules and click
on Perform Simulation button.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 19
Debugger Window:
It opens the debugging window like below.
Press F7, till it will reach our Code.
Our Code:
See our code and BREAK-POINT, from now onwards press F5, it will go line by line.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 20
Data Package:
Double click on DATA_PACKAGE, it will come and appear in Right side, see below screen.
Double click on Small Icon before DATA_PACKAGE in right side, it will show the actual Data in that Data
Package like below.
Click on Desktop1 tab and then press F5, it will debug line by line.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 21
We have 5 records in Flat File, so it deleted all 4 records which will satisfy our Condition in Start Routine and
the rest of the records i.e. only one will appear in DATA PACKAGE, see below screen.
Then press F8.
Close the above window it will display the details of the records updated. After that Load data manually from
PSA to InfoCube then see the Request/Data in InfoCube.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 22
How to Write Start Routine in Transformations:
Introduction:
“How to write a Start Routine in Transformations”. Here I took one example i.e., needs to delete the
unwanted data in Start Routine of Transformations based on Customer number.
Live Scenario:
We are loading the data to InfoCube, the Source system is Flat File (the logic, code and execution is same
for even any SAP Source systems also) and we need to delete the unwanted records/data in
Transformations at the time of data loads based on some Customer numbers.
InfoCube Details:
See the below screens, which will give the details of the InfoCube ZIC_DEMO1.
Note: I had taken ZIC_DEMO1 InfoCube, which is having just simple Transformations.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 23
Create Start Routine:
Click on Start Routine like below.
It opens the below code window.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 24
Code Before Start Routine:
PROGRAM trans_routine.
*---------------------------------------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
* Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
* Available information: Refer to methods of
* interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
* Rule specific types
TYPES:
BEGIN OF _ty_s_SC_1,
* Field: MATERIAL Material.
MATERIAL TYPE C LENGTH 18,
* Field: PLANT Plant.
PLANT TYPE C LENGTH 4,
* Field: CUSTOMER Customer.
CUSTOMER TYPE C LENGTH 10,
* Field: CALDAY Calendar Day.
CALDAY TYPE D,
* Field: AMOUNT Amount.
AMOUNT TYPE P LENGTH 9 DECIMALS 2,
* Field: CURRENCY.
CURRENCY TYPE C LENGTH 5,
* Field: QUANT_B Qty in OUn.
QUANT_B TYPE P LENGTH 9 DECIMALS 3,
* Field: BASE_UOM.
BASE_UOM TYPE C LENGTH 3,
* Field: RECORD Record Number.
RECORD TYPE RSARECORD,
END OF _ty_s_SC_1.
TYPES:
_ty_t_SC_1 TYPE STANDARD TABLE OF _ty_s_SC_1
WITH NON-UNIQUE DEFAULT KEY.
*$*$ begin of global - insert your declaration only below this line *-*
... "insert your code here
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 25
*$*$ end of global - insert your declaration only before this line *-*
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type _ty_t_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
*$*$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
*$*$ end of 2nd part global - insert your code only before this line *
*---------------------------------------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.
*----------------------------------------------------------------------*
* Method start_routine
*----------------------------------------------------------------------*
* Calculation of source package via start routine
*----------------------------------------------------------------------*
* <-> source package
*----------------------------------------------------------------------*
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE _ty_s_SC_1.
DATA:
MONITOR_REC TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line *-*
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 26
... "insert your code here
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
* raise exception type CX_RSROUT_ABORT.
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "start_routine
*----------------------------------------------------------------------*
* Method inverse_start_routine
*----------------------------------------------------------------------*
*
* This subroutine needs to be implemented only for direct access
* (for better performance) and for the Report/Report Interface
* (drill through).
* The inverse routine should transform a projection and
* a selection for the target to a projection and a selection
* for the source, respectively.
* If the implementation remains empty all fields are filled and
* all values are selected.
*
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
METHOD inverse_start_routine.
*$*$ begin of inverse routine - insert your code only below this line*-*
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*
ENDMETHOD. "inverse_start_routine
ENDCLASS. "routine IMPLEMENTATION
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 27
Code After Start Routine:
Write the below code in code window, here I written Customer is equal to 000000C100 or C100, because
0CUSTOMER length is 10 and so if record will come with or without leading zeros the code will work.
PROGRAM trans_routine.
*---------------------------------------------------------------------*
* CLASS routine DEFINITION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
* Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
* Available information: Refer to methods of
* interface 'if_rsbk_request_admintab_view'
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 28
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
* Rule specific types
TYPES:
BEGIN OF _ty_s_SC_1,
* Field: MATERIAL Material.
MATERIAL TYPE C LENGTH 18,
* Field: PLANT Plant.
PLANT TYPE C LENGTH 4,
* Field: CUSTOMER Customer.
CUSTOMER TYPE C LENGTH 10,
* Field: CALDAY Calendar Day.
CALDAY TYPE D,
* Field: AMOUNT Amount.
AMOUNT TYPE P LENGTH 9 DECIMALS 2,
* Field: CURRENCY.
CURRENCY TYPE C LENGTH 5,
* Field: QUANT_B Qty in OUn.
QUANT_B TYPE P LENGTH 9 DECIMALS 3,
* Field: BASE_UOM.
BASE_UOM TYPE C LENGTH 3,
* Field: RECORD Record Number.
RECORD TYPE RSARECORD,
END OF _ty_s_SC_1.
TYPES:
_ty_t_SC_1 TYPE STANDARD TABLE OF _ty_s_SC_1
WITH NON-UNIQUE DEFAULT KEY.
*$*$ begin of global - insert your declaration only below this line *-*
... "insert your code here
*$*$ end of global - insert your declaration only before this line *-*
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type _ty_t_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 29
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
*$*$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
*$*$ end of 2nd part global - insert your code only before this line *
*---------------------------------------------------------------------*
* CLASS routine IMPLEMENTATION
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
CLASS lcl_transform IMPLEMENTATION.
*----------------------------------------------------------------------*
* Method start_routine
*----------------------------------------------------------------------*
* Calculation of source package via start routine
*----------------------------------------------------------------------*
* <-> source package
*----------------------------------------------------------------------*
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE _ty_s_SC_1.
DATA:
MONITOR_REC TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line *-*
... "insert your code here
************Begin of Start Rt**Surendra Kumar Reddy Koduru**************
DATA : WA_SOURCE_PACKAGE TYPE _ty_s_SC_1,
ZINDEX LIKE SY-TABIX.
LOOP AT SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
CLEAR ZINDEX.
ZINDEX = SY-TABIX.
If WA_SOURCE_PACKAGE-CUSTOMER = '000000C100' OR
WA_SOURCE_PACKAGE-CUSTOMER = 'C100' OR
WA_SOURCE_PACKAGE-CUSTOMER = '000000C101' OR
WA_SOURCE_PACKAGE-CUSTOMER = 'C101' OR
WA_SOURCE_PACKAGE-CUSTOMER = '000000C102' OR
WA_SOURCE_PACKAGE-CUSTOMER = 'C102' OR
WA_SOURCE_PACKAGE-CUSTOMER = '000000C103' OR
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 30
WA_SOURCE_PACKAGE-CUSTOMER = 'C103'.
DELETE SOURCE_PACKAGE INDEX ZINDEX.
CONTINUE.
ENDIF.
ENDLOOP.
************End of Start Rt**Surendra Kumar Reddy Koduru****************
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
* raise exception type CX_RSROUT_ABORT.
*$*$ end of routine - insert your code only before this line *-*
ENDMETHOD. "start_routine
*----------------------------------------------------------------------*
* Method inverse_start_routine
*----------------------------------------------------------------------*
*
* This subroutine needs to be implemented only for direct access
* (for better performance) and for the Report/Report Interface
* (drill through).
* The inverse routine should transform a projection and
* a selection for the target to a projection and a selection
* for the source, respectively.
* If the implementation remains empty all fields are filled and
* all values are selected.
*
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
METHOD inverse_start_routine.
*$*$ begin of inverse routine - insert your code only below this line*-*
... "insert your code here
*$*$ end of inverse routine - insert your code only before this line *-*
ENDMETHOD. "inverse_start_routine
ENDCLASS. "routine IMPLEMENTATION
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 31
After that Check the Syntax then Save, and come back.
So our code is correct and now we can Save, Activate the Transformations.
Data Loading:
After activation, load the data form Flat File.
We are working in BI 7.X, so there are only Transformations in between DataSource and InfoSource (in this
example). So in BI 7.X once you create Transformations and DTP, InfoPackage is only used to load the data
up to PSA, after that we need to use DTP (to load the data from PSA to Data Targets).
In below InfoPackage, see the Processing Tab and Data Targets Tab.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 32
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 33
Monitor the Data Load:
After Load, go to Monitor, see the below screen.
See the number of records; in Flat file we have only Five records, so it is displaying only Five records.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 34
See the above screen, the data is loaded only up to PSA, from there we need to execute DTP to load the
data into InfoCube.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 35
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 36
Request Details:
See the Request in InfoCube using Manage.
In above screen, we can find One request with 5 Transferred and 1 Added records.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 37
Display Data in InfoCube:
See the Data In the InfoCube using Display Data
See one single record which is Customer = C104, other records are deleted.
Data in PSA:
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 38
Data in Source Flat File:
How to Debug Start Routine in Transformations:
Introduction:
“How to Debug the Start Routine in Transformations”, before this article you please reads/go through the
content called “How to Write a Start Routine in Transformations”. Here I taken one example i.e., needs to
delete the unwanted data in Start Routine of Transformations based on Customer number and we will debug
the same
Live Scenario:
We are loading the data to InfoCube, the Source system is Flat File (the logic, code and execution is same
for even any SAP Source systems also) and we need to delete the unwanted records/data in
Transformations at the time of data loads based on some Customer numbers. So in scenario we will how to
debug the start routine Transformations.
Change Start Routine:
Click on Change Start Routine like below.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 39
It opens the below code window like below, keep break point i.e. BREAK-POINT.
In above screen, you can see the code that we written in “How to write Start Routine in
Transformations”. Check the Syntax Check, Save and Activate the Transformations.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 40
Data Loading:
InfoPackage Settings:
After activation, load the data form Flat File.
We are working in BI 7.X, so there are only Transformations in between DataSource and InfoSource (in this
example). So in BI 7.X once you create Transformations and DTP, InfoPackage is only used to load the data
up to PSA, after that we need to use DTP (to load the data from PSA to Data Targets).
In below InfoPackage, see the Processing Tab and Data Targets Tab.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 41
After PSA Settings then open Schedule tab and then Start Data Loading.
Monitor the Data Load:
After Load, go to Monitor, see the below screen.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 42
See the number of records; in Flat file we have only five records, so it is displaying only five records.
DTP and Settings for Debug:
See the above screen, the data is loaded only up to PSA, from there we need to execute DTP to load the
data into InfoCube.
Here we are trying to Debug the Start Routine, so we need to set some settings in DTP, right click on DTP
and select Change and go to Execute Tab give Processing Mode is equal to Serially in the Dialog Process
(for Debugging).
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 43
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 44
After above settings to DTP, then simulate.
Once you click on Simulate button then it will open the Debug screen, and it will go to our Code there we put
BREAK-POINT, then press F5 for line by line debug.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 45
Debugger Window:
Press F5 till the Break Point indicator cross the line ZINDEX = SY-TABIX, after that double click on
SOURCE_PACKAGE, it will show in Right Side under Variable. See the below screen.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 46
Double click on SOURCE_PACKAGE , and then see the original data in that.
Then click on Desktop 1 and then Press F5 for 3 to 4 times and then again see the data in
SOURCE_PACKAGE.
First record is deleted, because it satisfied our condition in Start Routine i.e. Customer = C100, so it is
deleted.
So like that you click on Desktop 1 and then press F5, till it completes the 5 cycles i.e. it need to come out
from Loop condition. After 4
th
Cycle , if you see the data in SOURCE_PACKAGE, you can find only one
record.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 47
After that Press F8 it will come out from Debug and show the below screen, in this way we can debug.
After the above Simulation, you remove the BREAK-POINT in Start Routine, Save and Activate the
Transformations.
And Execute the DTP, it will load the data to InfoCube and then check the Request and Data in InfoCube.
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 48
Related Content
For all Articles and Blogs by Surendra Kumar Reddy, Please visit this URL
Using Customer Exit Variables in BW Reports Part - 5
Using Customer Exit Variables in BW Reports Part - 6
Using Customer Exit Variables in BW Reports: Part - 8
Using Customer Exit Variables in BW Reports: Part - 9
Using Customer Exit Variables in BW Reports: Part - 10
Using Customer Exit Variables in BW Reports: Part - 11
Using Customer Exit Variables in BW Reports: Part - 12
Using Customer Exit Variables in BW Reports: Part - 13
Using Customer Exit Variables in BW Reports: Part - 14
Using Customer Exit Variables in BW Reports: Part - 15
Using Customer Exit Variables in BW Reports: Part - 16
Using Customer Exit Variables in BW Reports: Part - 17
Using Customer Exit Variables in BW Reports: Part - 18
Using Text Variables with Customer Exits in Report Headings
Using Text Variables with Customer Exits in Report Headings
Variables of Type Customer Exit
For more information, visit the EDW homepage
How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 49
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.

Weitere ähnliche Inhalte

Was ist angesagt?

Lo extraction – part 5 sales and distribution (sd) datasource overview
Lo extraction – part 5  sales and distribution (sd) datasource overviewLo extraction – part 5  sales and distribution (sd) datasource overview
Lo extraction – part 5 sales and distribution (sd) datasource overview
JNTU University
 
Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0
gireesho
 
Line item dimension and high cardinality dimension
Line item dimension and high cardinality dimensionLine item dimension and high cardinality dimension
Line item dimension and high cardinality dimension
Praveen Kumar
 
Lo extraction part 7 enhancements
Lo extraction   part 7 enhancementsLo extraction   part 7 enhancements
Lo extraction part 7 enhancements
JNTU University
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
Hicham Khallouki
 
How to create generic delta
How to create generic deltaHow to create generic delta
How to create generic delta
Jacques Kalees
 
Lo extraction part 2 database update logic
Lo extraction   part 2 database update logicLo extraction   part 2 database update logic
Lo extraction part 2 database update logic
JNTU University
 
Lo extraction part 3 extractor logic
Lo extraction   part 3 extractor logicLo extraction   part 3 extractor logic
Lo extraction part 3 extractor logic
JNTU University
 
Rda step by step
Rda   step by stepRda   step by step
Rda step by step
Phani Kumar
 
Errors in process chains
Errors in process chainsErrors in process chains
Errors in process chains
Siva Kollipara
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2
dejavee
 

Was ist angesagt? (20)

Lo extraction – part 5 sales and distribution (sd) datasource overview
Lo extraction – part 5  sales and distribution (sd) datasource overviewLo extraction – part 5  sales and distribution (sd) datasource overview
Lo extraction – part 5 sales and distribution (sd) datasource overview
 
BW Adjusting settings and monitoring data loads
BW Adjusting settings and monitoring data loadsBW Adjusting settings and monitoring data loads
BW Adjusting settings and monitoring data loads
 
Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0
 
Line item dimension and high cardinality dimension
Line item dimension and high cardinality dimensionLine item dimension and high cardinality dimension
Line item dimension and high cardinality dimension
 
Extractioncockpit
Extractioncockpit Extractioncockpit
Extractioncockpit
 
Lo extraction part 7 enhancements
Lo extraction   part 7 enhancementsLo extraction   part 7 enhancements
Lo extraction part 7 enhancements
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
 
How to run v3 job
How to run v3 jobHow to run v3 job
How to run v3 job
 
How to create generic delta
How to create generic deltaHow to create generic delta
How to create generic delta
 
Lo extraction part 2 database update logic
Lo extraction   part 2 database update logicLo extraction   part 2 database update logic
Lo extraction part 2 database update logic
 
Usgage of ABAP in BI
Usgage of ABAP in BIUsgage of ABAP in BI
Usgage of ABAP in BI
 
Lo extraction part 3 extractor logic
Lo extraction   part 3 extractor logicLo extraction   part 3 extractor logic
Lo extraction part 3 extractor logic
 
Rda step by step
Rda   step by stepRda   step by step
Rda step by step
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bw
 
Sap bw4 hana
Sap bw4 hanaSap bw4 hana
Sap bw4 hana
 
Errors in process chains
Errors in process chainsErrors in process chains
Errors in process chains
 
Find out userexits in sap
Find out userexits in sapFind out userexits in sap
Find out userexits in sap
 
Beginner's guide create a custom 'copy' planning function type
Beginner's guide  create a custom 'copy' planning function typeBeginner's guide  create a custom 'copy' planning function type
Beginner's guide create a custom 'copy' planning function type
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2
 
Analysis for office training
Analysis for office   trainingAnalysis for office   training
Analysis for office training
 

Andere mochten auch

Analysis process designer (apd) part 1
Analysis process designer (apd) part   1Analysis process designer (apd) part   1
Analysis process designer (apd) part 1
dejavee
 
Sap business intelligence 4.0 report basic
Sap business intelligence 4.0   report basicSap business intelligence 4.0   report basic
Sap business intelligence 4.0 report basic
tovetrivel
 
Variables in sap bi
Variables in sap biVariables in sap bi
Variables in sap bi
shabari76
 
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
tovetrivel
 
Day 6.4 extraction__lo
Day 6.4 extraction__loDay 6.4 extraction__lo
Day 6.4 extraction__lo
tovetrivel
 
Day 02 sap_bi_overview_and_terminology
Day 02 sap_bi_overview_and_terminologyDay 02 sap_bi_overview_and_terminology
Day 02 sap_bi_overview_and_terminology
tovetrivel
 
Day 6.3 extraction_business_content_and_generic
Day 6.3 extraction_business_content_and_genericDay 6.3 extraction_business_content_and_generic
Day 6.3 extraction_business_content_and_generic
tovetrivel
 
Extractions and performance monitoring
Extractions and performance monitoringExtractions and performance monitoring
Extractions and performance monitoring
JNTU University
 

Andere mochten auch (14)

Analysis process designer (apd) part 1
Analysis process designer (apd) part   1Analysis process designer (apd) part   1
Analysis process designer (apd) part 1
 
Lab3
Lab3Lab3
Lab3
 
Lab1
Lab1Lab1
Lab1
 
Sap business intelligence 4.0 report basic
Sap business intelligence 4.0   report basicSap business intelligence 4.0   report basic
Sap business intelligence 4.0 report basic
 
Dso job log and activation parameters
Dso job log and activation parametersDso job log and activation parameters
Dso job log and activation parameters
 
Variables in sap bi
Variables in sap biVariables in sap bi
Variables in sap bi
 
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
Day 9 __10_introduction_to_bi_enterprise_reporting_1___2
 
Day 6.4 extraction__lo
Day 6.4 extraction__loDay 6.4 extraction__lo
Day 6.4 extraction__lo
 
Day 02 sap_bi_overview_and_terminology
Day 02 sap_bi_overview_and_terminologyDay 02 sap_bi_overview_and_terminology
Day 02 sap_bi_overview_and_terminology
 
Modeling
ModelingModeling
Modeling
 
Day 6.3 extraction_business_content_and_generic
Day 6.3 extraction_business_content_and_genericDay 6.3 extraction_business_content_and_generic
Day 6.3 extraction_business_content_and_generic
 
Extractions and performance monitoring
Extractions and performance monitoringExtractions and performance monitoring
Extractions and performance monitoring
 
Extractors sapr3
Extractors sapr3Extractors sapr3
Extractors sapr3
 
Field symbols
Field symbolsField symbols
Field symbols
 

Ähnlich wie Bw writing routines in update rules

Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
Kranthi Kumar
 
feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...
feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...
feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...
SekarbaluChandru
 
Journals SAP BPC 7
Journals SAP BPC 7Journals SAP BPC 7
Journals SAP BPC 7
khalimail
 
sap-co-configuration
sap-co-configurationsap-co-configuration
sap-co-configuration
Mohd Rehan
 
Planning guide sap business suite 7 2013 landscape implementation
Planning guide sap business suite 7 2013  landscape implementationPlanning guide sap business suite 7 2013  landscape implementation
Planning guide sap business suite 7 2013 landscape implementation
Leonardo Parpal Roig
 

Ähnlich wie Bw writing routines in update rules (20)

Master guide-ehp6for erp6.0-ehp3fornw7.0
Master guide-ehp6for erp6.0-ehp3fornw7.0Master guide-ehp6for erp6.0-ehp3fornw7.0
Master guide-ehp6for erp6.0-ehp3fornw7.0
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...
feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...
feismo.com-business-blueprint-how-to-prepare-pr_02141c3fe1e0be68c2c03bbdb5161...
 
Journals SAP BPC 7
Journals SAP BPC 7Journals SAP BPC 7
Journals SAP BPC 7
 
sap-co-configuration
sap-co-configurationsap-co-configuration
sap-co-configuration
 
BPC Configuration and User Guide Ver 10.0
BPC Configuration and User Guide Ver 10.0BPC Configuration and User Guide Ver 10.0
BPC Configuration and User Guide Ver 10.0
 
Electronic bank statement mt940 format
Electronic bank statement mt940 formatElectronic bank statement mt940 format
Electronic bank statement mt940 format
 
Bank Reconsiliation Configuration
Bank Reconsiliation Configuration Bank Reconsiliation Configuration
Bank Reconsiliation Configuration
 
CATS Approval.pdf
CATS Approval.pdfCATS Approval.pdf
CATS Approval.pdf
 
SAP Treasury
SAP TreasurySAP Treasury
SAP Treasury
 
TibcoBW6.0
TibcoBW6.0TibcoBW6.0
TibcoBW6.0
 
Planning guide sap business suite 7 2013 landscape implementation
Planning guide sap business suite 7 2013  landscape implementationPlanning guide sap business suite 7 2013  landscape implementation
Planning guide sap business suite 7 2013 landscape implementation
 
Bte
BteBte
Bte
 
Bte
BteBte
Bte
 
SAP Quickviewer
SAP QuickviewerSAP Quickviewer
SAP Quickviewer
 
Trigger bi process chain from ecc
Trigger bi process chain from eccTrigger bi process chain from ecc
Trigger bi process chain from ecc
 
Magento extension-developers-guide-v1.0
Magento extension-developers-guide-v1.0Magento extension-developers-guide-v1.0
Magento extension-developers-guide-v1.0
 
199 sap-co-configuration-guide
199 sap-co-configuration-guide199 sap-co-configuration-guide
199 sap-co-configuration-guide
 
SAP CO CONFIGURATION
SAP CO CONFIGURATIONSAP CO CONFIGURATION
SAP CO CONFIGURATION
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Bw writing routines in update rules

  • 1. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines Applies to: SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BW 3.5/SAP BI 7.X. For more information, visit the EDW homepage Summary This Article tells about, “How to write a Start Routine in Update Rules, Transformations and How to Debug the Routines”. Here I taken one example i.e., needs to delete the unwanted data in Start Routine of Update Rules/Transformations based on Customer number. Author: Surendra Kumar Reddy Koduru Company: ITC Infotech India Ltd. (Bangalore/INDIA) Created on: 20 June 2011 Author Bio Surendra Kumar Reddy Koduru is a SAP BI Lead Consultant currently working with ITC Infotech India Ltd (Bangalore/INDIA). He has got rich experience and worked on various BW/BI Implementation/Support Projects and he is the author for various Articles and Blogs (SAP-BW/BI) in SAP Community Network.
  • 2. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 2 Table of Contents How to Write a Start Routine in Update Rules: ..................................................................................................3 Introduction: ........................................................................................................................................................3 Live Scenario: .....................................................................................................................................................3 InfoCube Details:.............................................................................................................................................3 Create Start Routine: ......................................................................................................................................4 Code before Start Routine: .............................................................................................................................5 Code After Start Routine:................................................................................................................................6 Data Loading:..................................................................................................................................................9 Monitor the Data Load:..................................................................................................................................10 Request Details:............................................................................................................................................12 Display Data in InfoCube: .............................................................................................................................13 Data in PSA : .............................................................................................................................................................13 Data in Source Flat File: ............................................................................................................................................14 How to Debug the Start Routine in Update Rules: ...........................................................................................14 Change Start Routine:...................................................................................................................................14 Data Loading:................................................................................................................................................16 InfoPackage Settings:................................................................................................................................................16 Monitor the Data Load:..................................................................................................................................17 Manual Update/Simulation:...........................................................................................................................18 Debugger Window:........................................................................................................................................19 Our Code:......................................................................................................................................................19 Data Package:...............................................................................................................................................20 How to Write Start Routine in Transformations: ...............................................................................................22 Introduction: ......................................................................................................................................................22 Live Scenario: ...............................................................................................................................................22 InfoCube Details:...........................................................................................................................................22 Create Start Routine: ....................................................................................................................................23 Code Before Start Routine:...........................................................................................................................24 Code After Start Routine:..............................................................................................................................27 Data Loading:................................................................................................................................................31 Monitor the Data Load:..................................................................................................................................33 Request Details:............................................................................................................................................36 Display Data in InfoCube: .............................................................................................................................37 Data in PSA: ..............................................................................................................................................................37 Data in Source Flat File: ............................................................................................................................................38 How to Debug Start Routine in Transformations:.............................................................................................38 Introduction: ......................................................................................................................................................38 Live Scenario: ...............................................................................................................................................38 Change Start Routine:...................................................................................................................................38 Data Loading:................................................................................................................................................40 InfoPackage Settings:................................................................................................................................................40 Monitor the Data Load:..................................................................................................................................41 DTP and Settings for Debug: ........................................................................................................................42 Debugger Window:........................................................................................................................................45 Related Content................................................................................................................................................48 Disclaimer and Liability Notice..........................................................................................................................49
  • 3. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 3 How to Write a Start Routine in Update Rules: Introduction: “How to write a Start Routine in Update Rules”. Here I taken one example i.e., needs to delete the unwanted data in Start Routine of Update Rules based on Customer number. Live Scenario: We are loading the data to InfoCube, the Source system is Flat File (the logic, code and execution is same for even any SAP Source systems also) and we need to delete the unwanted records/data in Update rules at the time of data loads based on some Customer numbers. InfoCube Details: See the below screens, which will give the details of the InfoCube ZIC_DEMO2.
  • 4. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 4 Note: I taken ZIC_DEMO2 InfoCube, which is having just simple Transfer rules and Update Rules (in BW 3.5) Create Start Routine: Click on Create Start Routine like below. It opens the below code window.
  • 5. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 5 Code before Start Routine: PROGRAM UPDATE_ROUTINE. *$*$ begin of global - insert your declaration only below this line *-* * TABLES: ... * DATA: ... *$*$ end of global - insert your declaration only before this line *-* * The follow definition is new in the BW3.x TYPES: BEGIN OF DATA_PACKAGE_STRUCTURE. INCLUDE STRUCTURE /BIC/CSZIS_DEMO2. TYPES: RECNO LIKE sy-tabix, END OF DATA_PACKAGE_STRUCTURE. DATA: DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE WITH HEADER LINE WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0. FORM startup TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n DATA_PACKAGE STRUCTURE DATA_PACKAGE USING RECORD_ALL LIKE SY-TABIX SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update * *$*$ begin of routine - insert your code only below this line *-* * fill the internal tables "MONITOR" and/or "MONITOR_RECNO", * to make monitor entries * if abort is not equal zero, the update process will be canceled ABORT = 0. *$*$ end of routine - insert your code only before this line *-* * ENDFORM.
  • 6. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 6 Code After Start Routine: Write the below code in code window, here I written Customer is equal to 000000C100 or C100, because 0CUSTOMER length is 10 and so if record will come with or without leading zeros the code will work. PROGRAM UPDATE_ROUTINE. *$*$ begin of global - insert your declaration only below this line *-* * TABLES: ... * DATA: ... *$*$ end of global - insert your declaration only before this line *-* * The follow definition is new in the BW3.x TYPES: BEGIN OF DATA_PACKAGE_STRUCTURE. INCLUDE STRUCTURE /BIC/CSZIS_DEMO2. TYPES: RECNO LIKE sy-tabix, END OF DATA_PACKAGE_STRUCTURE. DATA:
  • 7. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 7 DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE WITH HEADER LINE WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0. FORM startup TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n DATA_PACKAGE STRUCTURE DATA_PACKAGE USING RECORD_ALL LIKE SY-TABIX SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update * *$*$ begin of routine - insert your code only below this line *-* * fill the internal tables "MONITOR" and/or "MONITOR_RECNO", * to make monitor entries ***Start Rt, Begin****Surendra Kumar Reddy Koduru******* DATA: WA_DATA_PACKAGE LIKE DATA_PACKAGE, ZINDEX LIKE SY-TABIX. LOOP AT DATA_PACKAGE INTO WA_DATA_PACKAGE. CLEAR ZINDEX. ZINDEX = SY-TABIX. If WA_DATA_PACKAGE-CUSTOMER = '000000C100' OR WA_DATA_PACKAGE-CUSTOMER = 'C100' OR WA_DATA_PACKAGE-CUSTOMER = '000000C101' OR WA_DATA_PACKAGE-CUSTOMER = 'C101' OR WA_DATA_PACKAGE-CUSTOMER = '000000C102' OR WA_DATA_PACKAGE-CUSTOMER = 'C102' OR WA_DATA_PACKAGE-CUSTOMER = '000000C103' OR WA_DATA_PACKAGE-CUSTOMER = 'C103'. DELETE DATA_PACKAGE INDEX ZINDEX. CONTINUE. ENDIF. ENDLOOP. ***Start Rt, End******Surendra Kumar Reddy Koduru******* * if abort is not equal zero, the update process will be canceled ABORT = 0. *$*$ end of routine - insert your code only before this line *-* * ENDFORM.
  • 8. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 8 After that Check the Syntax then Save, and come back. In above screen, you can fine the message called No Syntax Errors Found. So our code is correct and now we can Save, Activate the Update Rules.
  • 9. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 9 Data Loading: After activation, load the data form Flat File.
  • 10. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 10 Monitor the Data Load: After Load, go to Monitor, see the below screen. See the number of records; in Flat file we have only Five records, so it is displaying only Five records.
  • 11. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 11 Click on Header Tab and then click on Termination if records occur…, see below screen. It opens the detailed window about the status of records updating, see below screen, totally we have 5 records in Flat file and 5 sent and 5 received, PSA got 5 records, but finally updated only One record in InfoCube, because Start Routine in Update rules worked properly.
  • 12. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 12 Request Details: See the Request in InfoCube using Manage In above screen, we can find One request with 5 Transferred and 1 Added records.
  • 13. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 13 Display Data in InfoCube: See the Data In the InfoCube using Display Data See one single record which is Customer = C104, other records are deleted. Data in PSA :
  • 14. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 14 Data in Source Flat File: How to Debug the Start Routine in Update Rules: Change Start Routine: Click on Change Start Routine like below. It opens the below code window like below, keep break point i.e. BREAK-POINT.
  • 15. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 15
  • 16. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 16 Data Loading: InfoPackage Settings: See the above screen, Open the InfoPackage and then go to Processing Tab and then choose Only PSA. The reason is after PSA Load we will load the data into InfoCube, in between we will debug the Start Routine. After PSA Settings then open Schedule tab and then Start Data Loading.
  • 17. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 17 Monitor the Data Load: After Load, go to Monitor, see the below screen. See the number of records; in Flat file we have only Five records, so it is displaying only Five records. In addition that you can see the Process Manually, because we loaded up to PSA.
  • 18. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 18 Manual Update/Simulation: Open Details Tab and select the Data Package 1 and right Click and Choose Simulate Update. Select the Activate Debugging in Update Rules, because we written Start Routine in Update Rules and click on Perform Simulation button.
  • 19. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 19 Debugger Window: It opens the debugging window like below. Press F7, till it will reach our Code. Our Code: See our code and BREAK-POINT, from now onwards press F5, it will go line by line.
  • 20. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 20 Data Package: Double click on DATA_PACKAGE, it will come and appear in Right side, see below screen. Double click on Small Icon before DATA_PACKAGE in right side, it will show the actual Data in that Data Package like below. Click on Desktop1 tab and then press F5, it will debug line by line.
  • 21. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 21 We have 5 records in Flat File, so it deleted all 4 records which will satisfy our Condition in Start Routine and the rest of the records i.e. only one will appear in DATA PACKAGE, see below screen. Then press F8. Close the above window it will display the details of the records updated. After that Load data manually from PSA to InfoCube then see the Request/Data in InfoCube.
  • 22. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 22 How to Write Start Routine in Transformations: Introduction: “How to write a Start Routine in Transformations”. Here I took one example i.e., needs to delete the unwanted data in Start Routine of Transformations based on Customer number. Live Scenario: We are loading the data to InfoCube, the Source system is Flat File (the logic, code and execution is same for even any SAP Source systems also) and we need to delete the unwanted records/data in Transformations at the time of data loads based on some Customer numbers. InfoCube Details: See the below screens, which will give the details of the InfoCube ZIC_DEMO1. Note: I had taken ZIC_DEMO1 InfoCube, which is having just simple Transformations.
  • 23. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 23 Create Start Routine: Click on Start Routine like below. It opens the below code window.
  • 24. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 24 Code Before Start Routine: PROGRAM trans_routine. *---------------------------------------------------------------------* * CLASS routine DEFINITION *---------------------------------------------------------------------* * *---------------------------------------------------------------------* CLASS lcl_transform DEFINITION. PUBLIC SECTION. * Attributs DATA: p_check_master_data_exist TYPE RSODSOCHECKONLY READ-ONLY, *- Instance for getting request runtime attributs; * Available information: Refer to methods of * interface 'if_rsbk_request_admintab_view' p_r_request TYPE REF TO if_rsbk_request_admintab_view READ-ONLY. PRIVATE SECTION. TYPE-POOLS: rsd, rstr. * Rule specific types TYPES: BEGIN OF _ty_s_SC_1, * Field: MATERIAL Material. MATERIAL TYPE C LENGTH 18, * Field: PLANT Plant. PLANT TYPE C LENGTH 4, * Field: CUSTOMER Customer. CUSTOMER TYPE C LENGTH 10, * Field: CALDAY Calendar Day. CALDAY TYPE D, * Field: AMOUNT Amount. AMOUNT TYPE P LENGTH 9 DECIMALS 2, * Field: CURRENCY. CURRENCY TYPE C LENGTH 5, * Field: QUANT_B Qty in OUn. QUANT_B TYPE P LENGTH 9 DECIMALS 3, * Field: BASE_UOM. BASE_UOM TYPE C LENGTH 3, * Field: RECORD Record Number. RECORD TYPE RSARECORD, END OF _ty_s_SC_1. TYPES: _ty_t_SC_1 TYPE STANDARD TABLE OF _ty_s_SC_1 WITH NON-UNIQUE DEFAULT KEY. *$*$ begin of global - insert your declaration only below this line *-* ... "insert your code here
  • 25. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 25 *$*$ end of global - insert your declaration only before this line *-* METHODS start_routine IMPORTING request type rsrequest datapackid type rsdatapid EXPORTING monitor type rstr_ty_t_monitors CHANGING SOURCE_PACKAGE type _ty_t_SC_1 RAISING cx_rsrout_abort. METHODS inverse_start_routine IMPORTING i_th_fields_outbound TYPE rstran_t_field_inv i_r_selset_outbound TYPE REF TO cl_rsmds_set i_is_main_selection TYPE rs_bool i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set i_r_universe_inbound TYPE REF TO cl_rsmds_universe CHANGING c_th_fields_inbound TYPE rstran_t_field_inv c_r_selset_inbound TYPE REF TO cl_rsmds_set c_exact TYPE rs_bool. ENDCLASS. "routine DEFINITION *$*$ begin of 2nd part global - insert your code only below this line * ... "insert your code here *$*$ end of 2nd part global - insert your code only before this line * *---------------------------------------------------------------------* * CLASS routine IMPLEMENTATION *---------------------------------------------------------------------* * *---------------------------------------------------------------------* CLASS lcl_transform IMPLEMENTATION. *----------------------------------------------------------------------* * Method start_routine *----------------------------------------------------------------------* * Calculation of source package via start routine *----------------------------------------------------------------------* * <-> source package *----------------------------------------------------------------------* METHOD start_routine. *=== Segments === FIELD-SYMBOLS: <SOURCE_FIELDS> TYPE _ty_s_SC_1. DATA: MONITOR_REC TYPE rstmonitor. *$*$ begin of routine - insert your code only below this line *-*
  • 26. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 26 ... "insert your code here *-- fill table "MONITOR" with values of structure "MONITOR_REC" *- to make monitor entries ... "to cancel the update process * raise exception type CX_RSROUT_ABORT. *$*$ end of routine - insert your code only before this line *-* ENDMETHOD. "start_routine *----------------------------------------------------------------------* * Method inverse_start_routine *----------------------------------------------------------------------* * * This subroutine needs to be implemented only for direct access * (for better performance) and for the Report/Report Interface * (drill through). * The inverse routine should transform a projection and * a selection for the target to a projection and a selection * for the source, respectively. * If the implementation remains empty all fields are filled and * all values are selected. * *----------------------------------------------------------------------* * *----------------------------------------------------------------------* METHOD inverse_start_routine. *$*$ begin of inverse routine - insert your code only below this line*-* ... "insert your code here *$*$ end of inverse routine - insert your code only before this line *-* ENDMETHOD. "inverse_start_routine ENDCLASS. "routine IMPLEMENTATION
  • 27. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 27 Code After Start Routine: Write the below code in code window, here I written Customer is equal to 000000C100 or C100, because 0CUSTOMER length is 10 and so if record will come with or without leading zeros the code will work. PROGRAM trans_routine. *---------------------------------------------------------------------* * CLASS routine DEFINITION *---------------------------------------------------------------------* * *---------------------------------------------------------------------* CLASS lcl_transform DEFINITION. PUBLIC SECTION. * Attributs DATA: p_check_master_data_exist TYPE RSODSOCHECKONLY READ-ONLY, *- Instance for getting request runtime attributs; * Available information: Refer to methods of * interface 'if_rsbk_request_admintab_view'
  • 28. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 28 p_r_request TYPE REF TO if_rsbk_request_admintab_view READ-ONLY. PRIVATE SECTION. TYPE-POOLS: rsd, rstr. * Rule specific types TYPES: BEGIN OF _ty_s_SC_1, * Field: MATERIAL Material. MATERIAL TYPE C LENGTH 18, * Field: PLANT Plant. PLANT TYPE C LENGTH 4, * Field: CUSTOMER Customer. CUSTOMER TYPE C LENGTH 10, * Field: CALDAY Calendar Day. CALDAY TYPE D, * Field: AMOUNT Amount. AMOUNT TYPE P LENGTH 9 DECIMALS 2, * Field: CURRENCY. CURRENCY TYPE C LENGTH 5, * Field: QUANT_B Qty in OUn. QUANT_B TYPE P LENGTH 9 DECIMALS 3, * Field: BASE_UOM. BASE_UOM TYPE C LENGTH 3, * Field: RECORD Record Number. RECORD TYPE RSARECORD, END OF _ty_s_SC_1. TYPES: _ty_t_SC_1 TYPE STANDARD TABLE OF _ty_s_SC_1 WITH NON-UNIQUE DEFAULT KEY. *$*$ begin of global - insert your declaration only below this line *-* ... "insert your code here *$*$ end of global - insert your declaration only before this line *-* METHODS start_routine IMPORTING request type rsrequest datapackid type rsdatapid EXPORTING monitor type rstr_ty_t_monitors CHANGING SOURCE_PACKAGE type _ty_t_SC_1 RAISING cx_rsrout_abort. METHODS inverse_start_routine IMPORTING i_th_fields_outbound TYPE rstran_t_field_inv i_r_selset_outbound TYPE REF TO cl_rsmds_set i_is_main_selection TYPE rs_bool i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
  • 29. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 29 i_r_universe_inbound TYPE REF TO cl_rsmds_universe CHANGING c_th_fields_inbound TYPE rstran_t_field_inv c_r_selset_inbound TYPE REF TO cl_rsmds_set c_exact TYPE rs_bool. ENDCLASS. "routine DEFINITION *$*$ begin of 2nd part global - insert your code only below this line * ... "insert your code here *$*$ end of 2nd part global - insert your code only before this line * *---------------------------------------------------------------------* * CLASS routine IMPLEMENTATION *---------------------------------------------------------------------* * *---------------------------------------------------------------------* CLASS lcl_transform IMPLEMENTATION. *----------------------------------------------------------------------* * Method start_routine *----------------------------------------------------------------------* * Calculation of source package via start routine *----------------------------------------------------------------------* * <-> source package *----------------------------------------------------------------------* METHOD start_routine. *=== Segments === FIELD-SYMBOLS: <SOURCE_FIELDS> TYPE _ty_s_SC_1. DATA: MONITOR_REC TYPE rstmonitor. *$*$ begin of routine - insert your code only below this line *-* ... "insert your code here ************Begin of Start Rt**Surendra Kumar Reddy Koduru************** DATA : WA_SOURCE_PACKAGE TYPE _ty_s_SC_1, ZINDEX LIKE SY-TABIX. LOOP AT SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE. CLEAR ZINDEX. ZINDEX = SY-TABIX. If WA_SOURCE_PACKAGE-CUSTOMER = '000000C100' OR WA_SOURCE_PACKAGE-CUSTOMER = 'C100' OR WA_SOURCE_PACKAGE-CUSTOMER = '000000C101' OR WA_SOURCE_PACKAGE-CUSTOMER = 'C101' OR WA_SOURCE_PACKAGE-CUSTOMER = '000000C102' OR WA_SOURCE_PACKAGE-CUSTOMER = 'C102' OR WA_SOURCE_PACKAGE-CUSTOMER = '000000C103' OR
  • 30. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 30 WA_SOURCE_PACKAGE-CUSTOMER = 'C103'. DELETE SOURCE_PACKAGE INDEX ZINDEX. CONTINUE. ENDIF. ENDLOOP. ************End of Start Rt**Surendra Kumar Reddy Koduru**************** *-- fill table "MONITOR" with values of structure "MONITOR_REC" *- to make monitor entries ... "to cancel the update process * raise exception type CX_RSROUT_ABORT. *$*$ end of routine - insert your code only before this line *-* ENDMETHOD. "start_routine *----------------------------------------------------------------------* * Method inverse_start_routine *----------------------------------------------------------------------* * * This subroutine needs to be implemented only for direct access * (for better performance) and for the Report/Report Interface * (drill through). * The inverse routine should transform a projection and * a selection for the target to a projection and a selection * for the source, respectively. * If the implementation remains empty all fields are filled and * all values are selected. * *----------------------------------------------------------------------* * *----------------------------------------------------------------------* METHOD inverse_start_routine. *$*$ begin of inverse routine - insert your code only below this line*-* ... "insert your code here *$*$ end of inverse routine - insert your code only before this line *-* ENDMETHOD. "inverse_start_routine ENDCLASS. "routine IMPLEMENTATION
  • 31. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 31 After that Check the Syntax then Save, and come back. So our code is correct and now we can Save, Activate the Transformations. Data Loading: After activation, load the data form Flat File. We are working in BI 7.X, so there are only Transformations in between DataSource and InfoSource (in this example). So in BI 7.X once you create Transformations and DTP, InfoPackage is only used to load the data up to PSA, after that we need to use DTP (to load the data from PSA to Data Targets). In below InfoPackage, see the Processing Tab and Data Targets Tab.
  • 32. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 32
  • 33. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 33 Monitor the Data Load: After Load, go to Monitor, see the below screen. See the number of records; in Flat file we have only Five records, so it is displaying only Five records.
  • 34. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 34 See the above screen, the data is loaded only up to PSA, from there we need to execute DTP to load the data into InfoCube.
  • 35. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 35
  • 36. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 36 Request Details: See the Request in InfoCube using Manage. In above screen, we can find One request with 5 Transferred and 1 Added records.
  • 37. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 37 Display Data in InfoCube: See the Data In the InfoCube using Display Data See one single record which is Customer = C104, other records are deleted. Data in PSA:
  • 38. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 38 Data in Source Flat File: How to Debug Start Routine in Transformations: Introduction: “How to Debug the Start Routine in Transformations”, before this article you please reads/go through the content called “How to Write a Start Routine in Transformations”. Here I taken one example i.e., needs to delete the unwanted data in Start Routine of Transformations based on Customer number and we will debug the same Live Scenario: We are loading the data to InfoCube, the Source system is Flat File (the logic, code and execution is same for even any SAP Source systems also) and we need to delete the unwanted records/data in Transformations at the time of data loads based on some Customer numbers. So in scenario we will how to debug the start routine Transformations. Change Start Routine: Click on Change Start Routine like below.
  • 39. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 39 It opens the below code window like below, keep break point i.e. BREAK-POINT. In above screen, you can see the code that we written in “How to write Start Routine in Transformations”. Check the Syntax Check, Save and Activate the Transformations.
  • 40. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 40 Data Loading: InfoPackage Settings: After activation, load the data form Flat File. We are working in BI 7.X, so there are only Transformations in between DataSource and InfoSource (in this example). So in BI 7.X once you create Transformations and DTP, InfoPackage is only used to load the data up to PSA, after that we need to use DTP (to load the data from PSA to Data Targets). In below InfoPackage, see the Processing Tab and Data Targets Tab.
  • 41. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 41 After PSA Settings then open Schedule tab and then Start Data Loading. Monitor the Data Load: After Load, go to Monitor, see the below screen.
  • 42. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 42 See the number of records; in Flat file we have only five records, so it is displaying only five records. DTP and Settings for Debug: See the above screen, the data is loaded only up to PSA, from there we need to execute DTP to load the data into InfoCube. Here we are trying to Debug the Start Routine, so we need to set some settings in DTP, right click on DTP and select Change and go to Execute Tab give Processing Mode is equal to Serially in the Dialog Process (for Debugging).
  • 43. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 43
  • 44. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 44 After above settings to DTP, then simulate. Once you click on Simulate button then it will open the Debug screen, and it will go to our Code there we put BREAK-POINT, then press F5 for line by line debug.
  • 45. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 45 Debugger Window: Press F5 till the Break Point indicator cross the line ZINDEX = SY-TABIX, after that double click on SOURCE_PACKAGE, it will show in Right Side under Variable. See the below screen.
  • 46. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 46 Double click on SOURCE_PACKAGE , and then see the original data in that. Then click on Desktop 1 and then Press F5 for 3 to 4 times and then again see the data in SOURCE_PACKAGE. First record is deleted, because it satisfied our condition in Start Routine i.e. Customer = C100, so it is deleted. So like that you click on Desktop 1 and then press F5, till it completes the 5 cycles i.e. it need to come out from Loop condition. After 4 th Cycle , if you see the data in SOURCE_PACKAGE, you can find only one record.
  • 47. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 47 After that Press F8 it will come out from Debug and show the below screen, in this way we can debug. After the above Simulation, you remove the BREAK-POINT in Start Routine, Save and Activate the Transformations. And Execute the DTP, it will load the data to InfoCube and then check the Request and Data in InfoCube.
  • 48. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 48 Related Content For all Articles and Blogs by Surendra Kumar Reddy, Please visit this URL Using Customer Exit Variables in BW Reports Part - 5 Using Customer Exit Variables in BW Reports Part - 6 Using Customer Exit Variables in BW Reports: Part - 8 Using Customer Exit Variables in BW Reports: Part - 9 Using Customer Exit Variables in BW Reports: Part - 10 Using Customer Exit Variables in BW Reports: Part - 11 Using Customer Exit Variables in BW Reports: Part - 12 Using Customer Exit Variables in BW Reports: Part - 13 Using Customer Exit Variables in BW Reports: Part - 14 Using Customer Exit Variables in BW Reports: Part - 15 Using Customer Exit Variables in BW Reports: Part - 16 Using Customer Exit Variables in BW Reports: Part - 17 Using Customer Exit Variables in BW Reports: Part - 18 Using Text Variables with Customer Exits in Report Headings Using Text Variables with Customer Exits in Report Headings Variables of Type Customer Exit For more information, visit the EDW homepage
  • 49. How to Write Start Routine in Update Rules, Transformations and How to Debug the Routines SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 49 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.