Wednesday, November 11, 2009

Display / Delete Application log (Bal Log)

*** Delete Given log
         call function 'BAL_DB_DELETE'
            exporting
              i_t_lognumber            = lognumber
              i_in_update_task         = space
              i_with_commit_work       = space
            exceptions
              no_logs_specified        = 1
              others                   = 2.


*** Display Given logs

      data: begin of lt_log occurs 10,
              lognumber like balhdr-lognumber,
            end of lt_log.


      refresh lt_log.
      lt_log-lognumber = lognumber . " log
      append lt_log.


      call function 'APPL_LOG_DISPLAY_WITH_LOGNO'
        tables
          lognumbers   = lt_log
        exceptions
          no_authority = 1
          others       = 2.
      if sy-subrc NE 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.

No comments:

Post a Comment