Skip to Content
0
Jan 04, 2012 at 04:58 PM

Show accounting tab in CTR

38 Views

Hi experts,

I have a requirement in which I need to display the accounting tab in CTR. By default this tab is hidden.

I don't know if I can display it by customizing.

I'm trying to enchance the webdynpro in order to display this tab, but no luck...

In the component /SAPSRM/WDC_DOFC_CTR_I_D1 I can see the visible property of tab D_I_PS_GM_ACC has a binding with the attribute PS_GM_ACC_VISIBLE in the context. But this attribute is created in other enhancement point so I can't access to it within my enhancement point.

I've tried it with the following code but there is a syntax error, (The type "element_context-ps_gm_acc_visible" is unknown,)

DATA: lo_el_context TYPE REF TO if_wd_context_element,
          ls_context TYPE wd_this->element_context,
          lv_zz_visible_acc TYPE wd_this->element_context-ps_gm_acc_visible.
    lo_el_context = wd_context->get_element( ).
    lv_zz_visible_acc = 'X'.
    lo_el_context->set_attribute(
      name =  `PS_GM_ACC_VISIBLE`
      value = lv_zz_visible_acc ).

I've also tried to create a new attribute in order to modify the binding but it seems that the tab is not instanciated in the tabstrib;

    DATA: lo_ui_tab_st TYPE REF TO cl_wd_tabstrip,
          lo_tab_acc   TYPE REF TO cl_wd_tab.
    lo_ui_tab_st ?= view->get_element( 'ITEM_TABSTRIP' ).
    CALL METHOD lo_ui_tab_st->get_tab
      EXPORTING
        id      = 'D_I_PS_GM_ACC'
      RECEIVING
        the_tab = lo_tab_acc.
    IF lo_tab_acc IS NOT INITIAL.
      CALL METHOD lo_tab_acc->bind_visible
        EXPORTING
          path = 'ZZ_VISUALIZACION.VISIBLE'.
    ENDIF.

lo_tab_acc is always NULL, I've debugged the code and I can see within LO_UI_TAB_ST there is an attribute called CH_TABS that have all the tabs, but there isn't the accounting tab.

Do you know if is possible to do it?

Thanks in advance.

Regards,

Ricardo.