Skip to content

/AWS1/IF_SUP=>COMPLETEATTACHMENTUPLOAD()

About CompleteAttachmentUpload

Completes an attachment upload that was started with GetAttachmentUploadLinks. After you upload a part of the file to its presigned Amazon S3 URL, call CompleteAttachmentUpload with the partIndex and eTag of that part. You can include one part per call, or multiple parts in a single call. After CompleteAttachmentUpload has been called for every part of the file, the service processes the upload asynchronously. The attachment-ready status might not be reflected immediately. Use DescribeAttachmentUploadStatus to poll for the uploadStatus to become attachment-ready before passing the uploadId to CreateCase or AddCommunicationToCase.

Method Signature

METHODS /AWS1/IF_SUP~COMPLETEATTACHMENTUPLOAD
  IMPORTING
    !IV_UPLOADID TYPE /AWS1/SUPUPLOADID OPTIONAL
    !IT_COMPLETEDUPLOADS TYPE /AWS1/CL_SUPCOMPLETEDUPLOAD=>TT_COMPLETEDUPLOADLIST OPTIONAL
    !IV_DRYRUN TYPE /AWS1/SUPNULLABLEBOOLEANTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_supcomplatchmtupldrsp
  RAISING
    /AWS1/CX_SUPDRYRUNOPEXCEPTION
    /AWS1/CX_SUPINTERNALSERVERERR
    /AWS1/CX_SUPUPLOADIDNOTFOUND
    /AWS1/CX_SUPCLIENTEXC
    /AWS1/CX_SUPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_uploadid TYPE /AWS1/SUPUPLOADID /AWS1/SUPUPLOADID

The identifier associated with the upload to complete.

it_completeduploads TYPE /AWS1/CL_SUPCOMPLETEDUPLOAD=>TT_COMPLETEDUPLOADLIST TT_COMPLETEDUPLOADLIST

The list of parts being reported as completed in this call. Each entry must contain the partIndex of an uploaded part and the ETag returned by Amazon S3 when that part was uploaded.

Optional arguments:

iv_dryrun TYPE /AWS1/SUPNULLABLEBOOLEANTYPE /AWS1/SUPNULLABLEBOOLEANTYPE

Specifies whether to validate the request without actually completing the upload. When set to true, the request is validated but the upload isn't finalized, and the operation returns a DryRunOperationException. When omitted or set to false, the request runs normally.

RETURNING

oo_output TYPE REF TO /aws1/cl_supcomplatchmtupldrsp /AWS1/CL_SUPCOMPLATCHMTUPLDRSP

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->completeattachmentupload(
  it_completeduploads = VALUE /aws1/cl_supcompletedupload=>tt_completeduploadlist(
    (
      new /aws1/cl_supcompletedupload(
        iv_etag = |string|
        iv_partindex = 123
      )
    )
  )
  iv_dryrun = ABAP_TRUE
  iv_uploadid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_uploadstatus = lo_result->get_uploadstatus( ).
ENDIF.