ABAP-Generate dynpro动态屏幕
1.获取屏幕参数值 FUN: RS_SCRP_GET_SCREEN_INFOS
call function 'RS_SCRP_GET_SCREEN_INFOS'
exporting
dynnr = ''
progname = 'ZSDA008_SO_HEADER'
tables
fieldlist = lt_field_list
exceptions
dynpro_does_not_exist =
no_field_list =
cancelled =
others = .
if sy-subrc <> .
* implement suitable error handling here
endif.
2.屏幕生成过程
lv_dynpro = sy-repid.
lv_dynpro+() = ''.
lt_flow_logic-line = 'process before output.'. append lt_flow_logic.
lt_flow_logic-line = 'module status_0100.'. append lt_flow_logic.
lt_flow_logic-line = 'process after input.'. append lt_flow_logic.
lt_flow_logic-line = 'module exit_screen at exit-command.'. append lt_flow_logic.
lt_flow_logic-line = 'module user_command_0100.'. append lt_flow_logic.
lt_flow_logic-line = 'process on value-request.'. append lt_flow_logic.
lt_flow_logic-line = 'field tlow module t_low_help.'. append lt_flow_logic.
syntax-check for dynpro lt_screen_header
lt_field_list
lt_flow_logic
lt_attrib
message lv_message_text line lv_screen_line word lv_incorrectword.
if sy-subrc <> .
endif.
generate dynpro lt_screen_header
lt_field_list
lt_flow_logic
lt_attrib
id lv_dynpro
message lv_message_text line lv_screen_line word lv_incorrectword. "#EC CI_GENERATE
if sy-subrc <> .
endif.
3.程序附件
*&---------------------------------------------------------------------*
*& Report ZEXP_SCREEN_TEST
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------* report zexp_screen_test. tables:sscrfields. data:lv_message_text type string,
lv_screen_line type string,
lv_incorrectword type string,
lv_fields type i,
lv_max_length type i,
ls_field_list type d021s,
lt_field_list type table of d021s with header line,
lt_flow_logic type table of d022s with header line,
lt_screen_header type table of d020s with header line,
ls_header type d020s,
lv_dynpro type char44,
lt_attrib type table of d023s with header line,
lo_ref type ref to data,
lo_line type ref to data,
lt_fields type lvc_t_fcat,
lt_fields_temp type lvc_t_fcat,
ls_fields type lvc_s_fcat. data:begin of etab occurs ,
check type c,
posnr type posnr,
deflg type c,
htetr like vbap-netwr,
vbelv like likp-vbeln,
sktxt type char50,
rqtxt type char50,
jsdat like sy-datum,
zdays type posnr,
hkdat like sy-datum,
ysetr type netwr,
bezei type char80,
ernam type char15,
erdat type datum,
end of etab. field-symbols:<fs_tab> type any table,
<fs> type any. data:tlow type vbeln_va,
tlow1 type vbeln_vl,
thigh type vbeln_va,
thigh1 type vbeln_va,
tpush type char10. "controls:imptb type tableview using screen 0100. start-of-selection. assign tlow to <fs>. perform build_screen_fields. lv_dynpro = sy-repid.
lv_dynpro+() = ''. lt_flow_logic-line = 'process before output.'. append lt_flow_logic.
lt_flow_logic-line = 'module status_0100.'. append lt_flow_logic. lt_flow_logic-line = 'process after input.'. append lt_flow_logic.
lt_flow_logic-line = 'module exit_screen at exit-command.'. append lt_flow_logic. lt_flow_logic-line = 'module user_command_0100.'. append lt_flow_logic. lt_flow_logic-line = 'process on value-request.'. append lt_flow_logic.
lt_flow_logic-line = 'field tlow module t_low_help.'. append lt_flow_logic. syntax-check for dynpro lt_screen_header
lt_field_list
lt_flow_logic
lt_attrib
message lv_message_text line lv_screen_line word lv_incorrectword.
if sy-subrc <> .
endif. generate dynpro lt_screen_header
lt_field_list
lt_flow_logic
lt_attrib
id lv_dynpro
message lv_message_text line lv_screen_line word lv_incorrectword. "#EC CI_GENERATE
if sy-subrc <> .
endif. start-of-selection. call screen . " starting at 3 3 ending at 60 60. form build_screen_fields . * call function 'RS_SCRP_GET_SCREEN_INFOS'
* exporting
* dynnr = '1000'
* progname = 'ZSDA008_SO_HEADER'
* tables
* fieldlist = lt_field_list
* exceptions
* dynpro_does_not_exist = 1
* no_field_list = 2
* cancelled = 3
* others = 4 .
* if sy-subrc <> 0.
** implement suitable error handling here
* endif. * ls_field_list-fnam = ''. 字段名
* ls_field_list-didx = ''. frame high
* ls_field_list-flg1 = ''.
* ls_field_list-flg2 = ''.
* ls_field_list-flg3 = ''. A0 obligatory 00 entry and clear 80 entry
* ls_field_list-fill = ''. C checkbutton R frame T P pushbutton
* ls_field_list-fmb1 = ''.
* ls_field_list-fmb2 = ''.
* ls_field_list-colr = ''. color
* ls_field_list-leng = ''. textarea length
* ls_field_list-line = ''. row
* ls_field_list-coln = ''. col
* ls_field_list-ltyp = ''. circulated type
* ls_field_list-lanf = ''. circulated starting line
* ls_field_list-lblk = ''. circulated area
* ls_field_list-lrep = ''. circulated elenments
* ls_field_list-fmky = ''. function menu butttons
* ls_field_list-paid = ''. set memory id
* ls_field_list-ucnv = ''.
* ls_field_list-type = ''. field type
* ls_field_list-auth = ''. authority no
* ls_field_list-wnam = ''. current button
* ls_field_list-dmac = ''.
* ls_field_list-grp1 = ''.
* ls_field_list-grp2 = ''.
* ls_field_list-grp3 = ''.
* ls_field_list-grp4 = ''.
* ls_field_list-ityp = ''.
* ls_field_list-aglt = ''.
* ls_field_list-adez = ''.
* ls_field_list-stxt = ''.
* ls_field_list-res1 = ''.
* ls_field_list-res2 = ''.
* append ls_field_list to lt_field_list.
* clear ls_field_list. ls_field_list-fnam = 'FRAME'.
ls_field_list-didx = '000B'.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-fill = 'R'.
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'S_VBELN-TEXT'.
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = '订单号'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'TLOW'.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-leng = '0A'.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-ucnv = 'ALPHA'.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = ''.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'S_VBELN-TXT2'.
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = '到'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'THIGH'.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-leng = '0A'.
ls_field_list-line = ''.
ls_field_list-coln = '3C'.
ls_field_list-ucnv = 'ALPHA'.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = ''.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'TPUSH'.
ls_field_list-didx = ''.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-fill = 'P'. "C checkbutton R frame T P pushbutton
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-fmky = '&ZZZ'.
ls_field_list-wnam = '&RICO'.
ls_field_list-type = 'CHAR'.
ls_field_list-auth = ''.
ls_field_list-ityp = 'C'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'S_VBELN-TEXT1'.
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = '订单类型'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-FNAM = 'TAB-ALLTP'.
ls_field_list-DIDX = '000C'.
ls_field_list-FLG1 = ''.
ls_field_list-FLG2 = ''.
ls_field_list-FLG3 = ''.
ls_field_list-FMB1 = ''.
ls_field_list-FMB2 = ''.
ls_field_list-LENG = ''.
ls_field_list-LINE = '0A'.
ls_field_list-COLN = '0D'.
ls_field_list-LANF = ''.
ls_field_list-LBLK = ''.
ls_field_list-LREP = ''.
ls_field_list-TYPE = 'CHAR'.
ls_field_list-ITYP = 'C'.
ls_field_list-AGLT = ''.
ls_field_list-ADEZ = ''.
ls_field_list-RES1 = 'DL K'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = '<FS>'.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-leng = '0A'.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-ucnv = 'ALPHA'.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = ''.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'S_VBELN-TXT1'.
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = '到'.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'THIGH1'.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-leng = '0A'.
ls_field_list-line = ''.
ls_field_list-coln = '3C'.
ls_field_list-ucnv = 'ALPHA'.
ls_field_list-type = 'CHAR'.
ls_field_list-ityp = 'C'.
ls_field_list-stxt = ''.
append ls_field_list to lt_field_list.
clear ls_field_list. ls_field_list-fnam = 'TPUSH1'.
ls_field_list-didx = ''.
ls_field_list-flg1 = ''.
ls_field_list-flg2 = ''.
ls_field_list-flg3 = ''.
ls_field_list-fill = 'P'. "C checkbutton R frame T P pushbutton
ls_field_list-leng = ''.
ls_field_list-line = ''.
ls_field_list-coln = ''.
ls_field_list-fmky = '&ZZZ'.
ls_field_list-type = 'CHAR'.
ls_field_list-auth = ''.
ls_field_list-ityp = 'C'.
append ls_field_list to lt_field_list.
clear ls_field_list. endform. " BUILD_SCREEN_FIELDS form build_flow_logic_etc . field-symbols:<fs_flow_logic> type d022s,
<fs_flow_logic1> type d022s,
<fs_flow_logic2> type d022s.
data:lt_field_list type table of d021s with header line.
call function 'RS_DYNPRO_CREATE_INITIAL'
exporting
program = sy-repid
dynnr = ''
importing
dynpro_header = ls_header
tables
dynpro_fields = lt_field_list
dynpro_flow = lt_flow_logic
dynpro_params = lt_attrib.
loop at lt_flow_logic assigning <fs_flow_logic>.
if <fs_flow_logic>+() = '*'.
clear <fs_flow_logic>+().
endif.
endloop.
insert initial line into lt_flow_logic index assigning <fs_flow_logic>.
<fs_flow_logic>-line = 'MODULE exit_screen AT EXIT-COMMAND.'. "#EC NOTEXT
endform. " BUILD_FLOW_LOGIC module status_0100 output.
set pf-status ''.
endmodule. "status_0100 OUTPUT module exit_screen.
set screen .
leave screen.
endmodule. "exit_screen module user_command_0100 input.
" break-point. * loop at screen.
* if screen-name = ''.
* endif.
* endloop. case sy-ucomm.
when '&F4'.
"perform t_low_help. when '&SAVE'.
leave to screen .
when others.
endcase. set screen . endmodule. "user_command_0100 INPUT *module etab_pbo output.
* read table etab into etab index imptb-current_line.
*endmodule.
*
*module etab_pai input.
* modify etab from etab index imptb-current_line.
*endmodule. " etab_pail input module t_low_help.
" break-point. data:zwerks like standard table of t001w with header line.
clear:zwerks. refresh:zwerks. select * into corresponding fields of table zwerks from t001w.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'WERKS'
value_org = 'S'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'TLOW'
tables
value_tab = zwerks
exceptions
parameter_error =
no_values_found =
others = .
if sy-subrc <> .
...
endif.
clear:zwerks. refresh:zwerks. endmodule. form t_low_help.
data:zwerks like standard table of t001w with header line.
clear:zwerks. refresh:zwerks.
select * into corresponding fields of table zwerks from t001w.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'WERKS'
value_org = 'S'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'TLOW'
tables
value_tab = zwerks
exceptions
parameter_error =
no_values_found =
others = .
if sy-subrc <> .
...
endif.
clear:zwerks. refresh:zwerks. endform.
ABAP-Generate dynpro动态屏幕的更多相关文章
- ABAP-BarCode-1-HTML二维码打印及动态屏幕实现
很久很久...以前写的一个测试程序,主要是通过ABAP与HTML交互,编写JavaScript实现二维码及动态屏幕实现. 1.ABAP界面效果 2.实现代码 *&--------------- ...
- [SAP ABAP开发技术总结]屏幕跳转
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- [Unity3D]Shader编程之动态屏幕遮罩
转载 https://blog.csdn.net/u012741077/article/details/78425834 屏幕可视范围跟随目标物体移动,可修改可视范围大小,边缘渐变大小.以及遮罩颜色, ...
- ABAP分享四 选择屏幕下拉菜单简单实现示例
PARAMETERS p_carri2 LIKE spfli-carrid AS LISTBOX VISIBLE LENGTH 20 ...
- SAP ABAP ALV构建动态输出列与构建动态内表(包留备用),包含操作abap元类型表及类
https://blog.csdn.net/zhongguomao/article/details/51095946
- 屏幕 Dynpro
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- [SAP ABAP开发技术总结]动态语句、动态程序
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- 【ABAP系列】【第五篇】SAP ABAP7.50 之用户接口
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列][第五篇]SAP ABAP7.5 ...
- ABAP Enhancement:第一部分
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
随机推荐
- C#:消息队列应用程序
Carl NolanMicrosoft Corporation 摘要:本文概述一种用于处理若干消息队列的 Windows 服务解决方案,重点介绍 .NET 框架和 C# 应用程序. 下载 CSharp ...
- web上传照片
.toDataURL() FileReader对象也有类似的方法,比如.readAsDataURL(),然而它只接受file或blob类型,而这两种类型一般只能通过<input[type=fil ...
- HTML5 localStorage使用教程
在客户端存储数据,HTML5 提供了两种在客户端存储数据的新方法: localStorage - 没有时间限制的数据存储 sessionStorage - 针对一个 session 的数据存储 之前, ...
- osql执行数据库查询命令并保存到txt文件
osql -Usa -P123 -d AppBox -Q "select * from Menus where sortindex > 1000" -o e:\xxx.txt ...
- SpringCloud初体验:六、利用 Sleuth 和 Zipkin 给微服务加上链路监控追踪查看功能
首先:装上 Zipkin 服务,收集调用链跟踪数据,体验时装在了本机docker上, 方便快捷 docker run -d -p : openzipkin/zipkin 安装后访问地址也是 9411端 ...
- Openfiler使用说明
Openfiler使用说明 http://www.cnblogs.com/zb9222/p/6118074.html 一. Openfiler简介 Openfiler 能把标准x86/64架构的系统变 ...
- 2013-7-28 802.11n帧聚合
芯片开发阶段的帧聚合迥异于商用AP,前者更偏向实现过程,后者偏向结果.也就是说用户在使用商用设备时不会管你特性是如何实现的,他们只关心效果,开启这个功能能否实实在在的提高AP的吞吐量. 网上搜索了众多 ...
- JsonCpp使用方法详解
JSON全称为JavaScript ObjectNotation,它是一种轻量级的数据交换格式,易于阅读.编写.解析.jsoncpp是c++解析JSON串常用的解析库之一. jsoncpp中主要的类: ...
- JS URL 使用base64加密与解密和MD5解密
JS编码方式: <script type="text/javascript"> document.write(encodeURI("http://www.w3 ...
- 如何将JQUERY对象转成Javascript对象
问: <div id="test"></div> $("#test") //由Javascript对象转为Jquery对象: 但是如何转 ...