/AWS1/IF_CHE=>SEARCHAVAILABLEPHONENUMBERS()¶
About SearchAvailablePhoneNumbers¶
Searches for phone numbers that can be ordered. For US numbers, provide at least one of
the following search filters: AreaCode, City,
State, or TollFreePrefix. If you provide
City, you must also provide State. Numbers outside the US only
support the PhoneNumberType filter, which you must use.
Method Signature¶
METHODS /AWS1/IF_CHE~SEARCHAVAILABLEPHONENUMBERS
IMPORTING
!IV_AREACODE TYPE /AWS1/CHESTRING OPTIONAL
!IV_CITY TYPE /AWS1/CHESTRING OPTIONAL
!IV_COUNTRY TYPE /AWS1/CHEALPHA2COUNTRYCODE OPTIONAL
!IV_STATE TYPE /AWS1/CHESTRING OPTIONAL
!IV_TOLLFREEPREFIX TYPE /AWS1/CHETOLLFREEPREFIX OPTIONAL
!IV_PHONENUMBERTYPE TYPE /AWS1/CHEPHONENUMBERTYPE OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/CHEPHONENUMBERMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/CHESTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_chesrchavailablepho01
RAISING
/AWS1/CX_CHEACCESSDENIEDEX
/AWS1/CX_CHEBADREQUESTEX
/AWS1/CX_CHEFORBIDDENEXCEPTION
/AWS1/CX_CHESERVICEFAILUREEX
/AWS1/CX_CHESERVICEUNAVAILEX
/AWS1/CX_CHETHROTTLEDCLIENTEX
/AWS1/CX_CHEUNAUTHDCLIENTEX
/AWS1/CX_CHECLIENTEXC
/AWS1/CX_CHESERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_areacode TYPE /AWS1/CHESTRING /AWS1/CHESTRING¶
The area code used to filter results. Only applies to the US.
iv_city TYPE /AWS1/CHESTRING /AWS1/CHESTRING¶
The city used to filter results. Only applies to the US.
iv_country TYPE /AWS1/CHEALPHA2COUNTRYCODE /AWS1/CHEALPHA2COUNTRYCODE¶
The country used to filter results. Defaults to the US Format: ISO 3166-1 alpha-2.
iv_state TYPE /AWS1/CHESTRING /AWS1/CHESTRING¶
The state used to filter results. Required only if you provide
City. Only applies to the US.
iv_tollfreeprefix TYPE /AWS1/CHETOLLFREEPREFIX /AWS1/CHETOLLFREEPREFIX¶
The toll-free prefix that you use to filter results. Only applies to the US.
iv_phonenumbertype TYPE /AWS1/CHEPHONENUMBERTYPE /AWS1/CHEPHONENUMBERTYPE¶
The phone number type used to filter results. Required for non-US numbers.
iv_maxresults TYPE /AWS1/CHEPHONENUMBERMAXRESULTS /AWS1/CHEPHONENUMBERMAXRESULTS¶
The maximum number of results to return in a single call.
iv_nexttoken TYPE /AWS1/CHESTRING /AWS1/CHESTRING¶
The token used to retrieve the next page of results.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_chesrchavailablepho01 /AWS1/CL_CHESRCHAVAILABLEPHO01¶
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->searchavailablephonenumbers(
iv_areacode = |string|
iv_city = |string|
iv_country = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_phonenumbertype = |string|
iv_state = |string|
iv_tollfreeprefix = |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_e164phonenumbers( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_e164phonenumber = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_result->get_nexttoken( ).
ENDIF.