Simplest Way to Show Custom Data in F4 Help

SAP Tips

If you want to display data for a select option in F4 help corresponding to only the data given in pre-select option in selection screen, you cannot write the code directly in the event on value-request, since the selection screen values are not accessible at that particular point.

In this case, you have to use the FM DYNP_VALUES_READ to get the field values. Now you can write a select based on the select option, and finally call the FM F4IF_INT_TABLE_VALUE_REQUEST which gives the required values only in F4.