cancel
Showing results for 
Search instead for 
Did you mean: 

POWL Assistant: disable / hide "Add Employee" and "Remove Employee" buttons

Former Member
0 Kudos

Hi experts,

In FITV, using SAP Portal, assistants can add / remove any employee if they have selection by "P" on tcode FPB_MAINTAIN_PERS_S - Individual Processing of Pers. Data .

My client wants to hide / disable these two buttons as they will manage assistants' access on the backend through this tcode.

Is there any way to disable these buttons?

Thanks in advance.

Best,

AS

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

OSS note 1124779 will give you some more background to deactivating unused tabs in POWL, however for these 2 specific tabs this is not achievable via personalization and there is no customizing option for these tabs, it is only possible to 'hide' or make them invisible via modification in the content administration.

You would have to make a modification to Dynpro FITV_UI_EMPLOYEELIST, to the buttons PTRM_WEB_UI/ADD_EMPLOYEE, PTRM_WEB_UI/REMOVE_EMPLOYEE. or you may try to deactivate the button "Maintain Employee List" via "Content Administration" of the SAP portal.

Unfortunately, there is no other way to deactivate or hide this button without doing a modification in the Web Dynpro ABAP Application.

Lukas_Weigelt
Active Contributor
0 Kudos
Unfortunately, there is no other way to deactivate or hide this button without doing a modification in the Web Dynpro ABAP Application.

Objection! There is. I had the exact same problem and did the following:

1. Create an Enhancement for FITV_UI_EMPLOYEELIST

2. Create an Overwrite-Exit for the Component-Controller Method SET_ALV_CONFIG

3. Copy the entire code from the original method SET_ALV_CONFIG into your overwrite exit (expect the method-endmethod clause of course)

4. From the following code snippet:

case wd_this->m_seltype .
      when 'P'.  " Personalization by Personal list
        lr_function = lr_functions->create_function( 'ADD_EMPLOYEE' ).
        create object lr_fe_button.
        l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'PTRM_WEB_UI/ADD_EMPLOYEE' ).
        lr_fe_button->set_text( l_btn_text ).
        " lr_fe_button->set_tooltip( l_btn_text ).
        lr_function->set_editor( lr_fe_button ).

        lr_function = lr_functions->create_function( 'REMOVE_EMPLOYEE' ).
        create object lr_fe_button.
        l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'PTRM_WEB_UI/REMOVE_EMPLOYEE' ).
        lr_fe_button->set_text( l_btn_text ).
*        lr_fe_button->set_enabled( abap_false ).
        " lr_fe_button->set_tooltip( l_btn_text ).
        lr_function->set_editor( lr_fe_button ).

      when others.
        lr_function = lr_functions->create_function( 'FPB_PERS' ).
        create object lr_fe_button.
        l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'PTRM_WEB_UI/FPB_PERS' ).
        lr_fe_button->set_text( l_btn_text ).
        "lr_fe_button->set_tooltip( l_btn_text ).
        lr_function->set_editor( lr_fe_button ).
    endcase.

comment out the code in WHEN-Clause 'P', so that it looks like this:

case wd_this->m_seltype .
      when 'P'.  " Personalization by Personal list
*        lr_function = lr_functions->create_function( 'ADD_EMPLOYEE' ). " # Weigelt 13.01.2012 Buttons zur Personalisierung der Mitarbeiterliste deaktivieren
*        create object lr_fe_button.
*        l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'PTRM_WEB_UI/ADD_EMPLOYEE' ).
*        lr_fe_button->set_text( l_btn_text ).
*        " lr_fe_button->set_tooltip( l_btn_text ).
*        lr_function->set_editor( lr_fe_button ).
*
*        lr_function = lr_functions->create_function( 'REMOVE_EMPLOYEE' ).
*        create object lr_fe_button.
*        l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'PTRM_WEB_UI/REMOVE_EMPLOYEE' ).
*        lr_fe_button->set_text( l_btn_text ).
**        lr_fe_button->set_enabled( abap_false ).
*        " lr_fe_button->set_tooltip( l_btn_text ).
*        lr_function->set_editor( lr_fe_button ).

      when others.
        lr_function = lr_functions->create_function( 'FPB_PERS' ).
        create object lr_fe_button.
        l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'PTRM_WEB_UI/FPB_PERS' ).
        lr_fe_button->set_text( l_btn_text ).
        "lr_fe_button->set_tooltip( l_btn_text ).
        lr_function->set_editor( lr_fe_button ).
    endcase.

5. Rejoice about the evil buttons being gone! 😄

EDIT: If I might ask a question since I'm a POWL-Newbie. Is there some kind of central table where the Employee List is stored so that it could be maintained centrally. For example like it is done in HRUS_D2 for the UWL? Because we want to somehow statically assign Employees to the List of the Travel Assistants.

best regards, Lukas

Edited by: Lukas Weigelt on Jan 13, 2012 11:27 AM

0 Kudos

I stand corrected so! *But it does involve enhancement on FITV_UI_EMPLOYEELIST *

Lucas.. you want Transaction FPB_MAINTAIN_PERS_S in this case (I think!) as it allows you to centrally fill the POWL_ASSISTANT with employees for the assistant..I wrote a KBA on this (1622954) outlining the steps. You can assign by org unit, cost center or personnel numbers!

All the best

Sally

Lukas_Weigelt
Active Contributor
0 Kudos

> Lucas.. you want Transaction FPB_MAINTAIN_PERS_S in this case (I think!) as it allows you to centrally fill the POWL_ASSISTANT with employees for the assistant..I wrote a KBA on this (1622954) outlining the steps. You can assign by org unit, cost center or personnel numbers!

Yes, this is exactly what I meant/needed, thanks a lot! Great KBA!

Cheers, Lukas

Former Member
0 Kudos

It just works!!! Many thanks!!

Answers (0)