/AWS1/IF_BTC=>UPDATECONSUMABLERESOURCE()¶
About UpdateConsumableResource¶
Updates a consumable resource.
Method Signature¶
METHODS /AWS1/IF_BTC~UPDATECONSUMABLERESOURCE
IMPORTING
!IV_CONSUMABLERESOURCE TYPE /AWS1/BTCSTRING OPTIONAL
!IV_OPERATION TYPE /AWS1/BTCSTRING OPTIONAL
!IV_QUANTITY TYPE /AWS1/BTCLONG OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/BTCCLIENTREQUESTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_btcupconsumableresr01
RAISING
/AWS1/CX_BTCCLIENTEXCEPTION
/AWS1/CX_BTCSERVEREXCEPTION
/AWS1/CX_BTCCLIENTEXC
/AWS1/CX_BTCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_consumableresource TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING¶
The name or ARN of the consumable resource to be updated.
Optional arguments:¶
iv_operation TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING¶
Indicates how the quantity of the consumable resource will be updated. Must be one of:
SETSets the quantity of the resource to the value specified by the
quantityparameter.
ADDIncreases the quantity of the resource by the value specified by the
quantityparameter.
REMOVEReduces the quantity of the resource by the value specified by the
quantityparameter.
iv_quantity TYPE /AWS1/BTCLONG /AWS1/BTCLONG¶
The change in the total quantity of the consumable resource. The
operationparameter determines whether the value specified here will be the new total quantity, or the amount by which the total quantity will be increased or reduced. Must be a non-negative value.
iv_clienttoken TYPE /AWS1/BTCCLIENTREQUESTTOKEN /AWS1/BTCCLIENTREQUESTTOKEN¶
If this parameter is specified and two update requests with identical payloads and
clientTokens are received, these requests are considered the same request. Both requests will succeed, but the update will only happen once. AclientTokenis valid for 8 hours.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_btcupconsumableresr01 /AWS1/CL_BTCUPCONSUMABLERESR01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->updateconsumableresource(
iv_clienttoken = |string|
iv_consumableresource = |string|
iv_operation = |string|
iv_quantity = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_consumableresourcename( ).
lv_string = lo_result->get_consumableresourcearn( ).
lv_long = lo_result->get_totalquantity( ).
ENDIF.
To update a consumable resource¶
Updates a consumable resource.
DATA(lo_result) = lo_client->updateconsumableresource(
iv_consumableresource = |myConsumableResource|
iv_operation = |ADD|
iv_quantity = 12
).