SAP Help Add search help(value help) to FPM application using enhancement









Add programmed/OVS search help to FPM ESS/MSS application via enhancement to CL_HRESS_PER_DETAIL

You can add a Custom / Freely programmed search help to any Web dynpro field, but you can also add it as an enhancement to a standard floor plan manager application such as Employee Self Service. In this example I will add it to the post code field of the add address functionality within the personal information of ESS.

The class that is used to process the personal details for ESS/MSS is CL_HRESS_PER_DETAIL so it is just a case of finding the correct method within here to manipulate the required data at the appropriate point.

In this case I am going to use method GET_DEFINITION and add a post exit to it which updates the contents of the search help field(wd_value_help) for the post code(PSTLZ).


Step 1 - Enhance class with PostExit
With transaction SE24 or SE80 access the class CL_HRESS_PER_DETAIL and press the enhancement button/icon at the top and then create an enhancement implementation when asked.


Now find the GET_DEFINITION method, place your cursor on it and select menu option Edit->Enhancement Operations->Insert Post-Method. A new icon should then appear within the PostExit column.



Step 2 - Add code to post exit enhancement
Now click on the new post exit icon (press save if asked) and enter the following code. If you have not created the custom wdp searech help from SAP Development use the standard SAP one FPM_TEST_VH.

    DATA: wa_fielddesc LIKE LINE OF et_field_description,
          ld_index type i.


    LOOP AT et_field_description  into wa_fielddesc.
      ld_index = sy-tabix.
      CASE wa_fielddesc-name.
        WHEN 'PSTLZ'.
          wa_fielddesc-wd_value_help = 'ZWDP_SEARCH_HELP'. "or use 'FPM_TEST_VH'
          MODIFY et_field_description from wa_fielddesc index ld_index.
        EXIT.
      ENDCASE.
    ENDLOOP.

Your post code field should now include the search help option.