Sapui5 从Fiori ABAP后端删除筛选器

Sapui5 从Fiori ABAP后端删除筛选器,sapui5,abap,sap-fiori,Sapui5,Abap,Sap Fiori,我试图从it\u filter\u select\u options中删除行,但不知道如何删除。有什么方法可以做到这一点吗 我的URI在筛选器中传递值,但有时在某些特定条件下,我不想使用它进行筛选,但同时我想使用其他值进行筛选 if foo = 'xyz'. delete it_filter_select_options where property = 'foo'. call method /iwbep/cl_mgw_data_util=>filtering expo

我试图从
it\u filter\u select\u options
中删除行,但不知道如何删除。有什么方法可以做到这一点吗

我的URI在筛选器中传递值,但有时在某些特定条件下,我不想使用它进行筛选,但同时我想使用其他值进行筛选

if foo = 'xyz'.

  delete it_filter_select_options where property = 'foo'.

  call method /iwbep/cl_mgw_data_util=>filtering
    exporting
      it_select_options = it_filter_select_options
    changing
      ct_data = et_entityset.
endif.
在第
行删除它\u筛选\u选择属性为'foo'的选项时给出此语法错误。

字段不能更改

导入定义输入参数。调用该方法时,必须为每个非可选输入参数指定适当的实际参数。调用时,实际参数的内容将传递给输入参数在方法中,定义了通过引用的输入参数的内容不能更改。

将过滤器选择选项保存在本地表中

Data(lt\u select\u options)=io\u tech\u request\u context->get\u filter()->get\u filter\u select\u options()。

现在您可以修改
lt\u选择\u选项

if foo = 'xyz'
"delete lt_select_options[ property = 'foo' ]-select_options[ sign = 'I' ].
delete it_select_options where property = 'foo'.
call method /iwbep/cl_mgw_data_util=>filtering
  exporting
   it_select_options = lt_select_options
  changing
   ct_data = et_entityset.
endif.
  • 请使用
    io\u tech\u request\u context->get\u filter()->get\u filter\u select\u options()

  • 对于不希望筛选的字段,取消选中筛选复选框。(请参见交易
    SEGW
    ,双击您的相关OData实体)

  • 不要以编程方式计算您不想要的过滤器


  • 此筛选器参数已弃用,