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.

Capture1.PNG

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.

Capture2.PNG

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.

Capture3.PNG

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. 🙂

Further Challenge:

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?

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Christoph Lordieck

    Hi Krishna,

    thanks for the explanation 🙂 . Regarding your challenge: The F4-Help text field has an “onF4”-Event. My first thought was that you could trigger the “showF4Help”-Method and fetch the returned values afterwards, but with reference to the scripting api this method doesn’t return any values. This should be the right event, though i don’t think there is a method so far. You could trigger another FM to get values for depending fields as well and fill them via script though.

    (0) 
    1. Krishna Kishor Kammaje Post author

      Hi Christoph, I do not want to make another server call. Anyway If I decide to do it,

      How do you decide what is the right time to call this new FM (to get the depending fields)? Is there an event after I make selection from the pop-up? May be onAfter screen refresh?

      (0) 

Leave a Reply