开发基础 报表教程 数据字典 对话编程 表单打印 增强出口 SAP接口 S/4 HANA
实战案例 实战笔记 资料下载 CRM
问答互助 会员分享 俱乐部 广告区
论坛指南、建议和投诉
qiaoranhuishou发表于 2017-02-17 15:33qiaoranhuishou 最后回复于 2017-02-17 15:33 [复制链接] 3394 0
使用道具 举报
qiaoranhuishou
信息监察员
发表回复 回帖后跳转到最后一页
简单的汇总一下:
1. 定义所需类和字段:
TYPE-POOLS icon.
TABLES sscrfields.
DATA:functxt TYPE smp_dyntxt.
2. 选择界面定义:
SELECTION-SCREEN: FUNCTION KEY 1.
3.初始化字段
INITIALIZATION.
functxt-icon_id = icon_compare.
functxt-icon_text = '跳转至新程序'.
sscrfields-functxt_01 = functxt.
4.AT SELECTION-SCREEN.里面控制按钮相应
DATA: lr_screen TYPE TABLE OF rsparams,
ls_screen LIKE LINE OF lr_screen.
CLEAR ls_screen.
ls_screen-selname = 'S_BUKRS'.
ls_screen-kind = 'S'.
ls_screen-sign = 'I'.
ls_screen-option = 'EQ'.
ls_screen-low = s_bukrs-low.
APPEND ls_screen TO lr_screen.
CLEAR ls_screen.
ls_screen-selname = 'S_VKORG'.
ls_screen-kind = 'S'.
ls_screen-sign = 'I'.
ls_screen-option = 'EQ'.
ls_screen-low = s_vkorg-low.
APPEND ls_screen TO lr_screen.
CASE sscrfields-ucomm.
WHEN 'FC01'.
SUBMIT ZSDR002_NEW VIA SELECTION-SCREEN WITH SELECTION-TABLE lr_screen AND RETURN.
WHEN OTHERS.
ENDCASE.