/AWS1/IF_LOC=>LISTJOBS()¶
About ListJobs¶
ListJobs retrieves a list of jobs with optional filtering and pagination support.
For more information, see Job concepts in the Amazon Location Service Developer Guide.
Method Signature¶
METHODS /AWS1/IF_LOC~LISTJOBS
IMPORTING
!IO_FILTER TYPE REF TO /AWS1/CL_LOCJOBSFILTER OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/LOCINTEGER OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/LOCLARGETOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_loclistjobsresponse
RAISING
/AWS1/CX_LOCACCESSDENIEDEX
/AWS1/CX_LOCINTERNALSERVEREX
/AWS1/CX_LOCTHROTTLINGEX
/AWS1/CX_LOCVALIDATIONEX
/AWS1/CX_LOCCLIENTEXC
/AWS1/CX_LOCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
io_filter TYPE REF TO /AWS1/CL_LOCJOBSFILTER /AWS1/CL_LOCJOBSFILTER¶
An optional structure containing criteria by which to filter job results.
iv_maxresults TYPE /AWS1/LOCINTEGER /AWS1/LOCINTEGER¶
Maximum number of jobs to return.
iv_nexttoken TYPE /AWS1/LOCLARGETOKEN /AWS1/LOCLARGETOKEN¶
The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_loclistjobsresponse /AWS1/CL_LOCLISTJOBSRESPONSE¶
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->listjobs(
io_filter = new /aws1/cl_locjobsfilter( |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_entries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_jobaction = lo_row_1->get_action( ).
lo_jobactionoptions = lo_row_1->get_actionoptions( ).
IF lo_jobactionoptions IS NOT INITIAL.
lo_validateaddressactionop = lo_jobactionoptions->get_validateaddress( ).
IF lo_validateaddressactionop IS NOT INITIAL.
LOOP AT lo_validateaddressactionop->get_additionalfeatures( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_validateaddressaddition = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_timestamp = lo_row_1->get_createdat( ).
lv_iamrolearn = lo_row_1->get_executionrolearn( ).
lv_timestamp = lo_row_1->get_endedat( ).
lo_joberror = lo_row_1->get_error( ).
IF lo_joberror IS NOT INITIAL.
lv_joberrorcode = lo_joberror->get_code( ).
LOOP AT lo_joberror->get_messages( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_joberrormessage = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lo_jobinputoptions = lo_row_1->get_inputoptions( ).
IF lo_jobinputoptions IS NOT INITIAL.
lv_jobinputlocation = lo_jobinputoptions->get_location( ).
lv_jobinputformat = lo_jobinputoptions->get_format( ).
ENDIF.
lv_jobid = lo_row_1->get_jobid( ).
lv_geoarn = lo_row_1->get_jobarn( ).
lv_resourcename = lo_row_1->get_name( ).
lo_joboutputoptions = lo_row_1->get_outputoptions( ).
IF lo_joboutputoptions IS NOT INITIAL.
lv_joboutputformat = lo_joboutputoptions->get_format( ).
lv_joboutputlocation = lo_joboutputoptions->get_location( ).
ENDIF.
lv_jobstatus = lo_row_1->get_status( ).
lv_timestamp = lo_row_1->get_updatedat( ).
ENDIF.
ENDLOOP.
lv_largetoken = lo_result->get_nexttoken( ).
ENDIF.