Skip to end of metadata
Go to start of metadata
Error rendering macro 'code': Invalid value specified for parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'
************************************************************************
* ZBI_ABAP_ROUTINES_UPDATE_RULES
* BI: Analyze ABAP Routines in Update Rules
*
* (c) SAP AG 2005                                    MFB, SAP Labs, LLC
* created:     2005-09-01
* last update: 2008-04-11
************************************************************************
* Selection texts:
* P_ANAL    Highlight ABAP Coding
* P_DISP    Display ABAP Coding
* P_VERS_A  Current Version
* P_VERS_D  Comparison Version
* SO_CUBE   InfoCube
* SO_SOURC  InfoSource
************************************************************************

REPORT zbi_abap_routines_update_rules LINE-SIZE 255.

TYPE-POOLS: icon, rsaa.

TABLES:
  rsupdinfo,
  rsupdrout.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS:
  so_cube  FOR rsupdinfo-infocube MEMORY ID rsi,
  so_sourc FOR rsupdinfo-isource.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS:
  p_vers_a TYPE rsobjvers DEFAULT 'A',
  p_vers_d TYPE rsobjvers DEFAULT 'D',
  p_disp   AS CHECKBOX    DEFAULT 'X',
  p_anal   AS CHECKBOX    DEFAULT space.
SELECTION-SCREEN END OF BLOCK b2.

TYPES:
  BEGIN OF ys_codes,
    infocube   LIKE rsupdinfo-infocube,
    isource    LIKE rsupdinfo-isource,
    iobjnm     LIKE rsupdrout-iciobjnm,
    codeid     LIKE rsupdrout-codeid,
  END OF ys_codes,
  yt_codes TYPE SORTED TABLE OF ys_codes WITH UNIQUE DEFAULT KEY.

DATA:
  g_indent TYPE i,
  gs_codes TYPE ys_codes,
  gt_codes TYPE yt_codes.

START-OF-SELECTION.

* Read update rules with ABAP routines
  SELECT * FROM rsupdinfo
    WHERE objvers  =  p_vers_a
      AND infocube IN so_cube
      AND isource  IN so_sourc.

    SELECT * FROM rsupdrout WHERE updid = rsupdinfo-updid.

      CLEAR gs_codes.
      gs_codes-infocube = rsupdinfo-infocube.
      gs_codes-isource  = rsupdinfo-isource.
      gs_codes-iobjnm   = rsupdrout-iciobjnm.
      gs_codes-codeid   = rsupdrout-codeid.
      COLLECT gs_codes INTO gt_codes.

    ENDSELECT.

  ENDSELECT.

* Process routines
  LOOP AT gt_codes INTO gs_codes.

    AT NEW infocube.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      WRITE: AT /  icon_biw_info_cube AS ICON, 'InfoCube:',
             AT 40 gs_codes-infocube,
             AT 99 space.
      SKIP.
    ENDAT.

    AT NEW isource.
      FORMAT COLOR COL_KEY INTENSIFIED ON.
      WRITE: AT /4 icon_biw_rules_act AS ICON, 'Update Rules:',
             AT 40 gs_codes-isource,
             AT 99 space.
      SKIP.
      g_indent = 8.
    ENDAT.

    AT NEW iobjnm.
      IF NOT gs_codes-iobjnm IS INITIAL.
        FORMAT COLOR COL_HEADING INTENSIFIED OFF.
        WRITE: AT /8 icon_biw_info_object_catalogue AS ICON,
                     'InfoObject:',
               AT 40 gs_codes-iobjnm,
               AT 99 space.
        SKIP.
        g_indent = g_indent + 4.
      ENDIF.
    ENDAT.

    PERFORM analyze_routine IN PROGRAM zbi_abap_routines_analyze
      USING gs_codes-codeid p_vers_a p_vers_d p_disp p_anal g_indent 'X'.

    AT END OF isource.
      ULINE.
    ENDAT.

  ENDLOOP.