ABAP-Generate dynpro动态屏幕

1.获取屏幕参数值 FUN: RS_SCRP_GET_SCREEN_INFOS call function 'RS_SCRP_GET_SCREEN_INFOS' exporting dynnr = '1000' progname = 'ZSDA00...
摘要由CSDN通过智能技术生成

1.获取屏幕参数值 FUN: RS_SCRP_GET_SCREEN_INFOS

  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.

 

 

2.屏幕生成过程

 

  lv_dynpro = sy-repid.

  lv_dynpro+40(4) = '0100'.

  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 <> 0.

  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 <> 0.

  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 0,
     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+40(4) = '0100'.
 
  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_l
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值