<?xml version="1.0" encoding="utf-16"?>
<WDYN COMPONENT_NAME="ZMC_MENU_V2" VERSION="A" TYPE="0" CMP_CONTROLLER="COMPONENTCONTROLLER" CMP_INTERFACE="COMPONENTINTERFACE" DISPLAY_NAME="ZMC_MENU_V2" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141215" GENDATE="20141215" GENTIME="224632" CONFIG_EXPL_PROP="0" CONFIG_IMPL_PROP="0" P13N_EXPL_PROP="0" P13N_IMPL_PROP="0" ASSISTANCE_CLASS="ZCL_ZMC_TERMINAL">
 <wdy_componentt COMPONENT_NAME="ZMC_MENU_V2" LANGU="C" DESCRIPTION="Barcode apps menu"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_BC_CONFRIM" VERSION="I" USED_COMPONENT="ZMC_BC_CONFRIM" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_BC_PRIJEM" VERSION="I" USED_COMPONENT="ZMC_BC_PRIJEM" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_BC_VIEW_BIN" VERSION="I" USED_COMPONENT="ZMC_BC_VIEW_BIN" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_BC_VIEW_MAT" VERSION="I" USED_COMPONENT="ZMC_BC_VIEW_MAT" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_DODAK" VERSION="I" USED_COMPONENT="ZMC_DODAK" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_HIST_SP" VERSION="I" USED_COMPONENT="ZMC_HIST_SP" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_IKANBAN" VERSION="I" USED_COMPONENT="ZMC_IKANBAN" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_INT_PRESUN" VERSION="I" USED_COMPONENT="ZMC_INT_PRESUN" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_KANBAN_OD_DODAV" VERSION="I" USED_COMPONENT="ZMC_KANBAN_OD_DODAV" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_KANBAN_TRAFO" VERSION="I" USED_COMPONENT="ZMC_KANBAN_TRAFO" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_KANBAN_TRAFO2" VERSION="I" USED_COMPONENT="ZMC_KANBAN_TRAFO2" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_KANBAN_Z_VYROBY" VERSION="I" USED_COMPONENT="ZMC_KANBAN_Z_VYROBY" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_MAT_DO_EXP_IM" VERSION="I" USED_COMPONENT="ZMC_MAT_DO_EXP_IM" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PREHL_S_MIST" VERSION="I" USED_COMPONENT="ZMC_PREHL_S_MIST" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PREHL_ZASOB" VERSION="I" USED_COMPONENT="ZMC_PREHL_ZASOB" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PRESKLADNENI" VERSION="I" USED_COMPONENT="ZMC_PRESKLADNENI" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PRESKLADNENI2" VERSION="I" USED_COMPONENT="ZMC_PRESKLADNENI2" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PRESKL_KANBAN" VERSION="I" USED_COMPONENT="ZMC_PRESKL_KANBAN" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PREUCT_KJ_DO_V" VERSION="I" USED_COMPONENT="ZMC_PREUCT_KJ_DO_V" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PRIJEM_K_VZ" VERSION="I" USED_COMPONENT="ZMC_PRIJEM_K_VZ" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_PRIJEM_K_VZ2" VERSION="I" USED_COMPONENT="ZMC_PRIJEM_K_VZ2" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <wdy_compo_usage COMPONENT_NAME="ZMC_MENU_V2" COMPO_USAGE_NAME="ZMC_VYDEJ_K_VZ" VERSION="I" USED_COMPONENT="ZMC_VYDEJ_K_VZ" CARDINALITY="00" USAGE_TYPE="CL_WDY_MD_COMPONENT_USAGE"/>
 <view_definition COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" VERSION="A" TYPE="CL_WDY_MD_VIEW" VIEW_TYPE="00" LIFESPAN="0" VIEW_CONTROLLER="V_MAIN_V" ROOT_UI_CONT="ROOTUIELEMENTCONTAINER" DISPLAY_NAME="V_MAIN_V" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141211" VISIBILITY="00">
  <wdy_iobound_plug COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" PLUG_NAME="DEFAULT" VERSION="I" PLUG_TYPE="CL_WDY_MD_INBOUND_PLUG" IN_PLUG_TYPE="0" OUT_PLUG_TYPE="0" DISPLAY_NAME="DEFAULT"/>
  <wdy_iobound_plug COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" PLUG_NAME="TO_KANBAN_Z_VYROBY" VERSION="I" PLUG_TYPE="CL_WDY_MD_OUTBOUND_PLUG" IN_PLUG_TYPE="0" OUT_PLUG_TYPE="0" DISPLAY_NAME="TO_KANBAN_Z_VYROBY"/>
  <wdy_ui_element COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" ELEMENT_POSITION="0 " UI_ELEMENT_TYPE="CL_WDY_MD_TRANSP_CONTAINER" DISPLAY_NAME="ROOTUIELEMENTCONTAINER" UI_ELEM_DEF_LIB="STANDARD" UI_ELEMENT_DEF="TRANSPARENT_CONTAINER"/>
  <wdy_ui_element COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" ELEMENT_POSITION="1 " UI_ELEMENT_TYPE="CL_WDY_MD_GRID_LAYOUT" DISPLAY_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" UI_ELEM_DEF_LIB="STANDARD" UI_ELEMENT_DEF="GRID_LAYOUT" PARENT_NAME="ROOTUIELEMENTCONTAINER" AGGREGATION_NAME="LAYOUT"/>
  <wdy_ui_element COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" VERSION="I" ELEMENT_POSITION="1 " UI_ELEMENT_TYPE="CL_WDY_MD_TIMED_TRIGGER" DISPLAY_NAME="TM_TIMER" UI_ELEM_DEF_LIB="STANDARD" UI_ELEMENT_DEF="TIMED_TRIGGER" PARENT_NAME="ROOTUIELEMENTCONTAINER" AGGREGATION_NAME="CHILDREN"/>
  <wdy_ui_element COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" ELEMENT_POSITION="1 " UI_ELEMENT_TYPE="CL_WDY_MD_GRID_DATA" DISPLAY_NAME="TM_TIMER_LD" UI_ELEM_DEF_LIB="STANDARD" UI_ELEMENT_DEF="GRID_DATA" PARENT_NAME="TM_TIMER" AGGREGATION_NAME="LAYOUT_DATA"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="ARIA_LANDMARK" PROPERTY_VALUE="10"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="CONTEXT_MENU_BEHAVIOUR" PROPERTY_VALUE="00"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="ENABLED" PROPERTY_VALUE="X"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="HEIGHT" PropText=""/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="IS_LAYOUT_CONTAINER" PROPERTY_VALUE="X"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="SCROLLING_MODE" PROPERTY_VALUE="02"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="SCROLL_LEFT" PROPERTY_VALUE="0"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="SCROLL_TOP" PROPERTY_VALUE="0"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="VISIBLE" PROPERTY_VALUE="02"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER" VERSION="I" PROPERTY_NAME="WIDTH" PROPERTY_VALUE="100%"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="CELL_PADDING" PROPERTY_VALUE="2"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="CELL_SPACING" PROPERTY_VALUE="5"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="COL_COUNT" PROPERTY_VALUE="1"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="STRETCHED_HORIZONTALLY" PropText=""/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="STRETCHED_VERTICALLY" PropText=""/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="TAB_ORDER" PROPERTY_VALUE="02"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="ROOTUIELEMENTCONTAINER_LAYOUT" VERSION="I" PROPERTY_NAME="WRAPPING" PROPERTY_VALUE="X"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" VERSION="I" PROPERTY_NAME="CONTEXT_MENU_BEHAVIOUR" PROPERTY_VALUE="00"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" VERSION="I" PROPERTY_NAME="DELAY" PROPERTY_VALUE="0"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" VERSION="I" PROPERTY_NAME="ENABLED" PROPERTY_VALUE="X"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" VERSION="I" PROPERTY_NAME="VISIBLE" PROPERTY_VALUE="02"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" PROPERTY_NAME="CELL_BACKGROUND_DESIGN" PROPERTY_VALUE="00"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" PROPERTY_NAME="COL_SPAN" PROPERTY_VALUE="1"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" PROPERTY_NAME="H_ALIGN" PROPERTY_VALUE="08"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" PROPERTY_NAME="SEMANTIC_COLOR" PROPERTY_VALUE="00"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" PROPERTY_NAME="V_ALIGN" PROPERTY_VALUE="00"/>
  <wdy_ui_property COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER_LD" VERSION="I" PROPERTY_NAME="WIDTH" PROPERTY_VALUE="1%"/>
  <wdy_ui_ctx_bind COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" BINDING_NAME="DELAY" VERSION="I" UI_ELEM_PROPERTY="DELAY" BOUND_CTX_NODE="TIMER_CONF" BOUND_CTX_ATTRIB="REFRESH_RATE"/>
  <wdy_ui_evt_bind COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="V_MAIN_V" ELEMENT_NAME="TM_TIMER" BINDING_NAME="ON_ACTION" VERSION="I" UI_ELEM_EVENT="ON_ACTION" BOUND_ACTION="ON_TIMER"/>
  <controller_definition COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" VERSION="A" CONTROLLER_TYPE="01" CONTEXT="CONTEXT" DISPLAY_NAME="V_MAIN_V" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141211">
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="BUTTON_PUSHED" VERSION="I" CMPTYPE="CL_WDY_MD_ACTION" CMP_POSITION="0 " VISIBILITY="0" DISPLAY_NAME="BUTTON_PUSHED" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="CREATE_APP_BUTTONS" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="CREATE_APP_BUTTONS" CODE_BODY="method CREATE_APP_BUTTONS .

