/AWS1/IF_PPM=>CREWHATSAPPMSGTMPLFRMLIBRARY()¶
About CreateWhatsAppMessageTemplateFromLibrary¶
Creates a new WhatsApp message template using a template from Meta's template library.
Method Signature¶
METHODS /AWS1/IF_PPM~CREWHATSAPPMSGTMPLFRMLIBRARY
IMPORTING
!IO_METALIBRARYTEMPLATE TYPE REF TO /AWS1/CL_PPMMETALIBRARYTMPL OPTIONAL
!IV_ID TYPE /AWS1/PPMLNKWHATSAPPBUSINESS00 OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ppmcrewhatsappmsgtm03
RAISING
/AWS1/CX_PPMACCESSDENIEDEX
/AWS1/CX_PPMVALIDATIONEX
/AWS1/CX_PPMDEPENDENCYEX
/AWS1/CX_PPMINTERNALSERVICEEX
/AWS1/CX_PPMINVALIDPARAMSEX
/AWS1/CX_PPMRESOURCENOTFOUNDEX
/AWS1/CX_PPMTHROTTLEDREQUESTEX
/AWS1/CX_PPMCLIENTEXC
/AWS1/CX_PPMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_metalibrarytemplate TYPE REF TO /AWS1/CL_PPMMETALIBRARYTMPL /AWS1/CL_PPMMETALIBRARYTMPL¶
The template configuration from Meta's library, including customizations for buttons and body text.
iv_id TYPE /AWS1/PPMLNKWHATSAPPBUSINESS00 /AWS1/PPMLNKWHATSAPPBUSINESS00¶
The ID of the WhatsApp Business Account to associate with this template.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ppmcrewhatsappmsgtm03 /AWS1/CL_PPMCREWHATSAPPMSGTM03¶
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->crewhatsappmsgtmplfrmlibrary(
io_metalibrarytemplate = new /aws1/cl_ppmmetalibrarytmpl(
io_librarytemplatebodyinputs = new /aws1/cl_ppmlibrarytmplbodyi00(
iv_addcontactnumber = ABAP_TRUE
iv_addlearnmorelink = ABAP_TRUE
iv_addsecurityrecommendation = ABAP_TRUE
iv_addtrackpackagelink = ABAP_TRUE
iv_codeexpirationminutes = 123
)
it_librarytmplbuttoninputs = VALUE /aws1/cl_ppmlibrarytmplbutto00=>tt_metalibrarytmplbuttoninputs(
(
new /aws1/cl_ppmlibrarytmplbutto00(
it_supportedapps = VALUE /aws1/cl_ppmsupportedapp_w=>tt_supportedapps(
(
VALUE /aws1/cl_ppmsupportedapp_w=>tt_supportedapp(
(
VALUE /aws1/cl_ppmsupportedapp_w=>ts_supportedapp_maprow(
value = new /aws1/cl_ppmsupportedapp_w( |string| )
key = |string|
)
)
)
)
)
it_url = VALUE /aws1/cl_ppmmetaurlwsuffixex00=>tt_metaurlwithsuffixexample(
(
VALUE /aws1/cl_ppmmetaurlwsuffixex00=>ts_metaurlwsuffixexam00_maprow(
value = new /aws1/cl_ppmmetaurlwsuffixex00( |string| )
key = |string|
)
)
)
iv_otptype = |string|
iv_phonenumber = |string|
iv_type = |string|
iv_zerotaptermsaccepted = ABAP_TRUE
)
)
)
iv_librarytemplatename = |string|
iv_templatecategory = |string|
iv_templatelanguage = |string|
iv_templatename = |string|
)
iv_id = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_metatemplateid = lo_result->get_metatemplateid( ).
lv_string = lo_result->get_templatestatus( ).
lv_metatemplatecategory = lo_result->get_category( ).
ENDIF.