Skip to content

/AWS1/IF_APS=>GETEXPORTIMAGETASK()

About GetExportImageTask

Retrieves information about an export image task, including its current state, progress, and any error details.

Method Signature

METHODS /AWS1/IF_APS~GETEXPORTIMAGETASK
  IMPORTING
    !IV_TASKID TYPE /AWS1/APSUUID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_apsgetexpimagetskrslt
  RAISING
    /AWS1/CX_APSOPNOTPERMITTEDEX
    /AWS1/CX_APSRESOURCENOTFOUNDEX
    /AWS1/CX_APSCLIENTEXC
    /AWS1/CX_APSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_taskid TYPE /AWS1/APSUUID /AWS1/APSUUID

The unique identifier of the export image task to retrieve information about.

RETURNING

oo_output TYPE REF TO /aws1/cl_apsgetexpimagetskrslt /AWS1/CL_APSGETEXPIMAGETSKRSLT

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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->getexportimagetask( |string| ).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_exportimagetask = lo_result->get_exportimagetask( ).
  IF lo_exportimagetask IS NOT INITIAL.
    lv_uuid = lo_exportimagetask->get_taskid( ).
    lv_arn = lo_exportimagetask->get_imagearn( ).
    lv_aminame = lo_exportimagetask->get_aminame( ).
    lv_timestamp = lo_exportimagetask->get_createddate( ).
    lv_description = lo_exportimagetask->get_amidescription( ).
    lv_exportimagetaskstate = lo_exportimagetask->get_state( ).
    lv_photonamiid = lo_exportimagetask->get_amiid( ).
    LOOP AT lo_exportimagetask->get_tagspecifications( ) into ls_row.
      lv_key = ls_row-key.
      lo_value = ls_row-value.
      IF lo_value IS NOT INITIAL.
        lv_tagvalue = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_exportimagetask->get_errordetails( ) into lo_row_1.
      lo_row_2 = lo_row_1.
      IF lo_row_2 IS NOT INITIAL.
        lv_string = lo_row_2->get_errorcode( ).
        lv_string = lo_row_2->get_errormessage( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.