&quot;VYTVORENIE BUTTONOV PRE APLIKACIE KU KTORYM MA UZIV PRISTUP



DATA:  LR_BUTTON TYPE REF TO CL_WD_BUTTON.

*       LT_PARAMS TYPE WDR_NAME_VALUE_LIST,

*       LS_PARAMS TYPE LINE OF WDR_NAME_VALUE_LIST.



DATA: lv_text       TYPE WDY_MD_TRANSLATABLE_TEXT.

DATA: lr_container  TYPE REF TO cl_wd_uielement_container.

DATA: lr_grid_data  TYPE REF TO CL_WD_GRID_DATA.





DATA lv_menu_title    TYPE ZRF_USR_MENU-TITLE.

DATA lv_bname         TYPE STRING. &quot; meno buttonu

DATA ls_apl_menu      TYPE ZRF_APL_MENU.

DATA lv_app_descrp    TYPE TXT50.



  &quot;referencia na VIEW

  lr_container ?= VW-&gt;get_element( &apos;ROOTUIELEMENTCONTAINER&apos; ).





&quot;Vytvaranie stylu buttonu

data l_style_manager  type ref to if_wd_custom_style_manager.

data l_style          type ref to if_wd_custom_style.



&quot; Get the custom style manager

l_style_manager =

  wd_comp_controller-&gt;wd_get_api(

    )-&gt;get_application(

      )-&gt;get_custom_style_manager( ).



&quot; Create a new custom style with name myButtonStyle for BUTTON elements

l_style =

  l_style_manager-&gt;create_custom_style(

    style_class_name = &apos;mobileButtonClass&apos;

      element_type     = &apos;BUTTON&apos; ).





*fontSize

*fontFamily

*fontColor

*borderRadius

*backgroundColor

*hoverBackgroundColor



&quot; Set font color to red

l_style-&gt;add_style_property( name  = &apos;fontSize&apos;

                              value = &apos;0.8em&apos;).



l_style-&gt;add_style_property( name  = &apos;fontColor&apos;

                               value = &apos;red&apos; ).



l_style-&gt;add_style_property( name  = &apos;backgroundColor&apos;

                               value = &apos;white&apos; ).







l_style-&gt;add_style_property(  name  = &apos;borderRadius&apos;

                              value = &apos;15px&apos;).



l_style-&gt;add_style_property(  name  = &apos;fontWeight&apos;

                              value = &apos;bold&apos;).



l_style-&gt;add_style_property(  name  = &apos;text-align&apos;

                              value = &apos;left&apos;).



&quot; Add custom style

l_style_manager-&gt;add_custom_style( l_style ).







&quot;hladanie menu ktore ma uziv priradene

SELECT TITLE

  INTO lv_menu_title

  FROM ZRF_USR_MENU

  WHERE

    bname eq sy-uname.



  &quot;priradene aplikacie vramci menu

  SELECT *

    INTO ls_apl_menu

    FROM ZRF_APL_MENU

    WHERE

      title eq lv_menu_title.



      &quot;prevod mien aplikacii na mena vytvaranych tlacidiel

      move ls_apl_menu-Z_APL to lv_bname.



      &quot;Popisok aplikacie

      SELECT SINGLE  ZAPLTXT

        into lv_app_descrp

        from zapl

        where

          z_apl eq ls_apl_menu-Z_APL.



      CHECK sy-subrc eq 0.



      REPLACE REGEX &apos;ZMC&apos; IN lv_bname WITH  &apos;BT&apos;.

      &quot;REPLACE REGEX &apos;ZMC&apos; IN lv_aname WITH  &apos;ACT&apos;.





      &quot;Tvorba popisku tlacidla

      CONCATENATE

        ls_apl_menu-PREFIX

        lv_app_descrp

        ls_apl_menu-SUFIX

       INTO

        lv_text.



     &quot;Vytvorenie buttonu pre odkaz na aplikaciu

     CALL METHOD cl_wd_button=&gt;new_button

      EXPORTING

        STYLE_CLASS_NAME = &apos;mobileButtonClass&apos;

        enabled   = &apos;X&apos;

        id        = lv_bname

        on_action = &apos;BUTTON_PUSHED&apos;&quot;metoda volana pre vsetky

        text      = lv_text

        width     = WD_ASSIST-&gt;APL_BUTTON_WIDTH&quot;&apos;85%&apos;

      RECEIVING

        control   = lr_button.



    &quot;Nastavenie Layoutu

    lr_grid_data

     = cl_wd_grid_data=&gt;new_grid_data( element = lr_button ).



    &quot;pridanie do layoutu

    CALL METHOD lr_container-&gt;add_child

      EXPORTING

        the_child = lr_button.



  ENDSELECT.

ENDSELECT.





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="HANDLEDEFAULT" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_VIEW_NAME="V_MAIN_V" REF_PLUG_NAME="DEFAULT" DISPLAY_NAME="HANDLEDEFAULT" CODE_BODY="method HANDLEDEFAULT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ONACTIONBUTTON_PUSHED" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_CTLR_NAME="V_MAIN_V" REF_CMPNAME="BUTTON_PUSHED" DISPLAY_NAME="ONACTIONBUTTON_PUSHED" CODE_BODY="method ONACTIONBUTTON_PUSHED .

