/AWS1/IF_TBD=>BATCHGETJOB()¶
About BatchGetJob¶
Retrieves multiple jobs in a single request. This is a batch version of the GetJob API.
The result of getting each job is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.
Method Signature¶
METHODS /AWS1/IF_TBD~BATCHGETJOB
IMPORTING
!IT_IDENTIFIERS TYPE /AWS1/CL_TBDBATCHGETJOBID=>TT_BATCHGETJOBIDENTIFIERS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tbdbatchgetjobrsp
RAISING
/AWS1/CX_TBDACCESSDENIEDEX
/AWS1/CX_TBDINTERNALSERVERER00
/AWS1/CX_TBDTHROTTLINGEX
/AWS1/CX_TBDVALIDATIONEX
/AWS1/CX_TBDCLIENTEXC
/AWS1/CX_TBDSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_identifiers TYPE /AWS1/CL_TBDBATCHGETJOBID=>TT_BATCHGETJOBIDENTIFIERS TT_BATCHGETJOBIDENTIFIERS¶
The list of job identifiers to retrieve. You can specify up to 100 identifiers per request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tbdbatchgetjobrsp /AWS1/CL_TBDBATCHGETJOBRSP¶
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->batchgetjob(
it_identifiers = VALUE /aws1/cl_tbdbatchgetjobid=>tt_batchgetjobidentifiers(
(
new /aws1/cl_tbdbatchgetjobid(
iv_farmid = |string|
iv_jobid = |string|
iv_queueid = |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_jobs( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_farmid = lo_row_1->get_farmid( ).
lv_queueid = lo_row_1->get_queueid( ).
lv_jobid = lo_row_1->get_jobid( ).
lv_jobname = lo_row_1->get_name( ).
lv_joblifecyclestatus = lo_row_1->get_lifecyclestatus( ).
lv_string = lo_row_1->get_lifecyclestatusmessage( ).
lv_jobpriority = lo_row_1->get_priority( ).
lv_createdat = lo_row_1->get_createdat( ).
lv_createdby = lo_row_1->get_createdby( ).
lv_updatedat = lo_row_1->get_updatedat( ).
lv_updatedby = lo_row_1->get_updatedby( ).
lv_startedat = lo_row_1->get_startedat( ).
lv_endedat = lo_row_1->get_endedat( ).
lv_taskrunstatus = lo_row_1->get_taskrunstatus( ).
lv_jobtargettaskrunstatus = lo_row_1->get_targettaskrunstatus( ).
LOOP AT lo_row_1->get_taskrunstatuscounts( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_integer = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_taskfailureretrycount = lo_row_1->get_taskfailureretrycount( ).
lv_storageprofileid = lo_row_1->get_storageprofileid( ).
lv_maxfailedtaskscount = lo_row_1->get_maxfailedtaskscount( ).
lv_maxretriespertask = lo_row_1->get_maxretriespertask( ).
LOOP AT lo_row_1->get_parameters( ) into ls_row_3.
lv_key_1 = ls_row_3-key.
lo_value_1 = ls_row_3-value.
IF lo_value_1 IS NOT INITIAL.
lv_intstring = lo_value_1->get_int( ).
lv_floatstring = lo_value_1->get_float( ).
lv_parameterstring = lo_value_1->get_string( ).
lv_pathstring = lo_value_1->get_path( ).
ENDIF.
ENDLOOP.
lo_attachments = lo_row_1->get_attachments( ).
IF lo_attachments IS NOT INITIAL.
LOOP AT lo_attachments->get_manifests( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_filesystemlocationname = lo_row_5->get_filesystemlocationname( ).
lv_string = lo_row_5->get_rootpath( ).
lv_pathformat = lo_row_5->get_rootpathformat( ).
LOOP AT lo_row_5->get_outrelativedirectories( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_string = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
lv_string = lo_row_5->get_inputmanifestpath( ).
lv_string = lo_row_5->get_inputmanifesthash( ).
ENDIF.
ENDLOOP.
lv_jobattachmentsfilesyste = lo_attachments->get_filesystem( ).
ENDIF.
lv_jobdescription = lo_row_1->get_description( ).
lv_maxworkercount = lo_row_1->get_maxworkercount( ).
lv_jobid = lo_row_1->get_sourcejobid( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_errors( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_farmid = lo_row_9->get_farmid( ).
lv_queueid = lo_row_9->get_queueid( ).
lv_jobid = lo_row_9->get_jobid( ).
lv_batchgetjoberrorcode = lo_row_9->get_code( ).
lv_string = lo_row_9->get_message( ).
ENDIF.
ENDLOOP.
ENDIF.
Get multiple jobs in a single request¶
Get multiple jobs in a single request
DATA(lo_result) = lo_client->batchgetjob(
it_identifiers = VALUE /aws1/cl_tbdbatchgetjobid=>tt_batchgetjobidentifiers(
(
new /aws1/cl_tbdbatchgetjobid(
iv_farmid = |farm-1234567890abcdef1234567890abcdef|
iv_jobid = |job-1234567890abcdef1234567890abcdef|
iv_queueid = |queue-1234567890abcdef1234567890abcdef|
)
)
(
new /aws1/cl_tbdbatchgetjobid(
iv_farmid = |farm-1234567890abcdef1234567890abcdef|
iv_jobid = |job-234567890abcdef1234567890abcdef1|
iv_queueid = |queue-1234567890abcdef1234567890abcdef|
)
)
)
).