cancel
Showing results for 
Search instead for 
Did you mean: 

How to erase Search criteria given earlier on Accounts Search screen

former_member184390
Participant
0 Kudos

Hi All,

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.

Thanks,

Udaya

Accepted Solutions (1)

Accepted Solutions (1)

xavier_dehairs2
Active Participant
0 Kudos

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,

Regards,

Xavier

Answers (1)

Answers (1)

CarstenKasper
Active Contributor
0 Kudos

Hi,

I fear I did not completely understand you, but will try anyway.

If it is the standard Account search you call from the work center page it will be hard. This is SAP coding and you would have to enhance component BP_HEAD_SEARCH for this.

If it is a search help popup that you trigger, you can try using the inbound plug CLEAR_ALL.

In case of the enhancement mentioned before:

After enhancing the component enhance the MainWindow as well. Create a new inbound plug "CLEAR". In this method put some coding to clear all data inside the search and the result value nodes. Maybe you have to go down to the MainSearch view as there are all context nodes...

Put the new inbound plug into the interface.

In the customizing exchange the inboundplug for BP_HEAD_SEARCH that is called from the work center page.

Now you should be done

cheers Carsten

amarnath_kathi
Active Contributor
0 Kudos

Hi,

I see Udaya is talking about the first of the two scenarios you mentioned, the standard account search. So, after enhacing component BP_HEAD_SEARCH, i guess he has to run report BSP_DLC_TRANSPORT_CONFIG_TEXT in se38 if at all he is on SP01. Am i right Carsten?

regards,

Amar.

CarstenKasper
Active Contributor
0 Kudos

Good question. I never used this report before. As there is no documentation on it I do not know what it is doing and what it is needed for.

A look into the coding tells me it operates on the configurations and text repository objects but I do not know why it appends the config used to a transport request.

Anyway, in this case there is no adjusting views or configurations.

cheers Carsten

former_member184390
Participant
0 Kudos

Guys,

Thanks for your help. But i am not getting the need to run the report. Is this a standard procedure..pls share me if it is mentioned in any SAP Notes or reference page. I am trying to explore options without coding..

Thanks a lot for your time..

Regards,

Udaya

amarnath_kathi
Active Contributor
0 Kudos

Hi Udaya,

The functionality you want to clear search criteria would not be possible without enhancement as per what i know.

The report i mentioned would be anyway run only after some configuration is done. So as Carsten said, maybe it is not even relevant to your case. So you can ignore this for now.

I think the main decision for you is whether to go for the enhancement.

I hope this is clear.

regards,

Amar.