Header Ads

Code for checking the action triggered .

DATA: lcl_action_execute   TYPE REF TO cl_action_execute,
          lv_guid_ref          TYPE crmt_object_guid,
          lv_kind_ref          TYPE crmt_object_kind,
          lv_status            TYPE j_estat,
          lt_header_guid       TYPE crmt_object_guid_tab,
*        ls_object_guid       type CRMT_OBJECT_GUID,
          lt_partner           TYPE crmt_partner_external_wrkt,
          ls_partner           TYPE crmt_partner_external_wrk,
          lt_search_result     TYPE crmt_report_loc_gen_t,
          ls_search_result     TYPE crmt_report_loc_gen,
          lt_object_list       TYPE crmt_report_guidlist_ta,
          ls_object_list       TYPE crmt_report_guidlist,
          lv_log_handle        TYPE balloghndl,
          lv_partner           TYPE bu_partner,
          lv_save_flag         TYPE boolean,
          lv_process_type      TYPE crmt_process_type,
          lt_container         TYPE swconttab,
          ls_partner_wrk       TYPE crmt_partner_external_wrk,
          lt_order_index       TYPE TABLE OF crmd_order_index,
          ls_order_index       TYPE crmd_order_index,
          ls_lic_status        TYPE crm_jest.
  DATA: lv_message           TYPE char80.

  INCLUDE crm_log_states_con.
  INCLUDE crm_object_kinds_con.
  INCLUDE crm_status_con.

********************************************************************

* not relevant iv preview is active
  IF NOT ip_preview IS INITIAL.
    MESSAGE s007(crm_action).
    EXIT.
  ENDIF.

  CREATE OBJECT lcl_action_execute.
* get document info
  lcl_action_execute cl_action_execute=>get_instance).

* get parameter from reference object
  CALL METHOD lcl_action_execute->get_ref_object
    EXPORTING
      io_appl_object io_appl_object
      ip_action      ip_action
      ii_container   ii_container
    IMPORTING
      ev_guid_ref    lv_guid_ref
      ev_kind_ref    lv_kind_ref
      et_container   lt_container.

  IF ip_action ' Action name '.

*******Your code 

 ENDIF.
Powered by Blogger.