I was working on Transaction IW32. My aim was to get the Notification screen fields into the main screen of IW32. So that required creating custom fields in main screen of IW32 and then having F4 helps to those custom fields.
Here are the Notification fields and the Search Help that is of my interest.
As you can see the F4 pop-up is not coming from any dictionary or screen assignment of Search Help. Rather it is coming from module pool events. That is
PROCESS ON VALUE-REQUEST. FIELD VIQMEL-QMGRP MODULE CODE_PF4_I15.
When you debug further, you see that the above F4 pop-up is triggered by FM QPK1_GP_CODE_SELECTION.
When I create a custom field in main screen of IW32, I cannot call this FM directly for F4 help. Solution is to have a Search Help which in turn calls this FM.
Below is how it can be done.
Step 1. Create a new FM copying from sample FM F4IF_SHLP_EXIT_EXAMPLE. You may read the coding part which gives real good insight on how to write search help exit FM.
Step 2. By debugging, note down the input parameters passed by the code to FM. (In this case to QPK1_GP_CODE_SELECTION).
Step 3. In the newly created FM, call the FM QPK1_GP_CODE_SELECTION as below.
Read the importance of callcontrol-step in the documentation.
Step 4. Create a Search help and mention the above created new FM as the search help. Under Parameters remember to provide an export parameter. This is of the type of your custom field.
Step 5. Test you Search help and ensure that it provides the desired pop-up.
Step 6. Assign this Search Help to the custom field as described in this Wiki. Using Search Helps – SAP Imagineering – SCN Wiki
You are done. Now your custom field has the same search help as the original field.
Thanks Tamas Hoznek for the guidance. 🙂
It is common requirement to get the selected value from the Search help pop-up as well as other related values (Ex: Text/Label ) to the screen. In Personas 3.0, how can we get those related fields from F4 help to the other custom screen fields? Any idea?