关于crm:SAP-CRM-Advanced-search和Simple-search里Max-hit表现行为的差异

89次阅读

共计 1067 个字符,预计需要花费 3 分钟才能阅读完成。

We could observe the different behavior of search max hits in product advanced search and simple search.
For Advanced search: if we maintain an invalid max hit number:

the default 100 could automatically be restored:

However this is not possible in simple search view. After an invalid max hit is typed, the error message is displayed, but the invalid content is still there.

The reason is the max hit field in Simple search is implemented via a pure input field, and conversion exception occurs here:

The exception information is written into the error message internal table:

And the rendering logic for inputField is, if there is an invalid content typed by end user (line 66), the invalid content will be kept in UI (line 79)

And the logic in method is_attribute_valid in line 66 is just check whether the error message table in errors variable (type cl_bsp_messages) is empty or not.

The solution for the max hit in simple search:

Since the design to use inputField as max hit could not be changed, however we could still change the implementation in method CL_PRDIOQR_ESSEARCH_CN00~SET_MAX_HITS: if method if_bsp_model_util~convert_from_string is NOT used, the framework handling for inputField will NOT set the invalid flag any more.

要获取更多 Jerry 的原创文章,请关注公众号 ” 汪子熙 ”:

正文完
 0