SAP CRM Advanced search和Simple search裡Max hit表現行為的差異

注销發表於2020-09-05

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:


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


the default 100 could automatically be restored:


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


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.


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


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


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


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


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


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)


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


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.


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異


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.


SAP CRM Advanced search和Simple search裡Max hit表現行為的差異



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2713224/,如需轉載,請註明出處,否則將追究法律責任。

相關文章