&quot;metoda pokryvajuca vsetky dynamicky generovane tlacidla



  DATA: lv_id TYPE string.

  DATA: lv_char25 TYPE char25.

  &quot;indentifikator stlaceneho buttonu

  lv_id = wdevent-&gt;get_string( &apos;ID&apos; ).

  move lv_id to lv_char25.



  data  lr_api TYPE REF TO IF_WD_VIEW_CONTROLLER.

  lr_api = wd_this-&gt;wd_get_api( ).





  REPLACE REGEX &apos;BT&apos; in lv_char25 WITH &apos;ZMC&apos;.

  &quot;premazanie uz existujucich instancii komponent

  wd_comp_controller-&gt;CHCK_DEL_BOUNDING( lv_char25  ).



  &quot;zmena prefixu, tak aby odpovedal nazvom plugov

  REPLACE REGEX &apos;BT&apos; in lv_id WITH &apos;TO&apos;.

  lr_api-&gt;fire_plug( lv_id ).





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ONACTIONON_TIMER" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_CTLR_NAME="V_MAIN_V" REF_CMPNAME="ON_TIMER" DISPLAY_NAME="ONACTIONON_TIMER" CODE_BODY="method ONACTIONON_TIMER .

  wd_comp_controller-&gt;refresh_page( ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ON_TIMER" VERSION="I" CMPTYPE="CL_WDY_MD_ACTION" CMP_POSITION="0 " VISIBILITY="0" DISPLAY_NAME="ON_TIMER" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOAFTERACTION" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOAFTERACTION" CODE_BODY="method WDDOAFTERACTION .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOBEFOREACTION" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOBEFOREACTION" CODE_BODY="method WDDOBEFOREACTION .

*  data lo_api_controller type ref to if_wd_view_controller.

*  data lo_action         type ref to if_wd_action.

*

*  lo_api_controller = wd_this-&gt;wd_get_api( ).

*  lo_action = lo_api_controller-&gt;get_current_action( ).

*

*  if lo_action is bound.

*    case lo_action-&gt;name.

*      when &apos;...&apos;.

*

*    endcase.

*  endif.

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOEXIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOEXIT" CODE_BODY="method WDDOEXIT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOINIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOINIT" CODE_BODY="method WDDOINIT .

*  wd_this-&gt;HIDE_APP_BUTTONS( ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOMODIFYVIEW" CODE_BODY="method WDDOMODIFYVIEW .



  IF FIRST_TIME eq &apos;X&apos;.

    wd_this-&gt;CREATE_APP_BUTTONS( VIEW ).

  ENDIF.





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOONCONTEXTMENU" CODE_BODY="method WDDOONCONTEXTMENU .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="CREATE_APP_BUTTONS" LANGU="C" DESCRIPTION="Skryva aplikacie na ktore nema user opravnenie"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ONACTIONON_TIMER" LANGU="C" DESCRIPTION="Zopnutie casovaca"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ON_TIMER" LANGU="C" DESCRIPTION="Zopnutie casovaca"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOAFTERACTION" LANGU="C" DESCRIPTION="Method for non-action specific operations before navigation"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOBEFOREACTION" LANGU="C" DESCRIPTION="Method for Validation of User Input"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOEXIT" LANGU="C" DESCRIPTION="Controller Clean-Up Method"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOINIT" LANGU="C" DESCRIPTION="Controller Initialization Method"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" LANGU="C" DESCRIPTION="Method for Modifying the View Before Rendering"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" LANGU="C" DESCRIPTION="Method for Modifying the Context Menu"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="CREATE_APP_BUTTONS" PARAMETER_NAME="VW" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_VIEW" DISPLAY_NAME="VW"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" PARAMETER_NAME="FIRST_TIME" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="0" ABAP_TYPE="WDY_BOOLEAN" DISPLAY_NAME="FIRST_TIME"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" PARAMETER_NAME="VIEW" VERSION="I" PARAM_POSITION="2 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_VIEW" DISPLAY_NAME="VIEW"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" PARAMETER_NAME="CONTEXT_MENU_EVENT" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_CONTEXT_MENU_EVENT" DISPLAY_NAME="CONTEXT_MENU_EVENT"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" PARAMETER_NAME="CONTEXT_MENU_MANAGER" VERSION="I" PARAM_POSITION="2 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_CONTEXT_MENU_MANAGER" DISPLAY_NAME="CONTEXT_MENU_MANAGER"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" PARAMETER_NAME="MENU" VERSION="I" PARAM_POSITION="3 " DECLARATION_TYPE="3" ABAP_TYPING="1" ABAP_TYPE="CL_WD_MENU" DISPLAY_NAME="MENU"/>
   <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CTLR_USAGE_NAME="4TD2M0ENWU8WCFQ73ZPATJQCV" VERSION="I" USED_CONTROLLER="COMPONENTCONTROLLER"/>
   <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="CONTEXT" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" NODE_POSITION="0 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="01" SINGLETON="X" DISPLAY_NAME="CONTEXT" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
   <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" PARENT_NODE_NAME="CONTEXT" NODE_POSITION="1 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="00" DISPLAY_NAME="TIMER_CONF" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
   <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="MAX_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="2 " READ_ONLY="X" DEFAULT_VALUE="2" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="MAX_SPEED" VALUE_HELP_MODE="0"/>
   <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="MEDIUM_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="3 " READ_ONLY="X" DEFAULT_VALUE="10" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="MEDIUM_SPEED" VALUE_HELP_MODE="0"/>
   <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="REFRESH_RATE" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="1 " ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="REFRESH_RATE" VALUE_HELP_MODE="0"/>
   <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="SLOW_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="4 " READ_ONLY="X" DEFAULT_VALUE="100" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="SLOW_SPEED" VALUE_HELP_MODE="0"/>
   <wdy_ctx_mapping COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CTLR_USAGE_NAME="4TD2M0ENWU8WCFQ73ZPATJQCV" CTX_MAPP_NAME="4WZ2Q9D1IAGQHLWSGPK0CTFSF" VERSION="I" MAPPING_TYPE="02" OWN_NODE_NAME="TIMER_CONF" MAP_NODE_NAME="TIMER_CONF"/>
  </controller_definition>
 </view_definition>
 <view_definition COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="W_MAIN_V" VERSION="A" TYPE="CL_WDY_MD_WINDOW" VIEW_TYPE="00" LIFESPAN="0" VIEW_CONTROLLER="W_MAIN_V" DISPLAY_NAME="W_MAIN_V" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141128" VISIBILITY="00">
  <view_window title=""/>
  <wdy_iobound_plug COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="W_MAIN_V" PLUG_NAME="DEFAULT" VERSION="I" PLUG_TYPE="CL_WDY_MD_INBOUND_PLUG" IN_PLUG_TYPE="1" OUT_PLUG_TYPE="0" DISPLAY_NAME="DEFAULT" IS_INTF_ITEM="X"/>
  <wdy_iobound_plug COMPONENT_NAME="ZMC_MENU_V2" VIEW_NAME="W_MAIN_V" PLUG_NAME="LOGOUT" VERSION="I" PLUG_TYPE="CL_WDY_MD_OUTBOUND_PLUG" IN_PLUG_TYPE="0" OUT_PLUG_TYPE="1" DISPLAY_NAME="LOGOUT" IS_INTF_ITEM="X"/>
  <controller_definition COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" VERSION="A" CONTROLLER_TYPE="06" CONTEXT="CONTEXT" DISPLAY_NAME="W_MAIN_V" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141128">
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="HANDLEDEFAULT" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_VIEW_NAME="W_MAIN_V" REF_PLUG_NAME="DEFAULT" DISPLAY_NAME="HANDLEDEFAULT" CODE_BODY="method HANDLEDEFAULT .

endmethod." ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOEXIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOEXIT" CODE_BODY="method WDDOEXIT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOINIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOINIT" CODE_BODY="method WDDOINIT .

    &quot;dynamicke nastavenie plugov na pouzite komponenty WD

  DATA lr_window TYPE REF TO if_wd_window_controller.

  DATA lr_rr_window TYPE REF TO if_wd_rr_window.



  DATA lr_V_MAIN_V_usage TYPE REF TO IF_WD_RR_VIEW_USAGE.

  DATA lr_current_usage TYPE REF TO IF_WD_RR_VIEW_USAGE.

  DATA view_V_MAIN_V_name TYPE string.

*  DATA str TYPE string.



  lr_window ?= wd_this-&gt;wd_get_api( ).

  lr_rr_window = lr_window-&gt;GET_WINDOW_INFO( ).



  DATA lt_usages TYPE TABLE OF zapl.

  DATA wa_usages TYPE zapl.

  DATA ZRF_APL_UZIV TYPE ZRF_APL_UZIV.







  &quot;Ziskanie mena komponentu

  DATA lr_comp_api  TYPE REF TO IF_WD_COMPONENT.

  DATA lv_comp_info TYPE REF TO IF_WD_RR_COMPONENT.

  DATA lv_comp_name TYPE string.

  lr_comp_api = WD_COMP_CONTROLLER-&gt;WD_GET_API( ).

  lv_comp_info = lr_comp_api-&gt;GET_COMPONENT_INFO( ).

  lv_comp_name = lv_comp_info-&gt;GET_NAME( ).





  &quot;pridanie V_MAIN_V do W_MAIN_V

  lr_V_MAIN_V_usage = lr_rr_window-&gt;embed_view(

          USED_VIEW_NAME       = &apos;V_MAIN_V&apos;

          USED_COMPONENT_NAME  = lv_comp_name&quot; &apos;ZMC_MENU_V2&apos;

          ).

    &quot;Ziskanie mena view

  view_V_MAIN_V_name = lr_V_MAIN_V_usage-&gt;get_name( ).





  &quot;natiahnutie vsetkych aplikacii ku ktorym ma aktualny

  &quot;uzivatel pristup

  DATA lv_menu_title TYPE ZRF_USR_MENU-title.

  DATA lv_apl TYPE ZRF_APL_MENU-Z_APL.



  SELECT title

    INTO lv_menu_title

    FROM ZRF_USR_MENU

    WHERE

      bname eq sy-uname.



    SELECT z_apl

      INTO lv_apl

      FROM ZRF_APL_MENU

      WHERE

        TITLE eq lv_menu_title.



      SELECT SINGLE *

        INTO wa_usages

        FROM zapl

        WHERE

          z_apl eq lv_apl.

        CHECK sy-subrc eq 0.



        APPEND wa_usages to lt_usages.



    ENDSELECT.

  ENDSELECT.





  &quot;Dynamicke generovanie vystupnych plugov

  LOOP AT lt_usages INTO wa_usages.



    DATA lv_tmp TYPE string.

    DATA lv_pos TYPE string.



    MOVE wa_usages-Z_APL TO lv_tmp.

    MOVE sy-index to lv_pos.



  &quot;dynamicke pridavanie VIEWs pre pouzite komponenty

   lr_current_usage = lr_rr_window-&gt;embed_view(

          USED_VIEW_NAME       = lv_tmp

          USED_COMPONENT_NAME  = lv_tmp

          ).



    DATA NAME TYPE string.

    DATA TARGET_VIEW_USAGE_NAME TYPE string.

    MOVE wa_usages-z_apl to name.



    TARGET_VIEW_USAGE_NAME = lr_current_usage-&gt;get_name( ).





    &quot;ZMC_BC_CONFIRM &gt; TO_BC_CONFIRM ...  atd.

    DATA SOURCE_PLUG_NAME TYPE string.

    move NAME to SOURCE_PLUG_NAME .

    REPLACE REGEX &apos;ZMC&apos; in SOURCE_PLUG_NAME with &apos;TO&apos;.



    &quot;VZAJOMNE PREPOJENIE PLUGOV

    lr_V_MAIN_V_usage-&gt;create_navigation_target(

          NAME = NAME

          SOURCE_PLUG_NAME =  SOURCE_PLUG_NAME

          TARGET_PLUG_NAME = &apos;DEFAULT&apos;

          TARGET_VIEW_USAGE_NAME = TARGET_VIEW_USAGE_NAME

    ).



    lr_current_usage-&gt;create_navigation_target(

          NAME = NAME

          SOURCE_PLUG_NAME = &apos;TO_MENU&apos;

          TARGET_PLUG_NAME = &apos;DEFAULT&apos;

          TARGET_VIEW_USAGE_NAME = view_V_MAIN_V_name

    ).



  ENDLOOP.



  &quot; po pridani vsetkych views, nastavenie korenoveho

  lr_rr_window-&gt;SET_DEFAULT_ROOT_VUSAGE(

      view_usage_name = view_V_MAIN_V_name

  ).





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONCLOSE" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOONCLOSE" CODE_BODY="method WDDOONCLOSE .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONOPEN" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOONOPEN" CODE_BODY="method WDDOONOPEN .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOEXIT" LANGU="C" DESCRIPTION="Controller Clean-Up Method"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOINIT" LANGU="C" DESCRIPTION="Controller Initialization Method"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONCLOSE" LANGU="C" DESCRIPTION="Handling For Closing of Window"/>
   <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONOPEN" LANGU="C" DESCRIPTION="Handling For Opening of Window"/>
   <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONOPEN" PARAMETER_NAME="WINDOW_DESCR" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_WINDOW_DESCRIPTION" DISPLAY_NAME="WINDOW_DESCR"/>
   <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CTLR_USAGE_NAME="4TD2M06ZDVN6TT6QY5MYJHRN3" VERSION="I" USED_CONTROLLER="COMPONENTCONTROLLER"/>
   <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" NODE_NAME="CONTEXT" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" NODE_POSITION="0 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="01" SINGLETON="X" DISPLAY_NAME="CONTEXT" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
  </controller_definition>
 </view_definition>
 <controller_definition COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" VERSION="A" CONTROLLER_TYPE="02" CONTEXT="CONTEXT" DISPLAY_NAME="COMPONENTCONTROLLER" RUNTIME_OBJECT="ZIWCI_MC_MENU_V2" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141215">
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="CHCK_DEL_BOUNDING" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="CHCK_DEL_BOUNDING" CODE_BODY="method CHCK_DEL_BOUNDING .



DATA lv_tmp TYPE string.

DATA lo_cmp_usage type ref to if_wd_component_usage.



   &quot;WD_CPUSE__&lt;MENO KOMPONENTY&gt;

   &quot;vsetko velkym !!!!

  CONCATENATE &apos;WD_CPUSE_&apos; COMP_NAME INTO lv_tmp.



TRY.&quot;dynamicke volanie metody

  CALL METHOD wd_this-&gt;(lv_tmp)

    RECEIVING   result = lo_cmp_usage.



CATCH CX_SY_DYN_CALL_ILLEGAL_METHOD .

ENDTRY.





  if lo_cmp_usage-&gt;has_active_component( ) is not initial.

    lo_cmp_usage-&gt;delete_component( ).

  endif.





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="PREFILL_TIMER_CONTEXT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="PREFILL_TIMER_CONTEXT" CODE_BODY="method PREFILL_TIMER_CONTEXT .



  DATA lo_nd_timer_conf TYPE REF TO if_wd_context_node.

  DATA lo_el_timer_conf TYPE REF TO if_wd_context_element.

  DATA ls_timer_conf TYPE wd_this-&gt;Element_timer_conf.



  lo_nd_timer_conf = wd_context-&gt;get_child_node( name =

wd_this-&gt;wdctx_timer_conf ).



  lo_el_timer_conf = lo_nd_timer_conf-&gt;get_element( ).



  ls_timer_conf-refresh_rate = WD_ASSIST-&gt;TIMER_SLOW.

  ls_timer_conf-max_speed    = WD_ASSIST-&gt;TIMER_FAST.

  ls_timer_conf-medium_speed = WD_ASSIST-&gt;TIMER_MEDIUM.

  ls_timer_conf-slow_speed   = WD_ASSIST-&gt;TIMER_SLOW.



* set all declared attributes

  lo_el_timer_conf-&gt;set_static_attributes(

  static_attributes = ls_timer_conf ).



endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="REFRESH_PAGE" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="REFRESH_PAGE" CODE_BODY="method REFRESH_PAGE .

  wd_this-&gt;SET_TIMER_SLOW( ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="SET_TIMER_FAST" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="SET_TIMER_FAST" CODE_BODY="method SET_TIMER_FAST .

*--------------------- CW READ/SET(TIMER_CONF)

*------------------------------------

   DATA lo_nd_timer_conf TYPE REF TO if_wd_context_node.

   DATA lo_el_timer_conf TYPE REF TO if_wd_context_element.

   DATA ls_timer_conf TYPE wd_this-&gt;Element_timer_conf.

   lo_nd_timer_conf = wd_context-&gt;get_child_node( name =

wd_this-&gt;wdctx_timer_conf ).

   lo_el_timer_conf = lo_nd_timer_conf-&gt;get_element( ).

   lo_el_timer_conf-&gt;get_static_attributes(

     IMPORTING

       static_attributes = ls_timer_conf ).

*--------------------- CW READ/SET(TIMER_CONF)

*------------------------------------



  ls_timer_conf-refresh_rate = ls_timer_conf-max_speed.

  lo_el_timer_conf-&gt;set_static_attributes( ls_timer_conf ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="SET_TIMER_MEDIUM" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="SET_TIMER_MEDIUM" CODE_BODY="method SET_TIMER_MEDIUM .

*--------------------- CW READ/SET(TIMER_CONF)

*------------------------------------

   DATA lo_nd_timer_conf TYPE REF TO if_wd_context_node.

   DATA lo_el_timer_conf TYPE REF TO if_wd_context_element.

   DATA ls_timer_conf TYPE wd_this-&gt;Element_timer_conf.

   lo_nd_timer_conf = wd_context-&gt;get_child_node( name =

wd_this-&gt;wdctx_timer_conf ).

   lo_el_timer_conf = lo_nd_timer_conf-&gt;get_element( ).

   lo_el_timer_conf-&gt;get_static_attributes(

     IMPORTING

       static_attributes = ls_timer_conf ).

*--------------------- CW READ/SET(TIMER_CONF)

*------------------------------------



  ls_timer_conf-refresh_rate = ls_timer_conf-medium_speed.

  lo_el_timer_conf-&gt;set_static_attributes( ls_timer_conf ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="SET_TIMER_SLOW" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="SET_TIMER_SLOW" CODE_BODY="method SET_TIMER_SLOW .

*--------------------- CW READ/SET(TIMER_CONF)

*------------------------------------

   DATA lo_nd_timer_conf TYPE REF TO if_wd_context_node.

   DATA lo_el_timer_conf TYPE REF TO if_wd_context_element.

   DATA ls_timer_conf TYPE wd_this-&gt;Element_timer_conf.

   lo_nd_timer_conf = wd_context-&gt;get_child_node( name =

wd_this-&gt;wdctx_timer_conf ).

   lo_el_timer_conf = lo_nd_timer_conf-&gt;get_element( ).

   lo_el_timer_conf-&gt;get_static_attributes(

     IMPORTING

       static_attributes = ls_timer_conf ).

*--------------------- CW READ/SET(TIMER_CONF)

*------------------------------------



  ls_timer_conf-refresh_rate = ls_timer_conf-slow_speed.

  lo_el_timer_conf-&gt;set_static_attributes( ls_timer_conf ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOAPPLICATIONSTATECHANGE" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOAPPLICATIONSTATECHANGE" CODE_BODY="method WDDOAPPLICATIONSTATECHANGE .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOBEFORENAVIGATION" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOBEFORENAVIGATION" CODE_BODY="method WDDOBEFORENAVIGATION .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOEXIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOEXIT" CODE_BODY="method WDDOEXIT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOINIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOINIT" CODE_BODY="method WDDOINIT .

***timier init*****

  wd_this-&gt;prefill_timer_context( ).



endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOPOSTPROCESSING" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOPOSTPROCESSING" CODE_BODY="method WDDOPOSTPROCESSING .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="CHCK_DEL_BOUNDING" LANGU="C" DESCRIPTION="Vymaze z pamate uz existujucu komponentu"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOAPPLICATIONSTATECHANGE" LANGU="C" DESCRIPTION="Handling for Suspending and Resuming an Application"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOBEFORENAVIGATION" LANGU="C" DESCRIPTION="Error Handling Before Navigation Through Application"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOEXIT" LANGU="C" DESCRIPTION="Controller Clean-Up Method"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOINIT" LANGU="C" DESCRIPTION="Controller Initialization Method"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOPOSTPROCESSING" LANGU="C" DESCRIPTION="Prepare Output"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="CHCK_DEL_BOUNDING" PARAMETER_NAME="COMP_NAME" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="0" ABAP_TYPE="CHAR25" DISPLAY_NAME="COMP_NAME"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOAPPLICATIONSTATECHANGE" PARAMETER_NAME="STATE_CHANGE" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_APPLICATION_STATE_CHANGE" DISPLAY_NAME="STATE_CHANGE"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOBEFORENAVIGATION" PARAMETER_NAME="IS_CURRENT_ROOT" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="0" ABAP_TYPE="WDY_BOOLEAN" DISPLAY_NAME="IS_CURRENT_ROOT"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOEXIT" PARAMETER_NAME="REASON" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="0" ABAP_TYPE="WDR_APPL_EXIT_REASON" DISPLAY_NAME="REASON"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CMPNAME="WDDOPOSTPROCESSING" PARAMETER_NAME="IS_CURRENT_ROOT" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="0" ABAP_TYPE="WDY_BOOLEAN" DISPLAY_NAME="IS_CURRENT_ROOT"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WYZSK4SC6OSXXPBEA20KQER3" VERSION="I" COMPONENT_USAGE="ZMC_INT_PRESUN"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WYZSLMK0WWRKBHGJ4IEJ45RJ" VERSION="I" COMPONENT_USAGE="ZMC_INT_PRESUN" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WZ7XD7WW9ACE649824WKMQ0F" VERSION="I" COMPONENT_USAGE="ZMC_PRIJEM_K_VZ" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WZ7XDFLF7W1WSNPDW78UOOQ7" VERSION="I" COMPONENT_USAGE="ZMC_PRIJEM_K_VZ"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WZZDSTT5FYNSOZN2S68Q4FFZ" VERSION="I" COMPONENT_USAGE="ZMC_PREHL_S_MIST"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WZZDUBKU66MF2RS7MMMOI6GF" VERSION="I" COMPONENT_USAGE="ZMC_PREHL_S_MIST" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WZZDVTCIWEL1GJXCH30MVXGV" VERSION="I" COMPONENT_USAGE="ZMC_PREHL_ZASOB"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4WZZDXB47MMJNUC2HBJEL9OHB" VERSION="I" COMPONENT_USAGE="ZMC_PREHL_ZASOB" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X48LPDGFO704EA27MH51Q52N" VERSION="I" COMPONENT_USAGE="ZMC_BC_CONFRIM" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X48LPL4YMSPN0TIDGJHBS3SF" VERSION="I" COMPONENT_USAGE="ZMC_BC_CONFRIM"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X48RQL0M62MG6HXN8KXD4TV3" VERSION="I" COMPONENT_USAGE="ZMC_BC_PRIJEM" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X4D3IKJWBLF0DL7IVI7OONJJ" VERSION="I" COMPONENT_USAGE="ZMC_BC_VIEW_MAT"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X4D3K2BL1TDMRDCNPYLN2EJZ" VERSION="I" COMPONENT_USAGE="ZMC_BC_VIEW_MAT" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X4D3QOFWUICO649OLZ6ARAR3" VERSION="I" COMPONENT_USAGE="ZMC_BC_VIEW_BIN" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X4D3QW4FT426SNPUG1IKT9GV" VERSION="I" COMPONENT_USAGE="ZMC_BC_VIEW_BIN"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="4X518H76MUDVWAK3VX04AJJ1R" VERSION="I" COMPONENT_USAGE="ZMC_BC_PRIJEM"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB89VRBXGFORM6C" VERSION="I" COMPONENT_USAGE="ZMC_IKANBAN"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB89VRC4Z7YVJ7M" VERSION="I" COMPONENT_USAGE="ZMC_IKANBAN" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8JPF48B53MIO4" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_Z_VYROBY"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8JPFVUZ1GLPFO" VERSION="I" COMPONENT_USAGE="ZMC_PRESKL_KANBAN"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8JPFVXGQOCF7L" VERSION="I" COMPONENT_USAGE="ZMC_PRESKL_KANBAN" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8JPGO2FL7H6V6" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_OD_DODAV"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8JPGO5F7ESVEQ" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_OD_DODAV" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8LX7I56RQ0CUE" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_TRAFO2" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8LX7I7JGCAY2Q" VERSION="I" COMPONENT_USAGE="ZMC_PRESKLADNENI"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8LX7I9UMVC0ZN" VERSION="I" COMPONENT_USAGE="ZMC_PRESKLADNENI" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8LX7ICCVETNNN" VERSION="I" COMPONENT_USAGE="ZMC_PRESKLADNENI2"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CB8LX7IETLU9ON7" VERSION="I" COMPONENT_USAGE="ZMC_PRESKLADNENI2" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYHM2ZOQ9L5Z44" VERSION="I" COMPONENT_USAGE="ZMC_DODAK"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYHM2ZRY6JDYBO" VERSION="I" COMPONENT_USAGE="ZMC_DODAK" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYMZDQ2BZXTE6C" VERSION="I" COMPONENT_USAGE="ZMC_HIST_SP"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYMZDQ57EJS2DF" VERSION="I" COMPONENT_USAGE="ZMC_HIST_SP" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYU3M1BTLVWGEA" VERSION="I" COMPONENT_USAGE="ZMC_PRIJEM_K_VZ2"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYU3M1EP0N16GW" VERSION="I" COMPONENT_USAGE="ZMC_PRIJEM_K_VZ2" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYU3NKS18KOXZ9" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_Z_VYROBY" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYU3Q66Q1FDH4W" VERSION="I" COMPONENT_USAGE="ZMC_PREUCT_KJ_DO_V"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYU3Q68YDXHZB4" VERSION="I" COMPONENT_USAGE="ZMC_PREUCT_KJ_DO_V" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWBFYDI8CEEIQ" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_TRAFO"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWBFYH03DC83Q" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_TRAFO" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWBFYJQ22WUM8" VERSION="I" COMPONENT_USAGE="ZMC_KANBAN_TRAFO2"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWT5NI3KG5XC0" VERSION="I" COMPONENT_USAGE="ZMC_VYDEJ_K_VZ" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWT5NI41KGLC1" VERSION="I" COMPONENT_USAGE="ZMC_VYDEJ_K_VZ"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWTTT1ZSOK3YE" VERSION="I" COMPONENT_USAGE="ZMC_MAT_DO_EXP_IM"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" CTLR_USAGE_NAME="63282P40S0CCYWTTT6GQFN3LW" VERSION="I" COMPONENT_USAGE="ZMC_MAT_DO_EXP_IM" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" NODE_NAME="CONTEXT" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" NODE_POSITION="0 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="01" SINGLETON="X" DISPLAY_NAME="CONTEXT" ABAP_TYPING="0" INIT_LEAD_SELECT="X" IS_INTF_ITEM="X"/>
  <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" NODE_NAME="TIMER_CONF" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" PARENT_NODE_NAME="CONTEXT" NODE_POSITION="1 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="01" SINGLETON="X" DISPLAY_NAME="TIMER_CONF" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="MAX_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="2 " READ_ONLY="X" DEFAULT_VALUE="2" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="MAX_SPEED" VALUE_HELP_MODE="0"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="MEDIUM_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="3 " READ_ONLY="X" DEFAULT_VALUE="10" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="MEDIUM_SPEED" VALUE_HELP_MODE="0"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="REFRESH_RATE" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="1 " ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="REFRESH_RATE" VALUE_HELP_MODE="0"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="COMPONENTCONTROLLER" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="SLOW_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="4 " READ_ONLY="X" DEFAULT_VALUE="100" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="SLOW_SPEED" VALUE_HELP_MODE="0"/>
 </controller_definition>
 <controller_definition COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="EMPTYVIEW" VERSION="A" CONTROLLER_TYPE="01" DISPLAY_NAME="EMPTYVIEW" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDON="00000000"/>
 <controller_definition COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" VERSION="A" CONTROLLER_TYPE="01" CONTEXT="CONTEXT" DISPLAY_NAME="V_MAIN_V" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141211">
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="BUTTON_PUSHED" VERSION="I" CMPTYPE="CL_WDY_MD_ACTION" CMP_POSITION="0 " VISIBILITY="0" DISPLAY_NAME="BUTTON_PUSHED" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="CREATE_APP_BUTTONS" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="CREATE_APP_BUTTONS" CODE_BODY="method CREATE_APP_BUTTONS .

&quot;VYTVORENIE BUTTONOV PRE APLIKACIE KU KTORYM MA UZIV PRISTUP



DATA:  LR_BUTTON TYPE REF TO CL_WD_BUTTON.

*       LT_PARAMS TYPE WDR_NAME_VALUE_LIST,

*       LS_PARAMS TYPE LINE OF WDR_NAME_VALUE_LIST.



DATA: lv_text       TYPE WDY_MD_TRANSLATABLE_TEXT.

DATA: lr_container  TYPE REF TO cl_wd_uielement_container.

DATA: lr_grid_data  TYPE REF TO CL_WD_GRID_DATA.





DATA lv_menu_title    TYPE ZRF_USR_MENU-TITLE.

DATA lv_bname         TYPE STRING. &quot; meno buttonu

DATA ls_apl_menu      TYPE ZRF_APL_MENU.

DATA lv_app_descrp    TYPE TXT50.



  &quot;referencia na VIEW

  lr_container ?= VW-&gt;get_element( &apos;ROOTUIELEMENTCONTAINER&apos; ).





&quot;Vytvaranie stylu buttonu

data l_style_manager  type ref to if_wd_custom_style_manager.

data l_style          type ref to if_wd_custom_style.



&quot; Get the custom style manager

l_style_manager =

  wd_comp_controller-&gt;wd_get_api(

    )-&gt;get_application(

      )-&gt;get_custom_style_manager( ).



&quot; Create a new custom style with name myButtonStyle for BUTTON elements

l_style =

  l_style_manager-&gt;create_custom_style(

    style_class_name = &apos;mobileButtonClass&apos;

      element_type     = &apos;BUTTON&apos; ).





*fontSize

*fontFamily

*fontColor

*borderRadius

*backgroundColor

*hoverBackgroundColor



&quot; Set font color to red

l_style-&gt;add_style_property( name  = &apos;fontSize&apos;

                              value = &apos;0.8em&apos;).



l_style-&gt;add_style_property( name  = &apos;fontColor&apos;

                               value = &apos;red&apos; ).



l_style-&gt;add_style_property( name  = &apos;backgroundColor&apos;

                               value = &apos;white&apos; ).







l_style-&gt;add_style_property(  name  = &apos;borderRadius&apos;

                              value = &apos;15px&apos;).



l_style-&gt;add_style_property(  name  = &apos;fontWeight&apos;

                              value = &apos;bold&apos;).



l_style-&gt;add_style_property(  name  = &apos;text-align&apos;

                              value = &apos;left&apos;).



&quot; Add custom style

l_style_manager-&gt;add_custom_style( l_style ).







&quot;hladanie menu ktore ma uziv priradene

SELECT TITLE

  INTO lv_menu_title

  FROM ZRF_USR_MENU

  WHERE

    bname eq sy-uname.



  &quot;priradene aplikacie vramci menu

  SELECT *

    INTO ls_apl_menu

    FROM ZRF_APL_MENU

    WHERE

      title eq lv_menu_title.



      &quot;prevod mien aplikacii na mena vytvaranych tlacidiel

      move ls_apl_menu-Z_APL to lv_bname.



      &quot;Popisok aplikacie

      SELECT SINGLE  ZAPLTXT

        into lv_app_descrp

        from zapl

        where

          z_apl eq ls_apl_menu-Z_APL.



      CHECK sy-subrc eq 0.



      REPLACE REGEX &apos;ZMC&apos; IN lv_bname WITH  &apos;BT&apos;.

      &quot;REPLACE REGEX &apos;ZMC&apos; IN lv_aname WITH  &apos;ACT&apos;.





      &quot;Tvorba popisku tlacidla

      CONCATENATE

        ls_apl_menu-PREFIX

        lv_app_descrp

        ls_apl_menu-SUFIX

       INTO

        lv_text.



     &quot;Vytvorenie buttonu pre odkaz na aplikaciu

     CALL METHOD cl_wd_button=&gt;new_button

      EXPORTING

        STYLE_CLASS_NAME = &apos;mobileButtonClass&apos;

        enabled   = &apos;X&apos;

        id        = lv_bname

        on_action = &apos;BUTTON_PUSHED&apos;&quot;metoda volana pre vsetky

        text      = lv_text

        width     = WD_ASSIST-&gt;APL_BUTTON_WIDTH&quot;&apos;85%&apos;

      RECEIVING

        control   = lr_button.



    &quot;Nastavenie Layoutu

    lr_grid_data

     = cl_wd_grid_data=&gt;new_grid_data( element = lr_button ).



    &quot;pridanie do layoutu

    CALL METHOD lr_container-&gt;add_child

      EXPORTING

        the_child = lr_button.



  ENDSELECT.

ENDSELECT.





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="HANDLEDEFAULT" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_VIEW_NAME="V_MAIN_V" REF_PLUG_NAME="DEFAULT" DISPLAY_NAME="HANDLEDEFAULT" CODE_BODY="method HANDLEDEFAULT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ONACTIONBUTTON_PUSHED" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_CTLR_NAME="V_MAIN_V" REF_CMPNAME="BUTTON_PUSHED" DISPLAY_NAME="ONACTIONBUTTON_PUSHED" CODE_BODY="method ONACTIONBUTTON_PUSHED .

&quot;metoda pokryvajuca vsetky dynamicky generovane tlacidla



  DATA: lv_id TYPE string.

  DATA: lv_char25 TYPE char25.

  &quot;indentifikator stlaceneho buttonu

  lv_id = wdevent-&gt;get_string( &apos;ID&apos; ).

  move lv_id to lv_char25.



  data  lr_api TYPE REF TO IF_WD_VIEW_CONTROLLER.

  lr_api = wd_this-&gt;wd_get_api( ).





  REPLACE REGEX &apos;BT&apos; in lv_char25 WITH &apos;ZMC&apos;.

  &quot;premazanie uz existujucich instancii komponent

  wd_comp_controller-&gt;CHCK_DEL_BOUNDING( lv_char25  ).



  &quot;zmena prefixu, tak aby odpovedal nazvom plugov

  REPLACE REGEX &apos;BT&apos; in lv_id WITH &apos;TO&apos;.

  lr_api-&gt;fire_plug( lv_id ).





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ONACTIONON_TIMER" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_CTLR_NAME="V_MAIN_V" REF_CMPNAME="ON_TIMER" DISPLAY_NAME="ONACTIONON_TIMER" CODE_BODY="method ONACTIONON_TIMER .

  wd_comp_controller-&gt;refresh_page( ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ON_TIMER" VERSION="I" CMPTYPE="CL_WDY_MD_ACTION" CMP_POSITION="0 " VISIBILITY="0" DISPLAY_NAME="ON_TIMER" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOAFTERACTION" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOAFTERACTION" CODE_BODY="method WDDOAFTERACTION .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOBEFOREACTION" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOBEFOREACTION" CODE_BODY="method WDDOBEFOREACTION .

*  data lo_api_controller type ref to if_wd_view_controller.

*  data lo_action         type ref to if_wd_action.

*

*  lo_api_controller = wd_this-&gt;wd_get_api( ).

*  lo_action = lo_api_controller-&gt;get_current_action( ).

*

*  if lo_action is bound.

*    case lo_action-&gt;name.

*      when &apos;...&apos;.

*

*    endcase.

*  endif.

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOEXIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOEXIT" CODE_BODY="method WDDOEXIT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOINIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOINIT" CODE_BODY="method WDDOINIT .

*  wd_this-&gt;HIDE_APP_BUTTONS( ).

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOMODIFYVIEW" CODE_BODY="method WDDOMODIFYVIEW .



  IF FIRST_TIME eq &apos;X&apos;.

    wd_this-&gt;CREATE_APP_BUTTONS( VIEW ).

  ENDIF.





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOONCONTEXTMENU" CODE_BODY="method WDDOONCONTEXTMENU .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="CREATE_APP_BUTTONS" LANGU="C" DESCRIPTION="Skryva aplikacie na ktore nema user opravnenie"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ONACTIONON_TIMER" LANGU="C" DESCRIPTION="Zopnutie casovaca"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="ON_TIMER" LANGU="C" DESCRIPTION="Zopnutie casovaca"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOAFTERACTION" LANGU="C" DESCRIPTION="Method for non-action specific operations before navigation"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOBEFOREACTION" LANGU="C" DESCRIPTION="Method for Validation of User Input"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOEXIT" LANGU="C" DESCRIPTION="Controller Clean-Up Method"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOINIT" LANGU="C" DESCRIPTION="Controller Initialization Method"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" LANGU="C" DESCRIPTION="Method for Modifying the View Before Rendering"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" LANGU="C" DESCRIPTION="Method for Modifying the Context Menu"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="CREATE_APP_BUTTONS" PARAMETER_NAME="VW" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_VIEW" DISPLAY_NAME="VW"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" PARAMETER_NAME="FIRST_TIME" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="0" ABAP_TYPE="WDY_BOOLEAN" DISPLAY_NAME="FIRST_TIME"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOMODIFYVIEW" PARAMETER_NAME="VIEW" VERSION="I" PARAM_POSITION="2 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_VIEW" DISPLAY_NAME="VIEW"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" PARAMETER_NAME="CONTEXT_MENU_EVENT" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_CONTEXT_MENU_EVENT" DISPLAY_NAME="CONTEXT_MENU_EVENT"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" PARAMETER_NAME="CONTEXT_MENU_MANAGER" VERSION="I" PARAM_POSITION="2 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_CONTEXT_MENU_MANAGER" DISPLAY_NAME="CONTEXT_MENU_MANAGER"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CMPNAME="WDDOONCONTEXTMENU" PARAMETER_NAME="MENU" VERSION="I" PARAM_POSITION="3 " DECLARATION_TYPE="3" ABAP_TYPING="1" ABAP_TYPE="CL_WD_MENU" DISPLAY_NAME="MENU"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CTLR_USAGE_NAME="4TD2M0ENWU8WCFQ73ZPATJQCV" VERSION="I" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="CONTEXT" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" NODE_POSITION="0 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="01" SINGLETON="X" DISPLAY_NAME="CONTEXT" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
  <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" PARENT_NODE_NAME="CONTEXT" NODE_POSITION="1 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="00" DISPLAY_NAME="TIMER_CONF" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="MAX_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="2 " READ_ONLY="X" DEFAULT_VALUE="2" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="MAX_SPEED" VALUE_HELP_MODE="0"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="MEDIUM_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="3 " READ_ONLY="X" DEFAULT_VALUE="10" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="MEDIUM_SPEED" VALUE_HELP_MODE="0"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="REFRESH_RATE" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="1 " ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="REFRESH_RATE" VALUE_HELP_MODE="0"/>
  <wdy_ctx_attrib COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" NODE_NAME="TIMER_CONF" ATTRIBUTE_NAME="SLOW_SPEED" VERSION="I" ATTRIBUTE_TYPE="CL_WDY_MD_CTX_VALUE_ATTRIBUTE" ATTRIB_POSITION="4 " READ_ONLY="X" DEFAULT_VALUE="100" ABAP_TYPE="I" ABAP_TYPING="0" DISPLAY_NAME="SLOW_SPEED" VALUE_HELP_MODE="0"/>
  <wdy_ctx_mapping COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="V_MAIN_V" CTLR_USAGE_NAME="4TD2M0ENWU8WCFQ73ZPATJQCV" CTX_MAPP_NAME="4WZ2Q9D1IAGQHLWSGPK0CTFSF" VERSION="I" MAPPING_TYPE="02" OWN_NODE_NAME="TIMER_CONF" MAP_NODE_NAME="TIMER_CONF"/>
 </controller_definition>
 <controller_definition COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" VERSION="A" CONTROLLER_TYPE="06" CONTEXT="CONTEXT" DISPLAY_NAME="W_MAIN_V" AUTHOR="CZMICYP" CREATEDON="20141127" CHANGEDBY="CZMICYP" CHANGEDON="20141128">
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="HANDLEDEFAULT" VERSION="I" CMPTYPE="CL_WDY_MD_CTLR_EVENT_HANDLER" CMP_POSITION="0 " VISIBILITY="2" REF_VIEW_NAME="W_MAIN_V" REF_PLUG_NAME="DEFAULT" DISPLAY_NAME="HANDLEDEFAULT" CODE_BODY="method HANDLEDEFAULT .

endmethod." ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOEXIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOEXIT" CODE_BODY="method WDDOEXIT .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOINIT" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOINIT" CODE_BODY="method WDDOINIT .

    &quot;dynamicke nastavenie plugov na pouzite komponenty WD

  DATA lr_window TYPE REF TO if_wd_window_controller.

  DATA lr_rr_window TYPE REF TO if_wd_rr_window.



  DATA lr_V_MAIN_V_usage TYPE REF TO IF_WD_RR_VIEW_USAGE.

  DATA lr_current_usage TYPE REF TO IF_WD_RR_VIEW_USAGE.

  DATA view_V_MAIN_V_name TYPE string.

*  DATA str TYPE string.



  lr_window ?= wd_this-&gt;wd_get_api( ).

  lr_rr_window = lr_window-&gt;GET_WINDOW_INFO( ).



  DATA lt_usages TYPE TABLE OF zapl.

  DATA wa_usages TYPE zapl.

  DATA ZRF_APL_UZIV TYPE ZRF_APL_UZIV.







  &quot;Ziskanie mena komponentu

  DATA lr_comp_api  TYPE REF TO IF_WD_COMPONENT.

  DATA lv_comp_info TYPE REF TO IF_WD_RR_COMPONENT.

  DATA lv_comp_name TYPE string.

  lr_comp_api = WD_COMP_CONTROLLER-&gt;WD_GET_API( ).

  lv_comp_info = lr_comp_api-&gt;GET_COMPONENT_INFO( ).

  lv_comp_name = lv_comp_info-&gt;GET_NAME( ).





  &quot;pridanie V_MAIN_V do W_MAIN_V

  lr_V_MAIN_V_usage = lr_rr_window-&gt;embed_view(

          USED_VIEW_NAME       = &apos;V_MAIN_V&apos;

          USED_COMPONENT_NAME  = lv_comp_name&quot; &apos;ZMC_MENU_V2&apos;

          ).

    &quot;Ziskanie mena view

  view_V_MAIN_V_name = lr_V_MAIN_V_usage-&gt;get_name( ).





  &quot;natiahnutie vsetkych aplikacii ku ktorym ma aktualny

  &quot;uzivatel pristup

  DATA lv_menu_title TYPE ZRF_USR_MENU-title.

  DATA lv_apl TYPE ZRF_APL_MENU-Z_APL.



  SELECT title

    INTO lv_menu_title

    FROM ZRF_USR_MENU

    WHERE

      bname eq sy-uname.



    SELECT z_apl

      INTO lv_apl

      FROM ZRF_APL_MENU

      WHERE

        TITLE eq lv_menu_title.



      SELECT SINGLE *

        INTO wa_usages

        FROM zapl

        WHERE

          z_apl eq lv_apl.

        CHECK sy-subrc eq 0.



        APPEND wa_usages to lt_usages.



    ENDSELECT.

  ENDSELECT.





  &quot;Dynamicke generovanie vystupnych plugov

  LOOP AT lt_usages INTO wa_usages.



    DATA lv_tmp TYPE string.

    DATA lv_pos TYPE string.



    MOVE wa_usages-Z_APL TO lv_tmp.

    MOVE sy-index to lv_pos.



  &quot;dynamicke pridavanie VIEWs pre pouzite komponenty

   lr_current_usage = lr_rr_window-&gt;embed_view(

          USED_VIEW_NAME       = lv_tmp

          USED_COMPONENT_NAME  = lv_tmp

          ).



    DATA NAME TYPE string.

    DATA TARGET_VIEW_USAGE_NAME TYPE string.

    MOVE wa_usages-z_apl to name.



    TARGET_VIEW_USAGE_NAME = lr_current_usage-&gt;get_name( ).





    &quot;ZMC_BC_CONFIRM &gt; TO_BC_CONFIRM ...  atd.

    DATA SOURCE_PLUG_NAME TYPE string.

    move NAME to SOURCE_PLUG_NAME .

    REPLACE REGEX &apos;ZMC&apos; in SOURCE_PLUG_NAME with &apos;TO&apos;.



    &quot;VZAJOMNE PREPOJENIE PLUGOV

    lr_V_MAIN_V_usage-&gt;create_navigation_target(

          NAME = NAME

          SOURCE_PLUG_NAME =  SOURCE_PLUG_NAME

          TARGET_PLUG_NAME = &apos;DEFAULT&apos;

          TARGET_VIEW_USAGE_NAME = TARGET_VIEW_USAGE_NAME

    ).



    lr_current_usage-&gt;create_navigation_target(

          NAME = NAME

          SOURCE_PLUG_NAME = &apos;TO_MENU&apos;

          TARGET_PLUG_NAME = &apos;DEFAULT&apos;

          TARGET_VIEW_USAGE_NAME = view_V_MAIN_V_name

    ).



  ENDLOOP.



  &quot; po pridani vsetkych views, nastavenie korenoveho

  lr_rr_window-&gt;SET_DEFAULT_ROOT_VUSAGE(

      view_usage_name = view_V_MAIN_V_name

  ).





endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONCLOSE" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOONCLOSE" CODE_BODY="method WDDOONCLOSE .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compo COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONOPEN" VERSION="I" CMPTYPE="CL_WDY_MD_CONTROLLER_METHOD" CMP_POSITION="0 " VISIBILITY="2" DISPLAY_NAME="WDDOONOPEN" CODE_BODY="method WDDOONOPEN .

endmethod.

" ACTION_TYPE="0" ABAP_TYPING="0"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOEXIT" LANGU="C" DESCRIPTION="Controller Clean-Up Method"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOINIT" LANGU="C" DESCRIPTION="Controller Initialization Method"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONCLOSE" LANGU="C" DESCRIPTION="Handling For Closing of Window"/>
  <wdy_ctlr_compot COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONOPEN" LANGU="C" DESCRIPTION="Handling For Opening of Window"/>
  <wdy_ctlr_param COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CMPNAME="WDDOONOPEN" PARAMETER_NAME="WINDOW_DESCR" VERSION="I" PARAM_POSITION="1 " DECLARATION_TYPE="0" ABAP_TYPING="1" ABAP_TYPE="IF_WD_WINDOW_DESCRIPTION" DISPLAY_NAME="WINDOW_DESCR"/>
  <wdy_ctlr_usage COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" CTLR_USAGE_NAME="4TD2M06ZDVN6TT6QY5MYJHRN3" VERSION="I" USED_CONTROLLER="COMPONENTCONTROLLER"/>
  <wdy_ctx_node COMPONENT_NAME="ZMC_MENU_V2" CONTROLLER_NAME="W_MAIN_V" NODE_NAME="CONTEXT" VERSION="I" NODE_TYPE="CL_WDY_MD_CONTEXT_VALUE_NODE" NODE_POSITION="0 " COLLECTION_TYPE="03" CARDINALITY="01" SELECTION="01" SINGLETON="X" DISPLAY_NAME="CONTEXT" ABAP_TYPING="0" INIT_LEAD_SELECT="X"/>
 </controller_definition>
</WDYN>
