*&---------------------------------------------------------------------*
*&      Form  LOGS_ANALYSE
*&---------------------------------------------------------------------*
*       Analyses table logs concerning the current maintenance view by
*       calling report RSVTPROT
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM LOGS_ANALYSE.

  RANGES: SEL_OBJ FOR OBJH-OBJECTNAME,
          SEL_TYPE FOR OBJH-OBJECTTYPE.

  SEL_OBJ-SIGN = SEL_TYPE-SIGN = 'I'.
  SEL_OBJ-OPTION = SEL_TYPE-OPTION = 'EQ'.
  IF VIM_CALLED_BY_CLUSTER NE SPACE.
    SEL_TYPE-LOW = VIM_CLST.
    SEL_OBJ-LOW = VIM_CALLING_CLUSTER.
  ELSE.
    SEL_OBJ-LOW = X_HEADER-VIEWNAME.
    IF x_header-bastab NE space
     AND x_header-maintview = x_header-viewname.
* table but no table-variant
      sel_type-low = vim_tabl.
    ELSE.
* view, view-variant, or table variant
      SEL_TYPE-LOW = VIM_VIEW.
    ENDIF.
  ENDIF.
  APPEND SEL_OBJ. APPEND SEL_TYPE.
  SUBMIT RSVTPROT VIA SELECTION-SCREEN USING SELECTION-SCREEN 1010
                  WITH CUSOBJ IN SEL_OBJ
                  WITH STYPE IN SEL_TYPE
                  WITH ACC_ARCH = ' ' AND RETURN.
ENDFORM.                               " LOGS_ANALYSE
