Skip to end of metadata
Go to start of metadata

Author: Author: Marc Bernard, SAP Customer Solution Adoption (CSA)
Submitted: 2008-04-11
Updated: 2012-12-06

Description:

This code tutorial contains four programs that can be used to display and analyze ABAP routines, which are embedded in BI Update Rules, Transfer Rules, and Transformations. You can see an example in the attachments.

All four programs use the same base code to display and analyze the ABAP routines. This base code provides the following features:

  • Code display with line numbers
  • Replacement of internal field-symbols with text labels
  • Comparison of two object versions for example "active" vs. "content" with highlighting of differences
  • Option to highlight critical ABAP statements

    Useful Information

    The code comparison feature is especially helpful to identify differences between the active version (which you might have modified) and the most recent BI content version (which might include bug fixes). The comparison view helps you to determine if you should active the most recent BI content and overwrite you current routine. Alternatively you can use the analysis to determine which manual code adjustments should be made to the routines.

    The highlight feature comes in handy if you want to quickly identify performance critical ABAP statements.

Detailed Features:

The base code also identifies the following types of routines:

  • Transfer Rule
  • Update Rule
  • Time Conversion
  • InfoObject Conversion
  • Global Routine
  • Deletion Routine
  • Formula Routine (generated)
  • Transformation (7.x)

The analysis will show all parts of the routines:

  • Global data definitions
  • Start routines
  • End routines (7.x)
  • Expert routines (7.x)

The analysis will highlight the following statements:

  • CALL FUNCTION and PERFORM statements
    (green - potential for bad performance in function or form routine)
  • SELECT and SELECT SINGLE statements
    (yellow - potential for bad performance)
  • INSERT, UPDATE, MODIFY, DELETE statements
    (red - potential for data inconsistency -> Use APIs instead!)

What separates the programs is the selection screen. Each program allows to select a different set of ABAP routines:

  1. Analyze ABAP Routines by Routine ID (GUID)
    Program ZBI_ABAP_ROUTINES_ANALYZE (BI releases 3.x and 7.x)
  2. Analyze ABAP Routines in Transfer Rules
    Program ZBI_ABAP_ROUTINES_TRANSF_RULES (BI releases 3.x and 7.x)
  3. Analyze ABAP Routines in Update Rules
    Program ZBI_ABAP_ROUTINES_UPDATE_RULES (BI releases 3.x and 7.x)
  4. Analyze ABAP Routines in Transformations
    Program ZBI_ABAP_ROUTINES_TRANSFORM (BI release 7.x)

    Be Careful

    If you run the programs with a wide open selection, it might take a long time since there are typically many ABAP routines in a system.


    Handy Hint

    You will find the coding for the four programs in the child pages.

Version History:

2008-04-11 Initial release
2008-08-13 Renamed programs; minor update for code highlighting; added value-help for program 4
2012-12-06 Fixed the 7.x program for transformations to include field routines

Related Links:

1 Comment

  1. Unknown User (ip8g525)

    Nice Blog... However for transformations it would be nice to see the code for tranformation routines not just the routines in the RSTRAN table. Is it possible to get the program to show the transformation routines aswell?

    regards

    Paul Cairncross