Skip to content

/AWS1/IF_MPG=>CANCELAGRMNTPAYMENTREQUEST()

About CancelAgreementPaymentRequest

Allows sellers (proposers) to cancel a payment request that is in PENDING_APPROVAL status. Once cancelled, the payment request transitions to CANCELLED status and can no longer be accepted or rejected by the buyer.

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

Method Signature

METHODS /AWS1/IF_MPG~CANCELAGRMNTPAYMENTREQUEST
  IMPORTING
    !IV_PAYMENTREQUESTID TYPE /AWS1/MPGPAYMENTREQUESTID OPTIONAL
    !IV_AGREEMENTID TYPE /AWS1/MPGAGREEMENTID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgcancagrpmntreqout
  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_paymentrequestid TYPE /AWS1/MPGPAYMENTREQUESTID /AWS1/MPGPAYMENTREQUESTID

The unique identifier of the payment request to cancel.

iv_agreementid TYPE /AWS1/MPGAGREEMENTID /AWS1/MPGAGREEMENTID

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

RETURNING

oo_output TYPE REF TO /aws1/cl_mpgcancagrpmntreqout /AWS1/CL_MPGCANCAGRPMNTREQOUT

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->cancelagrmntpaymentrequest(
  iv_agreementid = |string|
  iv_paymentrequestid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_paymentrequestid = lo_result->get_paymentrequestid( ).
  lv_agreementid = lo_result->get_agreementid( ).
  lv_paymentrequeststatus = lo_result->get_status( ).
  lv_paymentrequestname = lo_result->get_name( ).
  lv_paymentrequestdescripti = lo_result->get_description( ).
  lv_positiveamountupto8deci = lo_result->get_chargeamount( ).
  lv_currencycode = lo_result->get_currencycode( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
ENDIF.