Skip to content

/AWS1/IF_PPU=>GETJOB()

About GetJob

Retrieves the current state of an asynchronous job, including its status and any resources that it created or updated.

Method Signature

METHODS /AWS1/IF_PPU~GETJOB
  IMPORTING
    !IV_JOBID TYPE /AWS1/PPUJOBID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ppujob
  RAISING
    /AWS1/CX_PPUACCESSDENIEDEX
    /AWS1/CX_PPUINTERNALSERVEREX
    /AWS1/CX_PPURESOURCENOTFOUNDEX
    /AWS1/CX_PPUTHROTTLINGEX
    /AWS1/CX_PPUVLDTNEXCEPTION
    /AWS1/CX_PPUCLIENTEXC
    /AWS1/CX_PPUSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_jobid TYPE /AWS1/PPUJOBID /AWS1/PPUJOBID

The unique identifier of the asynchronous job. Use the GetJob operation to check the status of the job and to retrieve its results.

RETURNING

oo_output TYPE REF TO /aws1/cl_ppujob /AWS1/CL_PPUJOB

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_jobid = lo_result->get_jobid( ).
  lv_jobstatus = lo_result->get_status( ).
  lv_joboperationtype = lo_result->get_operationtype( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
  lv_brandprofileidorarn = lo_result->get_brandprofileid( ).
  lv_joberrorcode = lo_result->get_errorcode( ).
  lv_joberrormessage = lo_result->get_errormessage( ).
  LOOP AT lo_result->get_resources( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_jobresourcetype = lo_row_1->get_resourcetype( ).
      lv_jobresourceid = lo_row_1->get_resourceid( ).
      lv_amazonresourcename = lo_row_1->get_resourcearn( ).
    ENDIF.
  ENDLOOP.
ENDIF.

Get an async job

Get an async job

DATA(lo_result) = lo_client->getjob( |job-abc12345678901234| ).