[函数]在弹出的窗口中输出内表[BKK_POPUP_DISPLAY_LIST]

下面介绍一个不常用的ABAP函数 BKK_POPUP_DISPLAY_LIST,看函数名字就知道,这个函数可以弹出个窗口并在窗口中显示list。

例子代码:

REPORT ztest_output_table.

DATA: return LIKE rsnewleng-fcode.
DATA: BEGIN OF itab OCCURS 0,
        posnr(6),
        ettyp(10),
      END OF itab.

itab-posnr = 1.
itab-ettyp = 'aa'.
APPEND itab.
itab-posnr = 2.
itab-ettyp = 'bb'.
APPEND itab.
CALL FUNCTION 'BKK_POPUP_DISPLAY_LIST'
  EXPORTING
    i_callback_program    = sy-repid  "程序名
    i_callback_write_form = 'FRM_WRITE_CONTENTS'   "输出表内容的form名
    i_title               = 'test'
    i_start_column        = 25
    i_start_row           = 15
    i_end_column          = 60
    i_end_row             = 20
  IMPORTING
    answer                = return.

*&---------------------------------------------------------------------*
*&      Form  frm_write_contents
*&---------------------------------------------------------------------*
FORM frm_write_contents.
  LOOP AT itab.
    WRITE : / itab-posnr,' ',itab-ettyp .
  ENDLOOP.
ENDFORM.                    "l_server_info_contents

显示结果:

posted @ 2019-08-29 13:18  真的是很难  阅读(312)  评论(0编辑  收藏  举报