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. FastAdmin 开发第三天:安装 FastAdmin

    环境安装安装好后就可以安装 FastAdmin 了. 根据文档说明安装步骤如下,推荐使用命令行安装: 克隆FastAdmin到你本地 git clone https://git.oschina.net ...

  2. tomcat源码阅读之容器(Container)

    一. 实现容器的接口是Container接口,Tomcat中共有四种类型的容器: 1.Engine:表示整个Catalina Servlet引擎: 2.Host:表示含有一个或者多个Context容器 ...

  3. 【转】每天一个linux命令(36):diff 命令

    原文网址:http://www.cnblogs.com/peida/archive/2012/12/12/2814048.html diff 命令是 linux上非常重要的工具,用于比较文件的内容,特 ...

  4. VS2010/MFC编程入门系列教程 (转)

    http://www.jizhuomi.com/school/  鸡啄米编程课堂 http://www.jizhuomi.com/software/257.html http://blog.csdn. ...

  5. java Scanner中的hasNext()方法

    hasNext()方法判断输入(文件.字符串.键盘等输入流)是否还有下一个输入项,若有,返回true,反之false. Scanner sc = new Scanner(new File(" ...

  6. 一个spring boot集成dubbo的小例子

    请移步github,介绍和代码均在上面了:https://github.com/wuxun1997/voicebox 这里再多说两句.github上的这个小例子默认使用组播作为注册中心,你也可以把组播 ...

  7. 【python】copy浅拷贝和deepcopy深拷贝

    Python中的对象之间赋值时是按引用传递的,如果需要拷贝对象,需要使用标准库中的copy模块. 1. copy.copy 浅拷贝 只拷贝父对象,不会拷贝对象的内部的子对象. 2. copy.deep ...

  8. 详细说明 配置 Sublime Text 开发node.js(windows)包括sub2和sub3的区别

    1.先安装Sublime Text  2或者3皆可 2.下载 sublime Text 的nodejs插件 得到那个zip包(后面会介绍用Package Control安装) 3.下载后解压 直接改名 ...

  9. WPF Demo6

    通知项熟悉.数据绑定 using System.ComponentModel; namespace Demo6 { /// <summary> /// 通知项属性 /// </sum ...

  10. 【Spring实战-2】Spring4.0.4整合Hibernate4.3.6

    作者:ssslinppp      源程序下载:http://download.csdn.net/detail/ssslinppp/8751185  1. 摘要 本文主要讲解如何在Spring4.0. ...