Selection screen search help filtering

SAP has many fields that depend on other fields. We often need them on selection screens and expect their search helps automatically filtered by the value of the field on which they depend. This can be accomplished by generating the search help at runtime with a function module like F4IF_INT_TABLE_VALUE_REQUEST. But there is also a simple way.

Most ABAP developers know how to do this with memory parameters. But what if the field we want to set has no memory parameter in its standard data element? Let’s examine this with an example.

This purchasing document type select option automatically calls the standard search help H_T161. This will list all purchasing document types for all categories.

However, when we develop a purchase order report, we only want to display this particular category (BSTYP = F). The first solution we can think of is to set the memory parameter of BSTYP in the INITIALIZATION event of the report. So we want to find out what this parameter is.

Well, surprise, there is none! So how can we solve this problem without writing a bunch of code and calling function modules? Actually, it’s quite simple. Just define a parameter in the selection screen that is not displayed, and set a default value. Make sure that both the new parameter and the dependent field are referenced with the same structure.

Leave a Reply