Skip to content

/AWS1/IF_TBD=>BATCHUPDATETASK()

About BatchUpdateTask

Updates multiple tasks in a single request. This is a batch version of the UpdateTask API.

The result of updating each task 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~BATCHUPDATETASK
  IMPORTING
    !IV_CLIENTTOKEN TYPE /AWS1/TBDCLIENTTOKEN OPTIONAL
    !IT_TASKS TYPE /AWS1/CL_TBDBATCHUPDTASKITEM=>TT_BATCHUPDATETASKITEMS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tbdbatchupdatetaskrsp
  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_tasks TYPE /AWS1/CL_TBDBATCHUPDTASKITEM=>TT_BATCHUPDATETASKITEMS TT_BATCHUPDATETASKITEMS

The list of tasks to update. You can specify up to 100 tasks 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_tbdbatchupdatetaskrsp /AWS1/CL_TBDBATCHUPDATETASKRSP

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->batchupdatetask(
  it_tasks = VALUE /aws1/cl_tbdbatchupdtaskitem=>tt_batchupdatetaskitems(
    (
      new /aws1/cl_tbdbatchupdtaskitem(
        iv_farmid = |string|
        iv_jobid = |string|
        iv_queueid = |string|
        iv_stepid = |string|
        iv_targetrunstatus = |string|
        iv_taskid = |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_stepid = lo_row_1->get_stepid( ).
      lv_taskid = lo_row_1->get_taskid( ).
      lv_batchupdatetaskerrorcod = lo_row_1->get_code( ).
      lv_string = lo_row_1->get_message( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Update multiple tasks in a single request

Update multiple tasks in a single request

DATA(lo_result) = lo_client->batchupdatetask(
  it_tasks = VALUE /aws1/cl_tbdbatchupdtaskitem=>tt_batchupdatetaskitems(
    (
      new /aws1/cl_tbdbatchupdtaskitem(
        iv_farmid = |farm-1234567890abcdef1234567890abcdef|
        iv_jobid = |job-1234567890abcdef1234567890abcdef|
        iv_queueid = |queue-1234567890abcdef1234567890abcdef|
        iv_stepid = |step-1234567890abcdef1234567890abcdef|
        iv_targetrunstatus = |FAILED|
        iv_taskid = |task-1234567890abcdef1234567890abcdef-0|
      )
    )
    (
      new /aws1/cl_tbdbatchupdtaskitem(
        iv_farmid = |farm-1234567890abcdef1234567890abcdef|
        iv_jobid = |job-1234567890abcdef1234567890abcdef|
        iv_queueid = |queue-1234567890abcdef1234567890abcdef|
        iv_stepid = |step-1234567890abcdef1234567890abcdef|
        iv_targetrunstatus = |FAILED|
        iv_taskid = |task-1234567890abcdef1234567890abcdef-1|
      )
    )
  )
).