博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
使用OVS
阅读量:6306 次
发布时间:2019-06-22

本文共 3554 字,大约阅读时间需要 11 分钟。

 

创建节点:

需要在组件上引用OVS组件WDR_OVS:引用后需要更改添加节点属性值如下:

布局如下:

在view中也添加ovs组件

新建事件方法:

ON_EVENT

代码如下:

METHOD on_event.  TYPES:  BEGIN OF lty_stru_input,    carrid TYPE string,    connid TYPE string,    END OF lty_stru_input.  TYPES: BEGIN OF lty_stru_list,    carrid TYPE string,    connid TYPE string,    text TYPE string,    END OF lty_stru_list.  DATA: ls_search_input TYPE lty_stru_input,        lt_select_list TYPE STANDARD TABLE OF lty_stru_list,        ls_text TYPE wdr_name_value,        lt_label_texts TYPE wdr_name_value_list,        lt_column_texts TYPE wdr_name_value_list,        lv_window_title TYPE string,        lv_group_header TYPE string,        lv_table_header TYPE string.  FIELD-SYMBOLS: 
TYPE lty_stru_input,
TYPE lty_stru_list. DATA:lw_carrid TYPE string, lw_connid TYPE string. CASE ovs_callback_object->phase_indicator. WHEN if_wd_ovs=>co_phase_0. ls_text-name = 'CARRID'. ls_text-value = 'Search Field-Carrid'. INSERT ls_text INTO TABLE lt_label_texts. ls_text-name = 'CONNID'. ls_text-value = 'Search Field-Connid'. INSERT ls_text INTO TABLE lt_label_texts. ls_text-name = 'CARRID'. ls_text-value = 'Result-Carrid'. INSERT ls_text INTO TABLE lt_column_texts. ls_text-name = 'CONNID'. ls_text-value = 'Result-Connid'. INSERT ls_text INTO TABLE lt_column_texts. ls_text-name = 'TEXT'. ls_text-value = 'Result-Text'. INSERT ls_text INTO TABLE lt_column_texts. lv_group_header = 'Group Header'. lv_window_title = 'Window Title'. lv_table_header = 'Table Header'. ovs_callback_object->set_configuration( label_texts = lt_label_texts column_texts = lt_column_texts group_header = lv_group_header window_title = lv_window_title table_header = lv_table_header col_count = 3 row_count = 8 ). WHEN if_wd_ovs=>co_phase_1. ovs_callback_object->context_element->get_static_attributes( IMPORTING static_attributes = ls_search_input ). ovs_callback_object->set_input_structure( input = ls_search_input ). WHEN if_wd_ovs=>co_phase_2. IF ovs_callback_object->query_parameters IS NOT BOUND. ENDIF. ASSIGN ovs_callback_object->query_parameters->* TO
. IF NOT
IS ASSIGNED. ENDIF. lw_carrid =
-carrid. lw_connid =
-connid. REPLACE ALL OCCURRENCES OF '*' IN lw_carrid WITH '%' . REPLACE ALL OCCURRENCES OF '*' IN lw_connid WITH '%' . IF lw_carrid IS NOT INITIAL AND lw_connid IS NOT INITIAL. SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM SFLIGHT WHERE carrid LIKE lw_carrid AND connid LIKE lw_connid. ENDIF. IF lw_carrid IS INITIAL AND lw_connid IS NOT INITIAL. SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM SFLIGHT WHERE connid LIKE lw_connid. ENDIF. IF lw_carrid IS NOT INITIAL AND lw_connid IS INITIAL. SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM SFLIGHT WHERE carrid LIKE lw_carrid . ENDIF. ovs_callback_object->set_output_table( output = lt_select_list ). WHEN if_wd_ovs=>co_phase_3. IF ovs_callback_object->selection IS NOT BOUND. ENDIF. ASSIGN ovs_callback_object->selection->* TO
. IF
IS ASSIGNED. ovs_callback_object->context_element->set_attribute( name = 'CARRID' value =
-carrid ). ovs_callback_object->context_element->set_attribute( name = 'CONNID' value =
-connid ). ENDIF. ENDCASE.ENDMETHOD.

 

转载于:https://www.cnblogs.com/caizjian/p/4299869.html

你可能感兴趣的文章
LeetCode Container With Most Water (Two Pointers)
查看>>
vue (v-if show 问题)
查看>>
https基础
查看>>
css3 canvas之刮刮卡效果
查看>>
并查集模板
查看>>
RESTful Mongodb
查看>>
BZOJ3237:[AHOI2013]连通图(线段树分治,并查集)
查看>>
如何提高Ajax性能
查看>>
Android--自定义加载框
查看>>
LINUX下 lamp安装及配置
查看>>
BZOJ3105 [cqoi2013]新Nim游戏
查看>>
困惑的前置操作与后置操作
查看>>
SDNU 1269.整数序列(水题)
查看>>
BZOJ 2118 Dijkstra
查看>>
Go语言基础之结构体
查看>>
SpringCloud:Eureka Client项目搭建(Gradle项目)
查看>>
jqueryValidate
查看>>
ATL使用IE控件,并且屏蔽右键
查看>>
Jenkins
查看>>
linux下使用screen和ping命令对网络质量进行监控
查看>>