abap 多条message显示

FORM fnnn_show_bapi_messages  USING    p_i_messtab TYPE t_bapiret2  .

  FIELD-SYMBOLS: <lfs_return> TYPE bapiret2.
  CALL FUNCTION 'MESSAGES_INITIALIZE'
    EXPORTING
      reset = 'X'.

  LOOP AT p_i_messtab ASSIGNING <lfs_return>.
    CALL FUNCTION 'MESSAGE_STORE'
      EXPORTING
        arbgb  = <lfs_return>-id
        msgty  = <lfs_return>-type
        msgv1  = <lfs_return>-message_v1
        msgv2  = <lfs_return>-message_v2
        msgv3  = <lfs_return>-message_v3
        msgv4  = <lfs_return>-message_v4
        txtnr  = <lfs_return>-number
      EXCEPTIONS
        OTHERS = 0.
  ENDLOOP.


  CALL FUNCTION 'MESSAGES_SHOW'
    EXPORTING
      send_if_one = 'X'
      i_use_grid  = 'X'
      show_linno  = 'X'
    EXCEPTIONS
      OTHERS      = 0.

ENDFORM.                    " FNNN_SHOW_BAPI_MESSAGEES
posted on 2011-11-03 12:17  T_BUG  阅读(1648)  评论(0编辑  收藏  举报