博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
UI基础一:值节点赋值
阅读量:5459 次
发布时间:2019-06-15

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

METHOD EH_ONSEARCH.*CALL METHOD SUPER->EH_ONSEARCH**  EXPORTING**    HTMLB_EVENT    =**    HTMLB_EVENT_EX =*    .    DATA:      LR_QUERY_SERVICE   TYPE REF TO   CL_CRM_BOL_DQUERY_SERVICE,      LR_MESSAGE_SERVICE TYPE REF TO   CL_BSP_WD_MESSAGE_SERVICE,      LV_MESSAGE         TYPE          STRING,      LR_SEL_PARAMS      TYPE REF TO   IF_BOL_BO_COL,      LR_PARAM           TYPE REF TO   IF_BOL_BO_PROPERTY_ACCESS,      LR_ITERATOR        TYPE REF TO   IF_BOL_BO_COL_ITERATOR,      LS_SELECTION       TYPE          GENILT_SELECTION_PARAMETER,      LT_PARAMS          TYPE          GENILT_SELECTION_PARAMETER_TAB,      LV_MAX_HITS        TYPE          I,      LR_VALUENODE       TYPE REF TO   CL_BSP_WD_VALUE_NODE,      GS_CLAUSE          TYPE STRING,      GT_CLAUSE          TYPE TABLE OF STRING,      GT_EKKO            TYPE TABLE OF EKKO,      GW_EKKO            TYPE EKKO..    "获取当前查询节点    LR_QUERY_SERVICE ?= ME->TYPED_CONTEXT->SEARCHQUERYNODE->COLLECTION_WRAPPER->GET_CURRENT( ).    "检查查询节点实例化    CHECK LR_QUERY_SERVICE IS BOUND.    "清空结果节点内容    ME->TYPED_CONTEXT->SEARCHRESULTNODE->COLLECTION_WRAPPER->CLEAR( ).    "获取查询对象    LR_SEL_PARAMS = LR_QUERY_SERVICE->GET_SELECTION_PARAMS( ).    "获取最大值    LR_QUERY_SERVICE->GET_PROPERTY_AS_VALUE( EXPORTING IV_ATTR_NAME = 'MAX_HITS'                                             IMPORTING EV_RESULT = LV_MAX_HITS ).    "获取查询对象的BOL迭代器^_^    LR_ITERATOR   = LR_SEL_PARAMS->GET_ITERATOR( ).    "迭代器循环获取查询对象的值    LR_PARAM      = LR_ITERATOR->GET_FIRST( )."自己做的动态查询拼接    WHILE LR_PARAM IS BOUND.      LR_PARAM->GET_PROPERTIES( IMPORTING ES_ATTRIBUTES = LS_SELECTION ).      IF LS_SELECTION-LOW IS NOT INITIAL OR LS_SELECTION-HIGH IS NOT INITIAL."选择条件有值        IF LS_SELECTION-LOW IS NOT INITIAL AND LS_SELECTION-HIGH IS NOT INITIAL AND LS_SELECTION-OPTION = 'BT'.          CONCATENATE LS_SELECTION-ATTR_NAME 'BETWEEN' LS_SELECTION-LOW 'AND' LS_SELECTION-HIGH INTO GS_CLAUSE SEPARATED BY ' '.        ENDIF.        IF LS_SELECTION-LOW IS NOT INITIAL.          CONCATENATE LS_SELECTION-ATTR_NAME LS_SELECTION-OPTION LS_SELECTION-LOW INTO GS_CLAUSE SEPARATED BY ' '.        ENDIF.        APPEND GS_CLAUSE TO GT_CLAUSE.      ENDIF.*      APPEND LS_SELECTION TO LT_PARAMS.      LR_PARAM = LR_ITERATOR->GET_NEXT( ).    ENDWHILE."数据查询    SELECT * INTO CORRESPONDING FIELDS OF TABLE GT_EKKO        FROM EKKO WHERE (GT_CLAUSE).    DATA:  LR_REF_ANY    TYPE REF TO DATA,           LR_VALUE_NODE TYPE REF TO CL_BSP_WD_VALUE_NODE."值类型转化添加到结果    LOOP AT GT_EKKO INTO GW_EKKO.      GET REFERENCE OF GW_EKKO INTO LR_REF_ANY.      CREATE OBJECT LR_VALUE_NODE        TYPE        CL_BSP_WD_VALUE_NODE        EXPORTING          IV_DATA_REF = LR_REF_ANY.      ME->TYPED_CONTEXT->SEARCHRESULTNODE->COLLECTION_WRAPPER->ADD( LR_VALUE_NODE ).    ENDLOOP.  ENDMETHOD.

 

转载于:https://www.cnblogs.com/sapSB/p/6800265.html

你可能感兴趣的文章
微信小程序-视图列表渲染
查看>>
CentOS中用户不在 sudoers 文件中。此事将被报告。
查看>>
p38 二、八、十六进制的对应关系
查看>>
Effective C++笔记——day01
查看>>
P4302 [SCOI2003]字符串折叠
查看>>
神秘的程序员
查看>>
jS 中创建对象:
查看>>
zless轻量级样式框架
查看>>
ZeroMQ接口函数之 :zmq_term - 终结ZMQ环境上下文(context)
查看>>
js获取倒计时
查看>>
loadrunner安装过程中的,注册表问题
查看>>
git push失败the remote end hung up unexpectedly
查看>>
POJ3087 Shuffle'm Up 简单模拟
查看>>
Django中数据的增删改查
查看>>
iOS模拟器发生了崩溃,去哪找Crash Log
查看>>
[支付宝]即时到账接口对接总结
查看>>
夺命雷公狗-----React---15--三元运算符
查看>>
元首的愤怒 SharePoint Apps
查看>>
CSS
查看>>
两个DataGrid垂直滚动条同步滚动
查看>>