cancel
Showing results for 
Search instead for 
Did you mean: 

FPM - Hiding custom tab dynamically.

Former Member
0 Kudos

Dear friends,

Let me start with details.

Details :

STD WDC : FPM_OIF_COMPONENT(there are 5 views in this component)

Component configuration name : /SAPSRM/WDCC_FPM_OIF_PO_PURCH

In this CC, i have added a new custom tab as 7th position in the tab strip and given my own Z Webdynpro component in the attributes.

Requirement : The custom tab should appear only for certain conditions.

My method :

1) I have tried to put some code in the modifyview and post-exit of MAIN to hide based on condition - Requirement not met.

2) same as above, in post-exit method of CNR_VIEW - Requirement not met.

Solution :Any methods apart from the above to achieve this requirment would surely be appreciated.

Regards,

Vinay

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184741
Active Contributor
0 Kudos

Please have a look at the blog..i think it says exactly what you need

http://scn.sap.com/community/web-dynpro-abap/floorplan-manager/blog/2012/04/08/dynamically-modifying...

Former Member
0 Kudos

Hi ,

Under the method OVERRIDE_EVENT_OIF of implement interface IF_FPM_OIF_CONF_EXIT .try to pass which ever view you want to hide for the below logic.

DATA: lo_exc TYPE REF TO cx_fpm_floorplan.

DATA mainview TYPE string.

mainview = 'MAINVIEW_3'.

CALL METHOD io_oif->remove_mainview

EXPORTING

iv_mainview_id = mainview

.

CATCH cx_fpm_floorplan INTO lo_exc.

ENDTRY.

Hope its helpfull.

Please refer the below link for more information.

[;

Thanks,

Lavanya.

Edited by: lavanyaMadhu on Mar 1, 2012 1:47 PM

Former Member
0 Kudos

Hi...

Thanks for the reply.. it was indeed useful for the steps to execute.

But hit a block when i tried to implement the interface IF_FPM_OIF_CONF_EXIT in enh mode.

The Implemented interface tab is not in changed mode even though i am in Enh mode.

Any leads on how to achieve this.

Regards,

Vinay

Former Member
0 Kudos

Can anyone pls reply for the above issue.

Regards,

Vinay

Former Member
0 Kudos

Hi Vinay,

you don't have to implement the interface but the class that implements the interface.
As I understood you like to remove tabs from SAP SRM.
Check class /SAPSRM/CL_FPM_OVRIDE_OIF. This class implements the interface /SAPSRM/IF_FPM_OVRIDE_EVT_OIF you can open the method override_event_oif and create a pre-enhancement.

I did that and it worked fine for me:

IF <some condition>.

    

   CASE mo_fpm_oif->mo_event->mv_event_id.
          WHEN 'FPM_START'.
            "remove customized tabs

            TRY.        " do try-catch as remove tab from configuration were it does not exist will dump       
                mo_fpm_oif->remove_mainview(
                  iv_mainview_id = lv_tab_id
                ).

               CATCH CX_FPM_FLOORPLAN.
          ENDTRY.


        ENDCASE.

ENDIF.

Note: I asked for a special Event because I received dumps when event id was "FPM_LEAVE_INITIAL_SCREEN".

Hope you make it working!

KR,
Thomas

TusharShinde
Active Participant
0 Kudos

Hi,

I feel @Thomas Schroeder reply is more efficient, because you dont need to create your own AppCC component and enhance your FPM Component Config. Simply enhance the class /SAPSRM/CL_FPM_OVRIDE_OIF mentioned by thomas and plugin your code to hide the desired Tab.

Also, you can refer the blog http://scn.sap.com/community/web-dynpro-abap/floorplan-manager/blog/2012/04/08/dynamically-modifying... written by @