/AWS1/IF_CNK=>CREATECASE()¶
About CreateCase¶
If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide
Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types.
The following fields are required when creating a case:
-
customer_id- You must provide the full customer profile ARN in this format:arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID -
title
Method Signature¶
METHODS /AWS1/IF_CNK~CREATECASE
IMPORTING
!IV_DOMAINID TYPE /AWS1/CNKDOMAINID OPTIONAL
!IV_TEMPLATEID TYPE /AWS1/CNKTEMPLATEID OPTIONAL
!IT_FIELDS TYPE /AWS1/CL_CNKFIELDVALUE=>TT_FIELDVALUELIST OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/CNKSTRING OPTIONAL
!IO_PERFORMEDBY TYPE REF TO /AWS1/CL_CNKUSERUNION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cnkcreatecaseresponse
RAISING
/AWS1/CX_CNKACCESSDENIEDEX
/AWS1/CX_CNKCONFLICTEXCEPTION
/AWS1/CX_CNKINTERNALSERVEREX
/AWS1/CX_CNKRESOURCENOTFOUNDEX
/AWS1/CX_CNKTHROTTLINGEX
/AWS1/CX_CNKVALIDATIONEX
/AWS1/CX_CNKCLIENTEXC
/AWS1/CX_CNKSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_domainid TYPE /AWS1/CNKDOMAINID /AWS1/CNKDOMAINID¶
The unique identifier of the Cases domain.
iv_templateid TYPE /AWS1/CNKTEMPLATEID /AWS1/CNKTEMPLATEID¶
A unique identifier of a template.
it_fields TYPE /AWS1/CL_CNKFIELDVALUE=>TT_FIELDVALUELIST TT_FIELDVALUELIST¶
An array of objects with field ID (matching ListFields/DescribeField) and value union data.
Optional arguments:¶
iv_clienttoken TYPE /AWS1/CNKSTRING /AWS1/CNKSTRING¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
io_performedby TYPE REF TO /AWS1/CL_CNKUSERUNION /AWS1/CL_CNKUSERUNION¶
performedBy
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cnkcreatecaseresponse /AWS1/CL_CNKCREATECASERESPONSE¶
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->createcase(
io_performedby = new /aws1/cl_cnkuserunion(
iv_customentity = |string|
iv_userarn = |string|
)
it_fields = VALUE /aws1/cl_cnkfieldvalue=>tt_fieldvaluelist(
(
new /aws1/cl_cnkfieldvalue(
io_value = 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_id = |string|
)
)
)
iv_clienttoken = |string|
iv_domainid = |string|
iv_templateid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_caseid = lo_result->get_caseid( ).
lv_casearn = lo_result->get_casearn( ).
ENDIF.