欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

【SAP】ABAP中submit

程序员文章站 2022-05-18 07:55:13
...
SUBMIT zpprpt1066 WITH sel1 = 'X'
                  WITH p_werks = i_werks
                  WITH s_matnrz IN r_matnr
                  WITH ht = 'X'
                  EXPORTING LIST TO MEMORY AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = it_memory
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.

  IF it_memory[] IS INITIAL.
    e_flag = 'N'.
    e_mess = '查询没有数据'.
    EXIT.
  ENDIF.

  CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
      listasci           = it_list[]
      listobject         = it_memory
    EXCEPTIONS
      empty_list         = 1
      list_index_invalid = 2
      OTHERS             = 3.

  IF sy-subrc <> 0.
    e_flag = 'N'.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO e_mess.
    EXIT.
  ENDIF.

 

相关标签: Abap开发