abap 中捕捉错误 顶层类

 TRY.
   *****
    CATCH cx_root INTO lo_cx_root.
      CALL METHOD lo_cx_root->if_message~get_text
        RECEIVING
          result = lv_msg.

      CLEAR ls_result .
      ls_result-type = 'E'.
      ls_result-message = lv_msg.
      APPEND ls_result TO pt_result.

  ENDTRY.

posted @ 2022-12-04 20:28  我肉山  阅读(49)  评论(0)    收藏  举报