Skip to content

/AWS1/IF_MPG=>CANCELAGREEMENTCANCLREQUEST()

About CancelAgreementCancellationRequest

Allows sellers (proposers) to withdraw an existing agreement cancellation request that is in a pending state. Once cancelled, the cancellation request transitions to CANCELLED status and can no longer be approved or rejected by the buyer.

Only cancellation requests in PENDING_APPROVAL status can be cancelled. A ConflictException is thrown if the cancellation request is in any other status.

Method Signature

METHODS /AWS1/IF_MPG~CANCELAGREEMENTCANCLREQUEST
  IMPORTING
    !IV_AGREEMENTID TYPE /AWS1/MPGAGREEMENTID OPTIONAL
    !IV_AGREEMENTCANCLREQUESTID TYPE /AWS1/MPGAGRMNTCANCLREQUESTID OPTIONAL
    !IV_CANCELLATIONREASON TYPE /AWS1/MPGAGRMTCANCREQCANCRSN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgcancagrcancreqout
  RAISING
    /AWS1/CX_MPGACCESSDENIEDEX
    /AWS1/CX_MPGCONFLICTEXCEPTION
    /AWS1/CX_MPGINTERNALSERVEREX
    /AWS1/CX_MPGRESOURCENOTFOUNDEX
    /AWS1/CX_MPGTHROTTLINGEX
    /AWS1/CX_MPGVALIDATIONEX
    /AWS1/CX_MPGCLIENTEXC
    /AWS1/CX_MPGSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_agreementid TYPE /AWS1/MPGAGREEMENTID /AWS1/MPGAGREEMENTID

The unique identifier of the agreement associated with the cancellation request.

iv_agreementcanclrequestid TYPE /AWS1/MPGAGRMNTCANCLREQUESTID /AWS1/MPGAGRMNTCANCLREQUESTID

The unique identifier of the cancellation request to cancel.

iv_cancellationreason TYPE /AWS1/MPGAGRMTCANCREQCANCRSN /AWS1/MPGAGRMTCANCREQCANCRSN

A required message explaining why the cancellation request is being withdrawn (1-2000 characters).

RETURNING

oo_output TYPE REF TO /aws1/cl_mpgcancagrcancreqout /AWS1/CL_MPGCANCAGRCANCREQOUT

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->cancelagreementcanclrequest(
  iv_agreementcanclrequestid = |string|
  iv_agreementid = |string|
  iv_cancellationreason = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_agreementcancellationre = lo_result->get_agreementcanclrequestid( ).
  lv_agreementid = lo_result->get_agreementid( ).
  lv_agreementcancellationre_1 = lo_result->get_reasoncode( ).
  lv_agreementcancellationre_2 = lo_result->get_description( ).
  lv_agreementcancellationre_3 = lo_result->get_status( ).
  lv_agreementcancellationre_4 = lo_result->get_statusmessage( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
ENDIF.

Cancel a cancellation request

Cancel a cancellation request

DATA(lo_result) = lo_client->cancelagreementcanclrequest(
  iv_agreementcanclrequestid = |acr-752jqvg74yo7k4h56cakk6396|
  iv_agreementid = |agmt-752jqvg74yo7k4h56cakk6396|
  iv_cancellationreason = |Requested agreement cancellation by mistake|
).