Skip to Content

Alter Button from FPM_API dependant on which VC is currently shown?

Hi,

I want to do the following:

The button "SAVE" within FITV_FPM which is shown on a lot of VCs within the Travel Services should be visible ONLY within FITE_VC_REVIEW. I want this button to be invisible on all other VCs, for example FITE_VC_GENERAL_DATA.

Is there a way over the FPM_API or maybe in WDDOMODIFYVIEW in FITV_FPM which would make this achievable?

What I already did was hide the 'EXIT' button in general by doing a post method of WDDOMODIFYVIEW in FITV_FPM Layout View. But here I don't have the problem needing to know "where I am" at the moment VC-wise.

Cheers, Lukas

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 21, 2012 at 02:21 PM

    Hi Lukas,

    For hiding "EXIT" button, you should try doing it from Component configuration rather than WDDOMODIFYVIEW in FITV_FPM Layout View.

    Similarly for the visibility of button "SAVE", i would suggest to locate Component configuration of needed Travel services and then hide from all the VCs.

    This may be tedious task , however a better option then making changes directly in WDDOMODIFY view.

    Regards,

    Ashish Shah

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ashish,

      thank you for your reply. However I have to disagree. Although SAP "suggests" to use component- and application configurations rather than enhancements, I find enhancements to be a lot more consistent in usage, better organizable and better to understand. Another point is, in case I alter these Configurations, I meddle with the namespace from SAP and it will count as a modification, which I want to avoid at all costs. Last but not least, component configurations will not allow for differentiated customization between View Containers within the component, which is exactly what I need.

      Do you know how it could be done coding-wise? My main problem is not knowing "where" within the roadmap I currently am; is there any way I can retrieve this information? I.e./for example how does the floor plan manager know it is currently showing its buttons for FITE_VC_REVIEW rather than FITE_VC_GENERAL_DATA?

      Cheers, Lukas

  • avatar image
    Former Member
    Feb 21, 2012 at 06:38 PM

    Hi Lukas,

    In the WDDOMODIFYVIEW of the layout view (FITV_FPM) , i think we can get the name of the calling component:

    Something like this:

    1.Get referance of the controller:

    l_controller_api ?= wd_comp_controller->wd_get_api( ).

    l_component_api = l_controller_api->get_component( ).

    2.Get application name

    l_application_api = l_component_api->get_application( ).

    l_application_info = l_application_api->get_application_info( ).

    lv_app_name = l_application_info->get_name( ).

    Hope this works

    Bhanu

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Lukas Weigelt

      Hi Lukas,

      please try following coding:

      DATA lo_navigation TYPE REF TO ig_navigation .
      DATA lo_elem_step TYPE REF TO if_wd_context_element.
      DATA lo_node_caps TYPE REF TO if_wd_context_node.
      DATA lo_node_mcas TYPE REF TO if_wd_context_node.
      DATA lo_node_popups TYPE REF TO if_wd_context_node.

      lo_navigation =   wd_this->get_navigation_ctr( ).

         lo_navigation->ctx_current_step(
           IMPORTING
             eo_elem_step =      lo_elem_step              " ref to if_wd_context_element
             eo_node_caps =      lo_node_caps              " ref to if_wd_context_node
             eo_node_mcas =      lo_node_mcas              " ref to if_wd_context_node
             eo_node_popups =    lo_node_popups              " ref to if_wd_context_node
         ).

      In the object lo_elem_step you can find static attributes with the current step id ;-)

      Hope it was helpfull


      Greetings from Germany to Germany

      Christian