/AWS1/IF_PP2=>DESCRIBENOTIFYTEMPLATES()¶
About DescribeNotifyTemplates¶
Describes the specified notify templates or all notify templates in your account.
If you specify template IDs, the output includes information for only the specified notify templates. If you specify filters, the output includes information for only those notify templates that meet the filter criteria. If you don't specify template IDs or filters, the output includes information for all notify templates.
If you specify a template ID that isn't valid, an error is returned.
Method Signature¶
METHODS /AWS1/IF_PP2~DESCRIBENOTIFYTEMPLATES
IMPORTING
!IT_TEMPLATEIDS TYPE /AWS1/CL_PP2NOTIFYTMPLIDLIST_W=>TT_NOTIFYTEMPLATEIDLIST OPTIONAL
!IT_FILTERS TYPE /AWS1/CL_PP2NOTIFYTMPLFILTER=>TT_NOTIFYTEMPLATEFILTERLIST OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/PP2NEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/PP2MAXRESULTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pp2descrntfytmplsrslt
RAISING
/AWS1/CX_PP2ACCESSDENIEDEX
/AWS1/CX_PP2INTERNALSERVEREX
/AWS1/CX_PP2RESOURCENOTFOUNDEX
/AWS1/CX_PP2THROTTLINGEX
/AWS1/CX_PP2VALIDATIONEX
/AWS1/CX_PP2CLIENTEXC
/AWS1/CX_PP2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
it_templateids TYPE /AWS1/CL_PP2NOTIFYTMPLIDLIST_W=>TT_NOTIFYTEMPLATEIDLIST TT_NOTIFYTEMPLATEIDLIST¶
An array of template IDs to describe.
it_filters TYPE /AWS1/CL_PP2NOTIFYTMPLFILTER=>TT_NOTIFYTEMPLATEFILTERLIST TT_NOTIFYTEMPLATEFILTERLIST¶
An array of NotifyTemplateFilter objects to filter the results on.
iv_nexttoken TYPE /AWS1/PP2NEXTTOKEN /AWS1/PP2NEXTTOKEN¶
The token to be used for the next set of paginated results. You don't need to supply a value for this field in the initial request.
iv_maxresults TYPE /AWS1/PP2MAXRESULTS /AWS1/PP2MAXRESULTS¶
The maximum number of results to return per each request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_pp2descrntfytmplsrslt /AWS1/CL_PP2DESCRNTFYTMPLSRSLT¶
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->describenotifytemplates(
it_filters = VALUE /aws1/cl_pp2notifytmplfilter=>tt_notifytemplatefilterlist(
(
new /aws1/cl_pp2notifytmplfilter(
it_values = VALUE /aws1/cl_pp2filtervaluelist_w=>tt_filtervaluelist(
( new /aws1/cl_pp2filtervaluelist_w( |string| ) )
)
iv_name = |string|
)
)
)
it_templateids = VALUE /aws1/cl_pp2notifytmplidlist_w=>tt_notifytemplateidlist(
( new /aws1/cl_pp2notifytmplidlist_w( |string| ) )
)
iv_maxresults = 123
iv_nexttoken = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_notifytemplates( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_notifytemplateid = lo_row_1->get_templateid( ).
lv_notifytemplateversion = lo_row_1->get_version( ).
lv_notifytemplatetype = lo_row_1->get_templatetype( ).
LOOP AT lo_row_1->get_channels( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_numbercapability = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_tieraccess( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_notifyconfigurationtier = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_notifytemplatestatus = lo_row_1->get_status( ).
LOOP AT lo_row_1->get_supportedcountries( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_isocountrycode = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
lv_notifylanguagecode = lo_row_1->get_languagecode( ).
lv_templatecontent = lo_row_1->get_content( ).
LOOP AT lo_row_1->get_variables( ) into ls_row_8.
lv_key = ls_row_8-key.
lo_value = ls_row_8-value.
IF lo_value IS NOT INITIAL.
lv_templatevariabletype = lo_value->get_type( ).
lv_primitiveboolean = lo_value->get_required( ).
lv_string = lo_value->get_description( ).
lv_integer = lo_value->get_maxlength( ).
lv_integer = lo_value->get_minvalue( ).
lv_integer = lo_value->get_maxvalue( ).
lv_string = lo_value->get_defaultvalue( ).
lv_string = lo_value->get_pattern( ).
lv_string = lo_value->get_sample( ).
lv_templatevariablesource = lo_value->get_source( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_supportedvoiceids( ) into lo_row_9.
lo_row_10 = lo_row_9.
IF lo_row_10 IS NOT INITIAL.
lv_voiceid = lo_row_10->get_value( ).
ENDIF.
ENDLOOP.
lv_timestamp = lo_row_1->get_createdtimestamp( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.
DescribeNotifyTemplates¶
Describe available notify templates for OTP verification over SMS.
DATA(lo_result) = lo_client->describenotifytemplates(
it_filters = VALUE /aws1/cl_pp2notifytmplfilter=>tt_notifytemplatefilterlist(
(
new /aws1/cl_pp2notifytmplfilter(
it_values = VALUE /aws1/cl_pp2filtervaluelist_w=>tt_filtervaluelist(
( new /aws1/cl_pp2filtervaluelist_w( |OTP_VERIFICATION| ) )
)
iv_name = |template-type|
)
)
(
new /aws1/cl_pp2notifytmplfilter(
it_values = VALUE /aws1/cl_pp2filtervaluelist_w=>tt_filtervaluelist(
( new /aws1/cl_pp2filtervaluelist_w( |SMS| ) )
)
iv_name = |channels|
)
)
)
iv_maxresults = 10
).