/AWS1/IF_MPG=>BATCHCREATEBLLNGADJSTMTREQ()¶
About BatchCreateBillingAdjustmentRequest¶
Allows sellers (proposers) to submit billing adjustment requests for one or more invoices within an agreement. Each entry in the batch specifies an invoice and the adjustment amount. The operation returns successfully created adjustment request IDs and any errors for entries that failed validation.
Each entry requires a unique clientToken for idempotency. A ValidationException is returned if the adjustment amount exceeds the maximum refundable amount for the invoice.
Method Signature¶
METHODS /AWS1/IF_MPG~BATCHCREATEBLLNGADJSTMTREQ
IMPORTING
!IT_BLLNGADJSTMTREQENTRIES TYPE /AWS1/CL_MPGBTCCREBLLADJREQENT=>TT_BTCCREBLLADJSTREQENTRYLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpgbtccreblladjreqout
RAISING
/AWS1/CX_MPGACCESSDENIEDEX
/AWS1/CX_MPGCONFLICTEXCEPTION
/AWS1/CX_MPGINTERNALSERVEREX
/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:¶
it_bllngadjstmtreqentries TYPE /AWS1/CL_MPGBTCCREBLLADJREQENT=>TT_BTCCREBLLADJSTREQENTRYLIST TT_BTCCREBLLADJSTREQENTRYLIST¶
A list of billing adjustment request entries. Each entry specifies the invoice and adjustment details.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mpgbtccreblladjreqout /AWS1/CL_MPGBTCCREBLLADJREQOUT¶
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->batchcreatebllngadjstmtreq(
it_bllngadjstmtreqentries = VALUE /aws1/cl_mpgbtccreblladjreqent=>tt_btccreblladjstreqentrylist(
(
new /aws1/cl_mpgbtccreblladjreqent(
iv_adjustmentamount = |string|
iv_adjustmentreasoncode = |string|
iv_agreementid = |string|
iv_clienttoken = |string|
iv_currencycode = |string|
iv_description = |string|
iv_originalinvoiceid = |string|
)
)
)
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_billingadjustmentreques = lo_row_1->get_billingadjstmtrequestid( ).
lv_clienttoken = lo_row_1->get_clienttoken( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_errors( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_billingadjustmenterrorc = lo_row_3->get_code( ).
lv_string = lo_row_3->get_message( ).
lv_clienttoken = lo_row_3->get_clienttoken( ).
ENDIF.
ENDLOOP.
ENDIF.
Create billing adjustment requests¶
Create billing adjustment requests
DATA(lo_result) = lo_client->batchcreatebllngadjstmtreq(
it_bllngadjstmtreqentries = VALUE /aws1/cl_mpgbtccreblladjreqent=>tt_btccreblladjstreqentrylist(
(
new /aws1/cl_mpgbtccreblladjreqent(
iv_adjustmentamount = |500.00|
iv_adjustmentreasoncode = |OTHER|
iv_agreementid = |agmt-SvIzsqYMyQwI3GWgJAe17URx|
iv_clienttoken = |71a5e82e-a49b-4075-8c7f-52df1d294379|
iv_currencycode = |USD|
iv_description = |Customer requested adjustment due to service outage during critical business period.|
iv_originalinvoiceid = |E2E20230929a108cfae|
)
)
)
).