Skip to content

/AWS1/IF_MPG=>REJECTAGRMNTPAYMENTREQUEST()

About RejectAgreementPaymentRequest

Allows buyers (acceptors) to reject a payment request that is in PENDING_APPROVAL status. Once rejected, the payment request transitions to REJECTED status and cannot be accepted. Buyers can optionally provide a reason for the rejection.

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

Method Signature

METHODS /AWS1/IF_MPG~REJECTAGRMNTPAYMENTREQUEST
  IMPORTING
    !IV_PAYMENTREQUESTID TYPE /AWS1/MPGPAYMENTREQUESTID OPTIONAL
    !IV_AGREEMENTID TYPE /AWS1/MPGAGREEMENTID OPTIONAL
    !IV_REJECTIONREASON TYPE /AWS1/MPGPMNTREQREJCTNREASON OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgrejagrmtpmntreqout
  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 reject.

iv_agreementid TYPE /AWS1/MPGAGREEMENTID /AWS1/MPGAGREEMENTID

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

Optional arguments:

iv_rejectionreason TYPE /AWS1/MPGPMNTREQREJCTNREASON /AWS1/MPGPMNTREQREJCTNREASON

An optional reason for rejecting the payment request (1-250 characters). This message is visible to the seller.

RETURNING

oo_output TYPE REF TO /aws1/cl_mpgrejagrmtpmntreqout /AWS1/CL_MPGREJAGRMTPMNTREQOUT

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->rejectagrmntpaymentrequest(
  iv_agreementid = |string|
  iv_paymentrequestid = |string|
  iv_rejectionreason = |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_paymentrequeststatusmes = lo_result->get_statusmessage( ).
  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.