/AWS1/IF_PP2=>SENDMEDIAMESSAGE()¶
About SendMediaMessage¶
Creates a new multimedia message (MMS) and sends it to a recipient's phone number.
Method Signature¶
METHODS /AWS1/IF_PP2~SENDMEDIAMESSAGE
IMPORTING
!IV_DESTINATIONPHONENUMBER TYPE /AWS1/PP2PHONENUMBER OPTIONAL
!IV_ORIGINATIONIDENTITY TYPE /AWS1/PP2MEDIAMSGORIGINATIONID OPTIONAL
!IV_MESSAGEBODY TYPE /AWS1/PP2TEXTMESSAGEBODY OPTIONAL
!IT_MEDIAURLS TYPE /AWS1/CL_PP2MEDIAURLLIST_W=>TT_MEDIAURLLIST OPTIONAL
!IV_CONFIGURATIONSETNAME TYPE /AWS1/PP2CONFSETNAMEORARN OPTIONAL
!IV_MAXPRICE TYPE /AWS1/PP2MAXPRICE OPTIONAL
!IV_TIMETOLIVE TYPE /AWS1/PP2TIMETOLIVE OPTIONAL
!IT_CONTEXT TYPE /AWS1/CL_PP2CONTEXTMAP_W=>TT_CONTEXTMAP OPTIONAL
!IV_DRYRUN TYPE /AWS1/PP2PRIMITIVEBOOLEAN OPTIONAL
!IV_PROTECTCONFIGURATIONID TYPE /AWS1/PP2PROTECTCONFIDORARN OPTIONAL
!IV_MESSAGEFEEDBACKENABLED TYPE /AWS1/PP2BOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pp2sendmediamsgresult
RAISING
/AWS1/CX_PP2ACCESSDENIEDEX
/AWS1/CX_PP2CONFLICTEXCEPTION
/AWS1/CX_PP2INTERNALSERVEREX
/AWS1/CX_PP2RESOURCENOTFOUNDEX
/AWS1/CX_PP2SERVICEQUOTAEXCDEX
/AWS1/CX_PP2THROTTLINGEX
/AWS1/CX_PP2VALIDATIONEX
/AWS1/CX_PP2CLIENTEXC
/AWS1/CX_PP2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_destinationphonenumber TYPE /AWS1/PP2PHONENUMBER /AWS1/PP2PHONENUMBER¶
The destination phone number in E.164 format.
iv_originationidentity TYPE /AWS1/PP2MEDIAMSGORIGINATIONID /AWS1/PP2MEDIAMSGORIGINATIONID¶
The origination identity of the message. This can be either the PhoneNumber, PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.
If you are using a shared End User MessagingSMS resource then you must use the full Amazon Resource Name(ARN).
Optional arguments:¶
iv_messagebody TYPE /AWS1/PP2TEXTMESSAGEBODY /AWS1/PP2TEXTMESSAGEBODY¶
The text body of the message.
it_mediaurls TYPE /AWS1/CL_PP2MEDIAURLLIST_W=>TT_MEDIAURLLIST TT_MEDIAURLLIST¶
An array of URLs to each media file to send.
The media files have to be stored in an S3 bucket. Supported media file formats are listed in MMS file types, size and character limits. For more information on creating an S3 bucket and managing objects, see Creating a bucket, Uploading objects in the Amazon S3 User Guide, and Setting up an Amazon S3 bucket for MMS files in the Amazon Web Services End User Messaging SMS User Guide.
iv_configurationsetname TYPE /AWS1/PP2CONFSETNAMEORARN /AWS1/PP2CONFSETNAMEORARN¶
The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
iv_maxprice TYPE /AWS1/PP2MAXPRICE /AWS1/PP2MAXPRICE¶
The maximum amount that you want to spend, in US dollars, per each MMS message.
iv_timetolive TYPE /AWS1/PP2TIMETOLIVE /AWS1/PP2TIMETOLIVE¶
How long the media message is valid for. By default this is 72 hours.
it_context TYPE /AWS1/CL_PP2CONTEXTMAP_W=>TT_CONTEXTMAP TT_CONTEXTMAP¶
You can specify custom data in this field. If you do, that data is logged to the event destination.
iv_dryrun TYPE /AWS1/PP2PRIMITIVEBOOLEAN /AWS1/PP2PRIMITIVEBOOLEAN¶
When set to true, the message is checked and validated, but isn't sent to the end recipient.
iv_protectconfigurationid TYPE /AWS1/PP2PROTECTCONFIDORARN /AWS1/PP2PROTECTCONFIDORARN¶
The unique identifier of the protect configuration to use.
iv_messagefeedbackenabled TYPE /AWS1/PP2BOOLEAN /AWS1/PP2BOOLEAN¶
Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_pp2sendmediamsgresult /AWS1/CL_PP2SENDMEDIAMSGRESULT¶
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->sendmediamessage(
it_context = VALUE /aws1/cl_pp2contextmap_w=>tt_contextmap(
(
VALUE /aws1/cl_pp2contextmap_w=>ts_contextmap_maprow(
key = |string|
value = new /aws1/cl_pp2contextmap_w( |string| )
)
)
)
it_mediaurls = VALUE /aws1/cl_pp2mediaurllist_w=>tt_mediaurllist(
( new /aws1/cl_pp2mediaurllist_w( |string| ) )
)
iv_configurationsetname = |string|
iv_destinationphonenumber = |string|
iv_dryrun = ABAP_TRUE
iv_maxprice = |string|
iv_messagebody = |string|
iv_messagefeedbackenabled = ABAP_TRUE
iv_originationidentity = |string|
iv_protectconfigurationid = |string|
iv_timetolive = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_messageid( ).
ENDIF.