A Beginner
A Beginner

Reputation: 389

Search help using methods for a Data Element in SAP

I have an existing method in a class that returns a list of ids that I would like to use in the search help of a data element (using SE11 transaction). I have been looking for a way to use the method in the search help of my data element but so far I haven't been able to find any way.

Is it possible to use a method while setting up a search help in SE11 or do I only have rely on table, view or CDS views ?

Upvotes: 1

Views: 2184

Answers (2)

brunaks
brunaks

Reputation: 26

What you need is to create a search help that has a search help exit, and then assign this search help to the data element. Inside the exit you can add any ABAP code you want, including calling the method to retrieve the IDs. You create the custom search help via SE11, and assign it to the data element in the tab Further Attributes also in SE11.

A good tutorial on how to accomplish is here: https://blogs.sap.com/2009/03/11/controllingmanipulating-data-of-search-help-using-search-help-exit/ but this is widely used so you can just search for "search help exit in abap" and you will find many tutorials, including in youtube. Also I am assuming you have access to a system, so you can search in SE11 for search helps and use one with a search help exit as reference.

Upvotes: 1

vivekanandasr
vivekanandasr

Reputation: 34

You can try to call the method at search help exit if the search help is custom. If you can make a CDS for retrieving the values from table then you can expose it in Odata services and use the annotation @Consumption.valueHelp : at your result set view.

Upvotes: 0

Related Questions