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_TRANSF_RULES
* BI: Analyze ABAP Routines in Transfer Rules
*
* (c) SAP AG 2005                                    MFB, SAP Labs, LLC
* created:     2005-09-01
* last update: 2008-08-13
************************************************************************
* Selection texts:
* P_ANAL    Highlight ABAP Coding
* P_DISP    Display ABAP Coding
* P_VERS_A  Current Version
* P_VERS_D  Comparison Version
* S_ISOURC  InfoSource
* S_LOGSYS  Source system
* S_OSOURC  DataSource
************************************************************************

REPORT zbi_abap_routines_transf_rules LINE-SIZE 255.

TYPE-POOLS: icon, rsaa.

TABLES:
  rsupdinfo,
  rsisosmap,
  rstsrules.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS:
  s_isourc FOR rsupdinfo-isource,
  s_osourc FOR rsisosmap-oltpsource,
  s_logsys FOR rsisosmap-logsys MATCHCODE OBJECT rs_logsys.
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,
    isource  LIKE rsisosmap-isource,
    osource  LIKE rsisosmap-oltpsource,
    logsys   LIKE rsisosmap-logsys,
    iobjnm   LIKE rstsrules-iobjnm,
    codeid   LIKE rstsrules-convrout_l,
  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 transfer rules with ABAP routines
  SELECT * FROM rsisosmap
    WHERE oltpsource IN s_osourc
      AND logsys     IN s_logsys
      AND isource    IN s_isourc
      AND objvers    =  p_vers_a
      AND transtru   <> ' '.

    SELECT * FROM rstsrules
      WHERE transtru   = rsisosmap-transtru
        AND objvers    =  p_vers_a
        AND convrout_l <> ' '.

      CLEAR gs_codes.
      gs_codes-isource  = rsisosmap-isource.
      gs_codes-osource  = rsisosmap-oltpsource.
      gs_codes-logsys   = rsisosmap-logsys.
      gs_codes-iobjnm   = rstsrules-iobjnm.
      gs_codes-codeid   = rstsrules-convrout_l.
      COLLECT gs_codes INTO gt_codes.

    ENDSELECT.

  ENDSELECT.

* Process routines
  LOOP AT gt_codes INTO gs_codes.

    AT NEW isource.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      WRITE: AT /  icon_biw_info_source AS ICON, 'InfoSource:',
             AT 40 gs_codes-isource,
             AT 99 space.
      SKIP.
    ENDAT.

    AT NEW osource.
      FORMAT COLOR COL_KEY INTENSIFIED ON.
      WRITE: AT /4 icon_bw_datasource AS ICON, 'DataSource:',
             AT 40 gs_codes-osource,
             AT 99 space.
      SKIP.
    ENDAT.

    AT NEW logsys.
      FORMAT COLOR COL_HEADING INTENSIFIED OFF.
      WRITE: AT /8 icon_biw_source_sys_gen AS ICON, 'Source System:',
             AT 40 gs_codes-logsys,
             AT 99 space.
      SKIP.
      g_indent = 12.
    ENDAT.

    AT NEW iobjnm.
      IF NOT gs_codes-iobjnm IS INITIAL.
        FORMAT COLOR COL_KEY INTENSIFIED OFF.
        WRITE: AT /12 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.