/AWS1/CL_CNK=>CREATERELATEDITEM()
¶
About CreateRelatedItem¶
Creates a related item (comments, tasks, and contacts) and associates it with a case.
-
A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a
contactArn
). All Related Items have their own internal identifier, therelatedItemArn
. Examples of related items includecomments
andcontacts
. -
If you provide a value for
performedBy.userArn
you must also have DescribeUser permission on the ARN of the user that you provide. -
The
type
field is reserved for internal use only.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_domainid
TYPE /AWS1/CNKDOMAINID
/AWS1/CNKDOMAINID
¶
The unique identifier of the Cases domain.
iv_caseid
TYPE /AWS1/CNKCASEID
/AWS1/CNKCASEID
¶
A unique identifier of the case.
iv_type
TYPE /AWS1/CNKRELATEDITEMTYPE
/AWS1/CNKRELATEDITEMTYPE
¶
The type of a related item.
io_content
TYPE REF TO /AWS1/CL_CNKRELATEDITEMINPCONT
/AWS1/CL_CNKRELATEDITEMINPCONT
¶
The content of a related item to be created.
Optional arguments:¶
io_performedby
TYPE REF TO /AWS1/CL_CNKUSERUNION
/AWS1/CL_CNKUSERUNION
¶
Represents the creator of the related item.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_cnkcrerelateditemrsp
/AWS1/CL_CNKCRERELATEDITEMRSP
¶
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_cnk~createrelateditem(
io_content = new /aws1/cl_cnkrelatediteminpcont(
io_comment = new /aws1/cl_cnkcommentcontent(
iv_body = |string|
iv_contenttype = |string|
)
io_contact = new /aws1/cl_cnkcontact( |string| )
io_file = new /aws1/cl_cnkfilecontent( |string| )
io_sla = new /aws1/cl_cnkslainputcontent(
io_slainputconfiguration = new /aws1/cl_cnkslainputconf(
it_targetfieldvalues = VALUE /aws1/cl_cnkfieldvalueunion=>tt_slafieldvalueunionlist(
(
new /aws1/cl_cnkfieldvalueunion(
io_emptyvalue = new /aws1/cl_cnkemptyfieldvalue( )
iv_booleanvalue = ABAP_TRUE
iv_doublevalue = '0.1'
iv_stringvalue = |string|
iv_userarnvalue = |string|
)
)
)
iv_fieldid = |string|
iv_name = |string|
iv_targetslaminutes = 123
iv_type = |string|
)
)
)
io_performedby = new /aws1/cl_cnkuserunion(
iv_customentity = |string|
iv_userarn = |string|
)
iv_caseid = |string|
iv_domainid = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_relateditemid = lo_result->get_relateditemid( ).
lv_relateditemarn = lo_result->get_relateditemarn( ).
ENDIF.