ABAP BP屏幕增强

1、 BUT000表增强CI_EEW_BUT000,CI_EEW_BUT000_X



2、 创建增强结构ZSBUT00_CUST,该结构在DSAVB事件中,会被使用到

3、 创建函数组ZSD_BP,增强相关的程序必须全部放在该程序中,包括函数、屏幕、变量

4、 在ZSD_BP的include top中定义变量如下:

5、 创建屏幕9001,屏幕字段从表BUT000直接F6生成,命名格式必须为BUT000-XXXXX


6、9001屏幕的PBO、PAI如下


6、 屏幕增强配置,进入TCODE: BUPT 

7、 创建应用程序



8、 创建数据集



9、 创建字段组



10、 创建视图




11、 创建PBO函数无输入输出参数

function zsd_but000_pbo.
*"----------------------------------------------------------------------
*"*"本地接口:
*"-------------------------------------------------------------------
  data:
    lt_but000   type table of but000.

* step 1: request data from xo for dynpro structure
  "if gs_but000 is initial.
    cvi_bdt_adapter=>data_pbo(
      exporting
        i_table_name = table_name_but000
      importing
        e_data_table = lt_but000[]
    ).
  "endif.

  if lt_but000[] is initial.
    clear gs_but000.
  else.
    read table lt_but000 into gs_but000 index 1.
  endif.


endfunction.

12、 创建PAI函数,无输入输出参数

function zsd_but000_pai.
*"----------------------------------------------------------------------
*"*"本地接口:
*"----------------------------------------------------------------------
  data:
      lt_but000         type table of but000.
  field-symbols:
    <but000>          like line of lt_but000.

  check cvi_bdt_adapter=>is_direct_input_active( ) = false.
* step 1: update xo memory from dypro structure
  cvi_bdt_adapter=>get_current_bp_data(
    exporting
      i_table_name = table_name_but000
    importing
      e_data_table = lt_but000[]
  ).

  if lt_but000[] is initial.
    if gs_but000 is not initial.
      gs_but000-partner = cvi_bdt_adapter=>get_current_bp( ).
      append gs_but000 to lt_but000.
    endif.
  else.
    read table lt_but000 assigning <but000> index 1.
    <but000>-zbpmid = gs_but000-zbpmid.
    assign gs_but000 to <but000>.
  endif.

  cvi_bdt_adapter=>data_pai(
    i_table_name = table_name_but000
    i_data_new   = lt_but000[]
    i_validate   = false
  ).
endfunction.

13、 将程序名、屏幕号、PBO、PAI函数分配给视图

14、 创建部分



15、 给部分分配视图

16、 创建屏幕


17、 屏幕->部分

18、 创建屏幕顺序








19、 业务伙伴视图




20、定义事件







  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值