二维码

[view] 创建Help View,并在select-option搜索帮助中调用

Twilight发表于 2014-10-20 16:33Twilight 最后回复于 2014-10-20 16:33 [复制链接] 4722 0

Help view通常用在search help的'Selection Method'参数中,'Selection Method'参数同样可以输入database table或database view。
Help View是以outer join方式关联取数,然而database table是以inner join方式关联取数的。
下图可以帮助你快速理解outer join和inner join区别
join.png
如果我们F4时想展示一些特殊的数据,可以在search help的'Selection Method'参数中使用help view,来解决此类问题。

一、创建一个Help View
1、se11 选择view
HELP VIEW 1.png
2、选择Help View,点击copy
HELP VIEW 2.png
3、建立多表之间的关系
HELP VIEW 3.png
在右侧就能看到表之间的关联关系了
HELP VIEW 4.png
4、切换到view fields TAB界面
HELP VIEW 5.png
可以使用table fields来添加视图字段
HELP VIEW 6.png
HELP VIEW 7.png
5、切换到selection Conditions TAB界面
HELP VIEW 8.png
在这里添加数据过滤filter条件,使用Logical Operators逻辑操作符来关联多条件
AND=> True only in case of all the conditions are true  
OR=>   True in the case if any of the condition is true
6、切换到maintenance status  TAB界面
HELP VIEW 9.png
Read Only: Data can only be read  
Read and change: Existing entries can be changed but deletion or insertion is not possible
保存激活

二、在search help中使用help view
1、se11 创建一个Elementary search help
HELP VIEW 10.png
在'Selection Method'参数中输入刚建的help view(Y_help_view)
2、使用search help,在代码中添加关键字‘Matchcode object’
  1. TABLES:ekpo.
  2. SELECT-OPTIONS:so_werks FOR ekpo-werks MATCHCODE OBJECT ytest_help.
复制代码

F4执行效果
HELP VIEW 11.png
PS:help view是outer join,不是inner join  所以我们看到的这种情况
回复

使用道具 举报

快速回帖

本版积分规则
您需要登录后才可以回帖 登录 | 注册有礼

快速回复 返回顶部 返回列表