/AWS1/IF_LOC=>GETJOB()¶
About GetJob¶
GetJob retrieves detailed information about a specific job, including its current status, configuration, and error information if the job failed.
For more information, see Job concepts in the Amazon Location Service Developer Guide.
Method Signature¶
METHODS /AWS1/IF_LOC~GETJOB
IMPORTING
!IV_JOBID TYPE /AWS1/LOCJOBID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_locgetjobresponse
RAISING
/AWS1/CX_LOCACCESSDENIEDEX
/AWS1/CX_LOCINTERNALSERVEREX
/AWS1/CX_LOCRESOURCENOTFOUNDEX
/AWS1/CX_LOCTHROTTLINGEX
/AWS1/CX_LOCVALIDATIONEX
/AWS1/CX_LOCCLIENTEXC
/AWS1/CX_LOCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_jobid TYPE /AWS1/LOCJOBID /AWS1/LOCJOBID¶
The unique identifier of the job to retrieve.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_locgetjobresponse /AWS1/CL_LOCGETJOBRESPONSE¶
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->getjob( |string| ).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_jobaction = lo_result->get_action( ).
lo_jobactionoptions = lo_result->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.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_validateaddressaddition = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_timestamp = lo_result->get_createdat( ).
lv_timestamp = lo_result->get_endedat( ).
lo_joberror = lo_result->get_error( ).
IF lo_joberror IS NOT INITIAL.
lv_joberrorcode = lo_joberror->get_code( ).
LOOP AT lo_joberror->get_messages( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_joberrormessage = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_iamrolearn = lo_result->get_executionrolearn( ).
lo_jobinputoptions = lo_result->get_inputoptions( ).
IF lo_jobinputoptions IS NOT INITIAL.
lv_jobinputlocation = lo_jobinputoptions->get_location( ).
lv_jobinputformat = lo_jobinputoptions->get_format( ).
ENDIF.
lv_geoarn = lo_result->get_jobarn( ).
lv_jobid = lo_result->get_jobid( ).
lv_resourcename = lo_result->get_name( ).
lo_joboutputoptions = lo_result->get_outputoptions( ).
IF lo_joboutputoptions IS NOT INITIAL.
lv_joboutputformat = lo_joboutputoptions->get_format( ).
lv_joboutputlocation = lo_joboutputoptions->get_location( ).
ENDIF.
lv_jobstatus = lo_result->get_status( ).
lv_timestamp = lo_result->get_updatedat( ).
LOOP AT lo_result->get_tags( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.