Skip to content

/AWS1/IF_MPG=>SENDAGREEMENTCANCLREQUEST()

About SendAgreementCancellationRequest

Allows sellers (proposers) to submit a cancellation request for an active agreement. The cancellation request is created in PENDING_APPROVAL status, at which point the buyer can review it.

Method Signature

METHODS /AWS1/IF_MPG~SENDAGREEMENTCANCLREQUEST
  IMPORTING
    !IV_AGREEMENTID TYPE /AWS1/MPGAGREEMENTID OPTIONAL
    !IV_REASONCODE TYPE /AWS1/MPGAGRMNTCANCLREQUESTRC OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/MPGCLIENTTOKEN OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/MPGAGRMNTCANCLREQDESC OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgsendagrcancreqout
  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 for which the cancellation request is being submitted.

iv_reasoncode TYPE /AWS1/MPGAGRMNTCANCLREQUESTRC /AWS1/MPGAGRMNTCANCLREQUESTRC

The reason code for the cancellation request. Valid values include INCORRECT_TERMS_ACCEPTED, REPLACING_AGREEMENT, TEST_AGREEMENT, ALTERNATIVE_PROCUREMENT_CHANNEL, PRODUCT_DISCONTINUED, UNINTENDED_RENEWAL, BUYER_DISSATISFACTION, and OTHER.

Optional arguments:

iv_clienttoken TYPE /AWS1/MPGCLIENTTOKEN /AWS1/MPGCLIENTTOKEN

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

iv_description TYPE /AWS1/MPGAGRMNTCANCLREQDESC /AWS1/MPGAGRMNTCANCLREQDESC

An optional detailed description of the cancellation reason (1-2000 characters).

RETURNING

oo_output TYPE REF TO /aws1/cl_mpgsendagrcancreqout /AWS1/CL_MPGSENDAGRCANCREQOUT

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->sendagreementcanclrequest(
  iv_agreementid = |string|
  iv_clienttoken = |string|
  iv_description = |string|
  iv_reasoncode = |string|
).

This is an example of reading all possible response values

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

Send a cancellation request

Send a cancellation request

DATA(lo_result) = lo_client->sendagreementcanclrequest(
  iv_agreementid = |agmt-752jqvg74yo7k4h56cakk6396|
  iv_clienttoken = |53nQSKWt6AjrsiZPhzQyZT|
  iv_description = |Due to budget constraints, we are unable to continue with our current subscription|
  iv_reasoncode = |OTHER|
).