user9254958
user9254958

Reputation:

changeset begin/end methods in DPC_EXT but GCS_METHODS-CHANGESET_BEGIN unknown

My SAPui5 web app throws this error in Chrome's console:

The following problem occurred: HTTP request failed500,Internal Server Error,{"error":{
"code":"/IWBEP/CM_MGW_RT/053","message":{"lang":"en","value":"Default changeset impleme
ntation allows only one operation"},"innererror":{"application":{"component_id":"CA","s
ervice_namespace":"/SAP/","service_id":"YFLEXUI_LEAVE_REQUEST_SRV","service_version":"0
001"},"transactionid":"something","timestamp":"something","Error_Resolution":{"SAP_Tran
saction":"For backend administrators: run transaction /IWFND/ERROR_LOG on SAP Gateway h
ub system and search for entries with the timestamp above for more details","SAP_Note":
"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/179
7736)"},"errordetails":[{"code":"/IWBEP/CX_MGW_TECH_EXCEPTION","message":"Default chang
eset implementation allows only one operation","propertyref":"","severity":"error","tar
get":""}]}}} -  

According to some posts on the internet, the problem is caused by the conflict between these methods:

/iwbep/if_mgw_appl_srv_runtime~changeset_begin
/iwbep/if_mgw_appl_srv_runtime~changeset_end

and

/iwbep/if_mgw_core_srv_runtime~changeset_begin
/iwbep/if_mgw_core_srv_runtime~changeset_end

Most people advice to redefine the methods /iwbep/if_mgw_appl_srv_runtime~changeset_begin and /iwbep/if_mgw_appl_srv_runtime~changeset_end.

This is my /iwbep/if_mgw_appl_srv_runtime~changeset_begin method:

METHOD /iwbep/if_mgw_appl_srv_runtime~changeset_begin.
* Default Implementation:
*  - Local Update Task
*  - Only one operation in each changeset
*  - No deferred processing: Immediate process changset operation

    SET UPDATE TASK LOCAL.

    IF lines( it_operation_info ) > 1.
      RAISE EXCEPTION TYPE /iwbep/cx_mgw_tech_exception
        EXPORTING
          textid = /iwbep/cx_mgw_tech_exception=>changeset_default_violation
          method = gcs_methods-changeset_begin.
    ENDIF.

    CLEAR cv_defer_mode.
ENDMETHOD.

The problem is, in SE80, after the redefinition of /iwbep/if_mgw_appl_srv_runtime~changeset_begin when I try to check that method and activate it, SAP throws this error:

Field GCS_METHODS-CHANGESET_BEGIN is unknown

Can you tell me how can /iwbep/if_mgw_appl_srv_runtime~changeset_begin's redefinition cause such error?

FYI. gcs_methods is a private constant. It might be causing the problem.

Upvotes: 1

Views: 3860

Answers (3)

Sandra Rossi
Sandra Rossi

Reputation: 13628

A subclass cannot use a private member of its superclass (unless the superclass said the subclass is its friend).

As the superclass is generated, you have to duplicate the constant in your own program.

Upvotes: 0

Raphael Pacheco
Raphael Pacheco

Reputation: 3

The error is the inactive methods on the class interface. A simple code check tells all the erros of this implementation.

BR,

Upvotes: 0

Voyager
Voyager

Reputation: 840

We had the same issue recently and redefined the method like this:

METHOD /iwbep/if_mgw_core_srv_runtime~changeset_begin.

  IF line_exists( it_operation_info[ entity_type = 'ENTITY_TYPE' ] ).
    cv_defer_mode = abap_true.
  ENDIF.

ENDMETHOD

I'm no expert on this topic, but this implementation fixed our problem. What the issue with your private constant is, however, I cannot tell.

Upvotes: 0

Related Questions