on 2012 Dec 27 5:25 PM
Hi All,
I need to hide 3 standard tabs in Freight order. It uses component FPM_OVP_COMPONENT. I need to hide the tabs based on the user role. I created a Authorization object to check for authorization. I was able to remove the tabs being displayed in the class: CL_FPM_OVP_ASSIST method:SET_CA_COMPOSITE_STRETCHING. But I was not able to find the application configuration id. I need to disable the tabs only for Freight orders. So I want to restrict the usage. I was able to find solutions on OIF component. But that method for OVP is not getting called in my case.
Regards,
Joseph M
Hi Joseph,
you may find the configuration ID in the context menu of the application, just reight click, in the context menu choose 'Technical help' (TM90; maybe different in eariler release), and it should bring up this screen:
/SCMTMS/WDCC_FRE_ORDER is what you are looking for.
In another way, hiding/displaying tabs can also be implemented in the controller class (/scmtms/cl_ui_controller_cmn - overwrite_event_ovp) or the controller exit class (/scmtms/cl_ui_ctrlexit_tor - overwrite_event_ovp, TM90).
These classes are all maintained in standard component configuration or its FBI view's cofiguration.
Best regards
Sensen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sensen,
I tried to remove the tabs in debugging for the Freight order. I placed the break point in method IWCI_IF_FPM_OVP_CONF_EXIT~OVERRIDE_EVENT_OVP of class /SCMTMS/CL_UI_CONTROLLER_CMN.I removed the tabs from IO_OVP (MT_UIBB,MT_UIBB_API) and it worked. I am working on TM 8.0 release. We have three WD configurations for Freight order like Truck, Rail. So I would want to know which configuration is being called before hiding the tab for particular user. Can you provide a sample code to retrieve the application configuration being called and how to specifically remove the tabs for TOR as I believe class is common and will be called for all the FPM configurations.
Also I believe this class is present in the UI layer. Won't it cause security issues if we write code to dynamically manipulate tabs in the class. I was able to achieve the functionality in the class /SCMTMS/CL_UI_BOOTSTRAP_TOR. But this idea was turned down by SAP counterpart due to security violations.
Regards,
Joseph M
Hi Joseph
Now I understand your question, we have similair situation in our project, where we have customizing table for different TOR types, controlling for which TOR type the tab is visible or not.
A possible solution would be retrieve the TOR data,
and get out the TOR type ls_root_data-tor_type which must be different for truck and rail,
then change the attribute
ls_uibb-hidden = if_fpm_constants=>gc_hidden-hidden/not_hidden.
*---------------------------------------------------------------------------------------------------------------*
mo_controller->/bofu/if_fbi_controller~get_node_data(
EXPORTING
iv_bo_key = /scmtms/if_tor_c=>sc_bo_key
iv_node_key = /scmtms/if_tor_c=>sc_node-root
it_keys = lt_tor_key
IMPORTING
et_data = lt_root_data ).
ENDIF.
READ TABLE lt_root_data INTO ls_root_data INDEX 1.
IF sy-subrc GT 0.
RETURN.
ENDIF.
TRY.
ls_contentarea = io_ovp->get_current_content_area( ).
io_ovp->get_uibbs(
EXPORTING
iv_content_area = ls_contentarea-id
IMPORTING
et_uibb = lt_uibb ).
CATCH cx_fpm_floorplan ##no_handler.
ENDTRY.
* Check and set tab visibility
DO 2 TIMES.
CLEAR: ls_uibb, lv_visible.
CASE sy-tabix.
WHEN 1.
"check TOM tab visibility from customizing table
check_tab_visible_tom(
EXPORTING
is_root_data = ls_root_data
it_uibb = lt_uibb
iv_config_id = /tmpan/if_const=>sc_conf_id-tom_tab
IMPORTING
es_uibb = ls_uibb
ev_visible = lv_visible
).
WHEN 2.
"check IPAWS visibility from customizing table
check_tab_visible_ipaws(
EXPORTING
is_root_data = ls_root_data
it_uibb = lt_uibb
iv_config_id = /tmpan/if_const=>sc_conf_id-ipaw_tab
IMPORTING
es_uibb = ls_uibb
ev_visible = lv_visible
).
ENDCASE.
"Set tab visibility
IF lv_visible = abap_true AND ls_uibb-hidden = if_fpm_constants=>gc_hidden-hidden.
ls_uibb-hidden = if_fpm_constants=>gc_hidden-not_hidden.
lv_ovp_changed = abap_true.
ELSEIF lv_visible = abap_false AND ls_uibb-hidden = if_fpm_constants=>gc_hidden-not_hidden.
ls_uibb-hidden = if_fpm_constants=>gc_hidden-hidden.
lv_ovp_changed = abap_true.
ENDIF.
IF lv_ovp_changed = abap_true.
TRY.
io_ovp->change_uibb(
EXPORTING
is_uibb = ls_uibb ).
CATCH cx_fpm_floorplan ##no_handler.
ENDTRY.
ENDIF.
*---------------------------------------------------------------------------------------------------------------*
User | Count |
---|---|
7 | |
7 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.