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.程序附件

ZEXP_SCREEN_TEST

*&---------------------------------------------------------------------*
*& 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动态屏幕的更多相关文章

  1. ABAP-BarCode-1-HTML二维码打印及动态屏幕实现

    很久很久...以前写的一个测试程序,主要是通过ABAP与HTML交互,编写JavaScript实现二维码及动态屏幕实现. 1.ABAP界面效果 2.实现代码 *&--------------- ...

  2. [SAP ABAP开发技术总结]屏幕跳转

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  3. [Unity3D]Shader编程之动态屏幕遮罩

    转载 https://blog.csdn.net/u012741077/article/details/78425834 屏幕可视范围跟随目标物体移动,可修改可视范围大小,边缘渐变大小.以及遮罩颜色, ...

  4. ABAP分享四 选择屏幕下拉菜单简单实现示例

    PARAMETERS p_carri2 LIKE spfli-carrid                    AS LISTBOX VISIBLE LENGTH 20                ...

  5. SAP ABAP ALV构建动态输出列与构建动态内表(包留备用),包含操作abap元类型表及类

    https://blog.csdn.net/zhongguomao/article/details/51095946

  6. 屏幕 Dynpro

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  7. [SAP ABAP开发技术总结]动态语句、动态程序

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  8. 【ABAP系列】【第五篇】SAP ABAP7.50 之用户接口

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列][第五篇]SAP ABAP7.5 ...

  9. ABAP Enhancement:第一部分

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

随机推荐

  1. Oracle C#处理时间类型的Insert

    首先如果直接   parm.Value=DateTime.Now;   insert into table (TheTime)Value(@parm);   执行sql就会报错 ----------- ...

  2. WebForm使用FileUpload控件上传压缩二进制图片

    fuImage 是FileUpload页面控件 ImageHelper.CompressionImage(fuImage.FileBytes, quality); /// <summary> ...

  3. thrift 知识点

    mac下,thrift 安装 mac下,最简单安装thrift的方法:使用brew安装 brew update brew install thrift 验证安装成功:thrift --help 安装出 ...

  4. C语言实现<读取>和<写入> *.ini文件(转)

    原地址:https://blog.csdn.net/niha1993825jian/article/details/41086403 #include <stdio.h> #include ...

  5. 三元表达式return if 简化 if 判断语句

  6. go的module用法

    新版不需要项目放在GOPATH里面了,这个恶心的机制之前还被n多人捧臭脚.简单列一下用法 新建项目 cd 项目目录go mod init 项目名 写好代码 go build 或者 go mod tid ...

  7. bzoj3326: [Scoi2013]数数

    Description Fish 是一条生活在海里的鱼,有一天他很无聊,就开始数数玩. 他数数玩的具体规则是: 1. 确定数数的进制B 2. 确定一个数数的区间[L, R] 3. 对于[L, R] 间 ...

  8. ASP.NET Web Pages:帮助器

    ylbtech-.Net-ASP.NET Web Pages:帮助器 1.返回顶部 1. ASP.NET Web Pages - 帮助器 Web 帮助器大大简化了 Web 开发和常见的编程任务. AS ...

  9. selenium Java-1 配置

      1.使用intellij新建一个maven项目,名字自定.在pom中写入selenium的依赖.其他依赖也添加到该文件中. [maven selenium依赖](http://mvnreposit ...

  10. 页面引用jquery中文变乱码的问题

    <script type="text/javascript" src="Js/JavaScript.js"></script>   方法 ...