'POPUP_TO_DECIDE_LIST'函数测试

来源:互联网 发布:发现利润区 知乎 编辑:程序博客网 时间:2024/06/04 19:23

                        (效果图)

*&---------------------------------------------------------------------*
*& Report  ZTEST_1                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*

report  ztest_1                                 .

* 定义函数需要的变量
data: begin of spoplist occurs 15.
include structure spopli.
data: end of spoplist.
data: antwort type c.
* 添加选择参数
spoplist-varoption = 'Creditor'.
append spoplist.
spoplist-varoption = 'Material'.
append spoplist.
spoplist-varoption = 'Account '.
spoplist-selflag = 'X'.

call function 'POPUP_TO_DECIDE_LIST'
exporting titel = 'Possible entra: Order'
textline1 = 'By which criteria'
textline2 = 'should orders'
textline3 = 'be selected?'
mark_max = 2
mark_flag = 'X'
importing answer = antwort
tables t_spopli = spoplist
exceptions too_much_answers = 1
too_much_marks = 2.

if sy-subrc = 2.
write: 'Too many answers chosen.'.
endif.
* 取消
if antwort = 'A'.
write: 'Popup canceled.'.
else.
write: 'Options chosen:'.
loop at spoplist where selflag = 'X'.
write: / spoplist-varoption.
endloop.
endif.

原创粉丝点击