• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
^ω^SAp傻X^o^
博客园    首页    新随笔    联系   管理    订阅  订阅
web_dynpro_SELECT_OPTION组件的使用:

SELECT_OPTION的使用,在主程序里加入SELECT_OPTION组件,然后在视图里使用SELECT_OPTION,在想要的显示的位置设置一个viewCONTAINERUIELEMENT.再在窗口里将uielement嵌套视图到WND_SELECTION_SCREEN,这样的话就可以在视图里使用SELECT_OPTION,在初始化方法里加入INIT_SELECT方法.method init_slection .
  data: lo_cp_usage     type ref to if_wd_component_usage,
        lo_select_op    type ref to iwci_wdr_select_options,
        lt_rangtable    type ref to data.
  lo_cp_usage = wd_this->wd_cpuse_select_options( ).
  if lo_cp_usage->has_active_component( ) is initial.
    lo_cp_usage->create_component( ).
  endif.
  lo_select_op = wd_this->wd_cpifc_select_options( ).
  wd_this->hander_selection = lo_select_op->init_selection_screen( ).
  wd_this->hander_selection->set_global_options(
                                i_display_btn_cancel  = abap_false
                                i_display_btn_check   = abap_false
                                i_display_btn_reset   = abap_false
                                i_display_btn_execute = abap_false ).
  wd_this->hander_selection->remove_all_sel_screen_items( ).
*--------------------------------------------------------------------*
  lt_rangtable = wd_this->hander_selection->create_range_table( i_typename = 'ZELYNAME' ).”对应的数据元素名
  wd_this->hander_selection->add_selection_field(
  i_id = 'NAME'”列名
  i_read_only = ''
  it_result = lt_rangtable
  i_no_extension = abap_false
  i_no_intervals = abap_false
  i_description = '姓名'”列描述
  ).
  lt_rangtable = wd_this->hander_selection->create_range_table( i_typename = 'ZELYSEX' ).
  wd_this->hander_selection->add_selection_field(
  i_id = 'SEX'
  i_read_only = ''
  it_result = lt_rangtable
  i_no_extension = abap_true
  i_no_intervals = abap_true
  i_description = '性别'
  ).
Endmethod.

^_^很多人都把资料锁进了note里,以后还怎么百度呢^_^
posted on 2013-04-11 22:03  ^ω^SAP傻X^o^  阅读(544)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3