Skip to content

/AWS1/IF_TBD=>BATCHUPDATEJOB()

About BatchUpdateJob

Updates multiple jobs in a single request. This is a batch version of the UpdateJob API.

The result of updating 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.

When you change the status of a job to ARCHIVED, the job can't be scheduled or archived.

An archived job and its steps and tasks are deleted after 120 days. The job can't be recovered.

Method Signature

METHODS /AWS1/IF_TBD~BATCHUPDATEJOB
  IMPORTING
    !IV_CLIENTTOKEN TYPE /AWS1/TBDCLIENTTOKEN OPTIONAL
    !IT_JOBS TYPE /AWS1/CL_TBDBATCHUPDATEJOBITEM=>TT_BATCHUPDATEJOBITEMS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tbdbatchupdatejobrsp
  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_jobs TYPE /AWS1/CL_TBDBATCHUPDATEJOBITEM=>TT_BATCHUPDATEJOBITEMS TT_BATCHUPDATEJOBITEMS

The list of jobs to update. You can specify up to 100 jobs per request.

Optional arguments:

iv_clienttoken TYPE /AWS1/TBDCLIENTTOKEN /AWS1/TBDCLIENTTOKEN

The unique token which the server uses to recognize retries of the same request.

RETURNING

oo_output TYPE REF TO /aws1/cl_tbdbatchupdatejobrsp /AWS1/CL_TBDBATCHUPDATEJOBRSP

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->batchupdatejob(
  it_jobs = VALUE /aws1/cl_tbdbatchupdatejobitem=>tt_batchupdatejobitems(
    (
      new /aws1/cl_tbdbatchupdatejobitem(
        iv_description = |string|
        iv_farmid = |string|
        iv_jobid = |string|
        iv_lifecyclestatus = |string|
        iv_maxfailedtaskscount = 123
        iv_maxretriespertask = 123
        iv_maxworkercount = 123
        iv_name = |string|
        iv_priority = 123
        iv_queueid = |string|
        iv_targettaskrunstatus = |string|
      )
    )
  )
  iv_clienttoken = |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_errors( ) 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_batchupdatejoberrorcode = lo_row_1->get_code( ).
      lv_string = lo_row_1->get_message( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Update multiple jobs in a single request

Update multiple jobs in a single request

DATA(lo_result) = lo_client->batchupdatejob(
  it_jobs = VALUE /aws1/cl_tbdbatchupdatejobitem=>tt_batchupdatejobitems(
    (
      new /aws1/cl_tbdbatchupdatejobitem(
        iv_farmid = |farm-1234567890abcdef1234567890abcdef|
        iv_jobid = |job-1234567890abcdef1234567890abcdef|
        iv_queueid = |queue-1234567890abcdef1234567890abcdef|
        iv_targettaskrunstatus = |FAILED|
      )
    )
    (
      new /aws1/cl_tbdbatchupdatejobitem(
        iv_farmid = |farm-1234567890abcdef1234567890abcdef|
        iv_jobid = |job-234567890abcdef1234567890abcdef1|
        iv_queueid = |queue-1234567890abcdef1234567890abcdef|
        iv_targettaskrunstatus = |FAILED|
      )
    )
  )
).