/AWS1/IF_MPG=>SENDAGREEMENTPAYMENTREQUEST()¶
About SendAgreementPaymentRequest¶
Allows sellers (proposers) to submit a payment request to buyers (acceptors) for a specific charge amount for an agreement that includes a VariablePaymentTerm. The payment request is created in PENDING_APPROVAL status, at which point the buyer can accept or reject it.
The agreement must be active and have a VariablePaymentTerm to support payment requests. The chargeAmount must not exceed the remaining available balance under the VariablePaymentTerm maxTotalChargeAmount.
Method Signature¶
METHODS /AWS1/IF_MPG~SENDAGREEMENTPAYMENTREQUEST
IMPORTING
!IV_CLIENTTOKEN TYPE /AWS1/MPGCLIENTTOKEN OPTIONAL
!IV_AGREEMENTID TYPE /AWS1/MPGAGREEMENTID OPTIONAL
!IV_TERMID TYPE /AWS1/MPGTERMID OPTIONAL
!IV_NAME TYPE /AWS1/MPGPAYMENTREQUESTNAME OPTIONAL
!IV_CHARGEAMOUNT TYPE /AWS1/MPGPOSAMOUNTUPTO8DECIMLS OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/MPGPAYMENTREQUESTDESC OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgsendagrpmntreqout
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 payment request is being submitted. Use
GetAgreementTermsto retrieve agreement term details.
iv_termid TYPE /AWS1/MPGTERMID /AWS1/MPGTERMID¶
The unique identifier of the
VariablePaymentTermfor the agreement that the payment request is being sent for.
iv_name TYPE /AWS1/MPGPAYMENTREQUESTNAME /AWS1/MPGPAYMENTREQUESTNAME¶
A descriptive name for the payment request (5-64 characters).
iv_chargeamount TYPE /AWS1/MPGPOSAMOUNTUPTO8DECIMLS /AWS1/MPGPOSAMOUNTUPTO8DECIMLS¶
The amount requested to be charged to the buyer, positive decimal value in the currency of the accepted term.
A
ValidationExceptionis returned if thechargeAmountexceeds the available balance, if the agreement doesn't have an activeVariablePaymentTerm, or if thetermIdis invalid.
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/MPGPAYMENTREQUESTDESC /AWS1/MPGPAYMENTREQUESTDESC¶
An optional detailed description of the payment request (1-2000 characters).
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mpgsendagrpmntreqout /AWS1/CL_MPGSENDAGRPMNTREQOUT¶
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->sendagreementpaymentrequest(
iv_agreementid = |string|
iv_chargeamount = |string|
iv_clienttoken = |string|
iv_description = |string|
iv_name = |string|
iv_termid = |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( ).
ENDIF.