[函数]在弹出的窗口中输出内表[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

显示结果:

[函数]在弹出的窗口中输出内表[BKK_POPUP_DISPLAY_LIST]_第1张图片

转载于:https://www.cnblogs.com/datie/p/11429166.html

你可能感兴趣的:([函数]在弹出的窗口中输出内表[BKK_POPUP_DISPLAY_LIST])