/AWS1/IF_BTC=>CREATECONSUMABLERESOURCE()¶
About CreateConsumableResource¶
Creates an Batch consumable resource.
Method Signature¶
METHODS /AWS1/IF_BTC~CREATECONSUMABLERESOURCE
IMPORTING
!IV_CONSUMABLERESOURCENAME TYPE /AWS1/BTCSTRING OPTIONAL
!IV_TOTALQUANTITY TYPE /AWS1/BTCLONG OPTIONAL
!IV_RESOURCETYPE TYPE /AWS1/BTCSTRING OPTIONAL
!IT_TAGS TYPE /AWS1/CL_BTCTAGRISTAGSMAP_W=>TT_TAGRISTAGSMAP OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_btccreconsumableres01
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_consumableresourcename TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING¶
The name of the consumable resource. Must be unique.
Optional arguments:¶
iv_totalquantity TYPE /AWS1/BTCLONG /AWS1/BTCLONG¶
The total amount of the consumable resource that is available. Must be non-negative.
iv_resourcetype TYPE /AWS1/BTCSTRING /AWS1/BTCSTRING¶
Indicates whether the resource is available to be re-used after a job completes. Can be one of:
REPLENISHABLE(default)
NON_REPLENISHABLE
it_tags TYPE /AWS1/CL_BTCTAGRISTAGSMAP_W=>TT_TAGRISTAGSMAP TT_TAGRISTAGSMAP¶
The tags that you apply to the consumable resource to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_btccreconsumableres01 /AWS1/CL_BTCCRECONSUMABLERES01¶
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->createconsumableresource(
it_tags = VALUE /aws1/cl_btctagristagsmap_w=>tt_tagristagsmap(
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
value = new /aws1/cl_btctagristagsmap_w( |string| )
key = |string|
)
)
)
iv_consumableresourcename = |string|
iv_resourcetype = |string|
iv_totalquantity = 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( ).
ENDIF.
To create a consumable resource¶
Creates a Batch consumable resource.
DATA(lo_result) = lo_client->createconsumableresource(
it_tags = VALUE /aws1/cl_btctagristagsmap_w=>tt_tagristagsmap(
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
value = new /aws1/cl_btctagristagsmap_w( |Engineering| )
key = |Department|
)
)
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
value = new /aws1/cl_btctagristagsmap_w( |JaneDoe| )
key = |User|
)
)
)
iv_consumableresourcename = |myConsumableResource|
iv_resourcetype = |REPLENISHABLE|
iv_totalquantity = 123
).