/AWS1/IF_CNK=>CREATETEMPLATE()
¶
About CreateTemplate¶
Creates a template in the Cases domain. This template is used to define the case object model (that is, to define what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive templates cannot be used to create cases.
Other template APIs are:
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_domainid
TYPE /AWS1/CNKDOMAINID
/AWS1/CNKDOMAINID
¶
The unique identifier of the Cases domain.
iv_name
TYPE /AWS1/CNKTEMPLATENAME
/AWS1/CNKTEMPLATENAME
¶
A name for the template. It must be unique per domain.
Optional arguments:¶
iv_description
TYPE /AWS1/CNKTEMPLATEDESCRIPTION
/AWS1/CNKTEMPLATEDESCRIPTION
¶
A brief description of the template.
io_layoutconfiguration
TYPE REF TO /AWS1/CL_CNKLAYOUTCONF
/AWS1/CL_CNKLAYOUTCONF
¶
Configuration of layouts associated to the template.
it_requiredfields
TYPE /AWS1/CL_CNKREQUIREDFIELD=>TT_REQUIREDFIELDLIST
TT_REQUIREDFIELDLIST
¶
A list of fields that must contain a value for a case to be successfully created with this template.
iv_status
TYPE /AWS1/CNKTEMPLATESTATUS
/AWS1/CNKTEMPLATESTATUS
¶
The status of the template.
it_rules
TYPE /AWS1/CL_CNKTEMPLATERULE=>TT_TEMPLATECASERULELIST
TT_TEMPLATECASERULELIST
¶
A list of case rules (also known as case field conditions) on a template.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_cnkcreatetmplresponse
/AWS1/CL_CNKCREATETMPLRESPONSE
¶
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~createtemplate(
io_layoutconfiguration = new /aws1/cl_cnklayoutconf( |string| )
it_requiredfields = VALUE /aws1/cl_cnkrequiredfield=>tt_requiredfieldlist(
( new /aws1/cl_cnkrequiredfield( |string| ) )
)
it_rules = VALUE /aws1/cl_cnktemplaterule=>tt_templatecaserulelist(
(
new /aws1/cl_cnktemplaterule(
iv_caseruleid = |string|
iv_fieldid = |string|
)
)
)
iv_description = |string|
iv_domainid = |string|
iv_name = |string|
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_templateid = lo_result->get_templateid( ).
lv_templatearn = lo_result->get_templatearn( ).
ENDIF.