How to erase Search criteria given earlier on Accounts Search screen
I am trying to explore options regarding erasing the search criteria mentioned earlier. For example, i have search for Accounts having the role Sold To Party and from the result list, i pick the record and navigate to other screens. When i click on Account Search screen, the earlier criteria is retained as it is. The user needs to click Clear for erasing this. Is there any way to retain blank search screen.
Any pointers will be really helpful.
This is quite easy in fact. First you enhance the search component using BSP_WD_CMPWB transaction (following the enhancement concepts explained in CRM Help).
Then for the search view, you need to redefine DO_PREPARE_OUTPUT method and erase your fields when the import parameter IV_FIRST_TIME is equal to 'X'.
To erase the content of your field, just call the SET_PROPERTY method of the attribute you want to clear (TYPED_CONTEXT contains the link to your different context nodes, so in your case there is certainly a CN named SEARCH which needs to be used to clear the values).
Hope this helps and that you understand my explanations,