SHARE
TWEET

OVERRIDE_EVENT_GAF overwrite

Olegster Oct 30th, 2019 157 in 248 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. *      .
  2. ***********************************************************************
  3. *
  4. *  DATA lo_nd_comp_roles TYPE REF TO if_wd_context_node.
  5. *  DATA lt_comp_roles TYPE wd_this->Elements_comp_roles.
  6. *  DATA ls_comp_roles TYPE wd_this->Element_comp_roles.
  7. *  lo_nd_comp_roles = wd_context->get_child_node( name = wd_this->wdctx_comp_roles ).
  8. *  lo_nd_comp_roles->get_static_attributes_table( importing table = lt_comp_roles ).
  9. *
  10. *  DATA lo_nd_role_properties TYPE REF TO if_wd_context_node.
  11. *  DATA lo_el_role_properties TYPE REF TO if_wd_context_element.
  12. *  DATA ls_role_properties TYPE wd_this->Element_role_properties.
  13. *  DATA lv_attribute TYPE wd_this->Element_role_properties-attribute.
  14. *  lo_nd_role_properties = wd_context->get_child_node( name = wd_this->wdctx_role_properties ).
  15. *  lo_el_role_properties = lo_nd_role_properties->get_element( ).
  16. **  lo_el_role_properties->get_attribute( EXPORTING name =  `ATTRIBUTE` IMPORTING value = lv_attribute ).
  17. *
  18. *
  19. *  DATA lo_nd_role_att_selected TYPE REF TO if_wd_context_node.
  20. *  DATA lo_el_role_att_selected TYPE REF TO if_wd_context_element.
  21. *  DATA ls_role_att_selected TYPE wd_this->Element_role_att_selected.
  22. ** navigate from <CONTEXT> to <ROLE_ATT_SELECTED> via lead selection
  23. *  lo_nd_role_att_selected = wd_context->get_child_node( name = wd_this->wdctx_role_att_selected ).
  24. ** get element via lead selection
  25. *  lo_el_role_att_selected = lo_nd_role_att_selected->get_element( ).
  26. ** get all declared attributes
  27. *  lo_el_role_att_selected->get_static_attributes( IMPORTING static_attributes = ls_role_att_selected ).
  28. *
  29. *
  30. *
  31. *
  32. *
  33. *
  34. *
  35. *
  36. ***********************************************************************
  37. *  data: flag type i VALUE 0.
  38. *
  39. *  loop at lt_comp_roles into ls_comp_roles.
  40. *    if ls_comp_roles-role_type eq 'COM'.
  41. *      flag = 1.
  42. *    endif.
  43. *  endloop.
  44. *
  45. ***********************************************************************
  46. *
  47. ***********************************************************************
  48. ** get message manager
  49. *    data lo_api_controller     type ref to if_wd_controller.
  50. *    data lo_message_manager    type ref to if_wd_message_manager.
  51. *    lo_api_controller ?= wd_This->Wd_Get_Api( ).
  52. *    CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
  53. *      RECEIVING
  54. *        MESSAGE_MANAGER = lo_message_manager
  55. *    .
  56. ***********************************************************************
  57. **  if ls_role_att_selected-company eq 'X'.
  58. **      wd_this->zclearcompanycontext( ).
  59. **    case io_gaf->mo_event->mv_event_id.
  60. **      when io_gaf->mo_event->gc_event_next_step.
  61. **        lo_message_manager->REPORT_message( EXPORTING  message_text =
  62. **          'Изменения не приняты' ).
  63. **      when wd_assist->button_actions-submit.
  64. **        lo_message_manager->REPORT_message( EXPORTING  message_text =
  65. **          'Изменения не приняты' ).
  66. **    endcase.
  67. **  endif.
  68. ***********************************************************************
  69. *    "Read the transfer flag.
  70. *      DATA lo_nd_custom_att TYPE REF TO if_wd_context_node.
  71. *      DATA lo_el_custom_att TYPE REF TO if_wd_context_element.
  72. *      DATA ls_custom_att TYPE wd_this->Element_custom_att.
  73. *      DATA lv_transfer_flag TYPE wd_this->Element_custom_att-transfer_flag.
  74. **     navigate from <CONTEXT> to <CUSTOM_ATT> via lead selection
  75. *      lo_nd_custom_att = wd_context->get_child_node( name = wd_this->wdctx_custom_att ).
  76. **     get element via lead selection
  77. *      lo_el_custom_att = lo_nd_custom_att->get_element( ).
  78. **     @TODO handle not set lead selection
  79. **     get single attribute
  80. *      lo_el_custom_att->get_attribute(
  81. *        EXPORTING
  82. *          name =  `TRANSFER_FLAG`
  83. *        IMPORTING
  84. *          value = lv_transfer_flag ).
  85. *
  86. *      case lv_transfer_flag.
  87. *        when '01'.
  88. *              wd_this->zclearcompanycontext( ).
  89. *      endcase.
  90. *
  91. ***********************************************************************
  92. **** MAIN FUNCTION ****************************************************
  93. *  DATA: lv_state TYPE if_fpm_gaf=>ty_s_state.
  94. *  CHECK wd_this->auth_check( ) EQ ABAP_TRUE.
  95. *
  96. *   io_gaf->get_current_state( IMPORTING es_current_state = lv_state ).
  97. **   if lv_state-mainstep NE 'SEL_ROLE'.
  98. *
  99. *   if lv_state-mainstep ne wd_assist->step-uibb1.
  100. **   case lv_state-mainstep.
  101. **     when wd_assist->step-uibb1.
  102. *     lo_el_role_properties->get_attribute( EXPORTING name =  `ATTRIBUTE` IMPORTING value = lv_attribute ).
  103. **   endif.
  104. **     lv_state-mainstep = wd_assist->step-uibb1.
  105. *     if flag = 1 and lv_attribute eq 'COMPANY'.
  106. *        case io_gaf->mo_event->mv_event_id.
  107. *          when io_gaf->mo_event->gc_event_next_step.
  108. *            Case lv_state-mainstep.
  109. *              WHEN wd_assist->step-uibb1.
  110. *                wd_this->process_step1( ).
  111. *              WHEN wd_assist->step-uibb2.
  112. *                wd_this->process_step2( ).
  113. *              WHEN wd_assist->step-uibb3.
  114. *                wd_this->process_step3( ).
  115. *                wd_this->call_ticket_popup( ).
  116. *            endcase.
  117. *          when wd_assist->button_actions-submit.
  118. *            wd_this->process_submit( ).
  119. *        endcase.
  120. *     endif.
  121. *   elseif lv_state-mainstep eq wd_assist->step-uibb3.
  122. *     case lv_transfer_flag.
  123. *       when '01'.
  124. *         case io_gaf->mo_event->mv_event_id.
  125. *           when io_gaf->mo_event->gc_event_next_step.
  126. *                wd_this->process_step3( ).
  127. *                wd_this->call_ticket_popup( ).
  128. *           when io_gaf->mo_event->GC_EVENT_PREVIOUS_STEP.
  129. *                wd_this->process_step3( ).
  130. *                wd_this->call_ticket_popup( ).
  131. *         endcase.
  132. *     endcase.
  133. *   endif.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top