/AWS1/IF_CHS=>BATCHCREATECHANNELMEMBERSHIP()¶
About BatchCreateChannelMembership¶
Adds a specified number of users and bots to a channel.
Method Signature¶
METHODS /AWS1/IF_CHS~BATCHCREATECHANNELMEMBERSHIP
IMPORTING
!IV_CHANNELARN TYPE /AWS1/CHSCHIMEARN OPTIONAL
!IV_TYPE TYPE /AWS1/CHSCHANNELMEMBERSHIPTYPE OPTIONAL
!IT_MEMBERARNS TYPE /AWS1/CL_CHSMEMBERARNS_W=>TT_MEMBERARNS OPTIONAL
!IV_CHIMEBEARER TYPE /AWS1/CHSCHIMEARN OPTIONAL
!IV_SUBCHANNELID TYPE /AWS1/CHSSUBCHANNELID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_chsbtccrechannelmem01
RAISING
/AWS1/CX_CHSBADREQUESTEX
/AWS1/CX_CHSFORBIDDENEXCEPTION
/AWS1/CX_CHSNOTFOUNDEXCEPTION
/AWS1/CX_CHSRESRCLIMITEXCDEX
/AWS1/CX_CHSSERVICEFAILUREEX
/AWS1/CX_CHSSERVICEUNAVAILEX
/AWS1/CX_CHSTHROTTLEDCLIENTEX
/AWS1/CX_CHSUNAUTHDCLIENTEX
/AWS1/CX_CHSCLIENTEXC
/AWS1/CX_CHSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_channelarn TYPE /AWS1/CHSCHIMEARN /AWS1/CHSCHIMEARN¶
The ARN of the channel to which you're adding users or bots.
it_memberarns TYPE /AWS1/CL_CHSMEMBERARNS_W=>TT_MEMBERARNS TT_MEMBERARNS¶
The ARNs of the members you want to add to the channel. Only
AppInstanceUsersandAppInstanceBotscan be added as a channel member.
iv_chimebearer TYPE /AWS1/CHSCHIMEARN /AWS1/CHSCHIMEARN¶
The ARN of the
AppInstanceUserorAppInstanceBotthat makes the API call.
Optional arguments:¶
iv_type TYPE /AWS1/CHSCHANNELMEMBERSHIPTYPE /AWS1/CHSCHANNELMEMBERSHIPTYPE¶
The membership type of a user,
DEFAULTorHIDDEN. Default members are always returned as part ofListChannelMemberships. Hidden members are only returned if the type filter inListChannelMembershipsequalsHIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.
iv_subchannelid TYPE /AWS1/CHSSUBCHANNELID /AWS1/CHSSUBCHANNELID¶
The ID of the SubChannel in the request.
Only required when creating membership in a SubChannel for a moderator in an elastic channel.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_chsbtccrechannelmem01 /AWS1/CL_CHSBTCCRECHANNELMEM01¶
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->batchcreatechannelmembership(
it_memberarns = VALUE /aws1/cl_chsmemberarns_w=>tt_memberarns(
( new /aws1/cl_chsmemberarns_w( |string| ) )
)
iv_channelarn = |string|
iv_chimebearer = |string|
iv_subchannelid = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_batchchannelmemberships = lo_result->get_batchchannelmemberships( ).
IF lo_batchchannelmemberships IS NOT INITIAL.
lo_identity = lo_batchchannelmemberships->get_invitedby( ).
IF lo_identity IS NOT INITIAL.
lv_chimearn = lo_identity->get_arn( ).
lv_resourcename = lo_identity->get_name( ).
ENDIF.
lv_channelmembershiptype = lo_batchchannelmemberships->get_type( ).
LOOP AT lo_batchchannelmemberships->get_members( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_chimearn = lo_row_1->get_arn( ).
lv_resourcename = lo_row_1->get_name( ).
ENDIF.
ENDLOOP.
lv_chimearn = lo_batchchannelmemberships->get_channelarn( ).
lv_subchannelid = lo_batchchannelmemberships->get_subchannelid( ).
ENDIF.
LOOP AT lo_result->get_errors( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_chimearn = lo_row_3->get_memberarn( ).
lv_errorcode = lo_row_3->get_errorcode( ).
lv_string = lo_row_3->get_errormessage( ).
ENDIF.
ENDLOOP.
ENDIF.