/AWS1/CL_BTC=>CREATECONSUMABLERESOURCE()
¶
About CreateConsumableResource¶
Creates an Batch consumable resource.
Method Signature¶
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->/aws1/if_btc~createconsumableresource(
it_tags = VALUE /aws1/cl_btctagristagsmap_w=>tt_tagristagsmap(
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
key = |string|
value = new /aws1/cl_btctagristagsmap_w( |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->/aws1/if_btc~createconsumableresource(
it_tags = VALUE /aws1/cl_btctagristagsmap_w=>tt_tagristagsmap(
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
key = |Department|
value = new /aws1/cl_btctagristagsmap_w( |Engineering| )
)
)
(
VALUE /aws1/cl_btctagristagsmap_w=>ts_tagristagsmap_maprow(
key = |User|
value = new /aws1/cl_btctagristagsmap_w( |JaneDoe| )
)
)
)
iv_consumableresourcename = |myConsumableResource|
iv_resourcetype = |REPLENISHABLE|
iv_totalquantity = 123
).