Skip to Content
0
Former Member
Jan 09, 2006 at 04:29 PM

BADI for HR search help PREM

314 Views

Hello folks,

I have a requirement here. I have appended a search help ZIPPREM to the standard HR search help <b>PREM</b>.

And I had implemented BADI <b>HRPAD00_PREM</b> in order to get values based on the custom search help.

Here is the code for the same.

METHOD if_ex_hrpad00_prem~get_shlps.

*=======================================================================
* data declaration
*=======================================================================
  DATA: ls_sel_shlp LIKE LINE OF sel_shlp.
*=======================================================================
* set attributes for selection table
*=======================================================================
  ls_sel_shlp-sign   = 'I'.
  ls_sel_shlp-opti   = 'EQ'.
*=======================================================================
* assign search helps dependent on the relevant transaction
*=======================================================================
  CASE sy-tcode.
    WHEN '/IRM/IPSICIP'.
      ls_sel_shlp-low = 'ZIPPREM'.
      APPEND ls_sel_shlp TO sel_shlp.

    WHEN '/IRM/IPSICCP'.
      ls_sel_shlp-low = 'ZIPPREM'.
      APPEND ls_sel_shlp TO sel_shlp.

    WHEN '/IRM/IPSIPA'.
      ls_sel_shlp-low = 'ZIPPREM'.
      APPEND ls_sel_shlp TO sel_shlp.

    WHEN ', /IRM/IPSICPP '.
      ls_sel_shlp-low = 'ZIPPREM'.
      APPEND ls_sel_shlp TO sel_shlp.
  ENDCASE.
*=======================================================================
* run standard coding in addition
*=======================================================================
  standard = 'X'.

ENDMETHOD.

But my requirement is I want to hide or deny access to all other tabs (search helps) except the custom one for PREM.

How can I do that?? Please help.

Thanks