Skip to content

/AWS1/IF_PTT=>CANCELCONNECTION()

About CancelConnection

Cancels an existing connection between partners, terminating the partnership relationship.

Method Signature

METHODS /AWS1/IF_PTT~CANCELCONNECTION
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTTCATALOG OPTIONAL
    !IV_IDENTIFIER TYPE /AWS1/PTTCONNECTIONID OPTIONAL
    !IV_CONNECTIONTYPE TYPE /AWS1/PTTCONNECTIONTYPE OPTIONAL
    !IV_REASON TYPE /AWS1/PTTSTRING OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/PTTCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pttcancelconnresponse
  RAISING
    /AWS1/CX_PTTACCESSDENIEDEX
    /AWS1/CX_PTTCONFLICTEXCEPTION
    /AWS1/CX_PTTINTERNALSERVEREX
    /AWS1/CX_PTTRESOURCENOTFOUNDEX
    /AWS1/CX_PTTTHROTTLINGEX
    /AWS1/CX_PTTVLDTNEXCEPTION
    /AWS1/CX_PTTCLIENTEXC
    /AWS1/CX_PTTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTTCATALOG /AWS1/PTTCATALOG

The catalog identifier where the connection exists.

iv_identifier TYPE /AWS1/PTTCONNECTIONID /AWS1/PTTCONNECTIONID

The unique identifier of the connection to cancel.

iv_connectiontype TYPE /AWS1/PTTCONNECTIONTYPE /AWS1/PTTCONNECTIONTYPE

The type of connection to cancel (e.g., reseller, distributor, technology partner).

iv_reason TYPE /AWS1/PTTSTRING /AWS1/PTTSTRING

The reason for canceling the connection, providing context for the termination.

iv_clienttoken TYPE /AWS1/PTTCLIENTTOKEN /AWS1/PTTCLIENTTOKEN

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

RETURNING

oo_output TYPE REF TO /aws1/cl_pttcancelconnresponse /AWS1/CL_PTTCANCELCONNRESPONSE

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->cancelconnection(
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_connectiontype = |string|
  iv_identifier = |string|
  iv_reason = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_catalog = lo_result->get_catalog( ).
  lv_connectionid = lo_result->get_id( ).
  lv_connectionarn = lo_result->get_arn( ).
  lv_awsaccountid = lo_result->get_otherparticaccountid( ).
  lv_datetime = lo_result->get_updatedat( ).
  LOOP AT lo_result->get_connectiontypes( ) into ls_row.
    lv_key = ls_row-key.
    lo_value = ls_row-value.
    IF lo_value IS NOT INITIAL.
      lv_datetime = lo_value->get_createdat( ).
      lv_email = lo_value->get_inviteremail( ).
      lv_sensitiveunicodestring = lo_value->get_invitername( ).
      lv_connectiontypestatus = lo_value->get_status( ).
      lv_datetime = lo_value->get_canceledat( ).
      lv_awsaccountid = lo_value->get_canceledby( ).
      lo_participant = lo_value->get_otherparticipant( ).
      IF lo_participant IS NOT INITIAL.
        lo_partnerprofilesummary = lo_participant->get_partnerprofile( ).
        IF lo_partnerprofilesummary IS NOT INITIAL.
          lv_partnerprofileid = lo_partnerprofilesummary->get_id( ).
          lv_unicodestring = lo_partnerprofilesummary->get_name( ).
        ENDIF.
        lo_sellerprofilesummary = lo_participant->get_sellerprofile( ).
        IF lo_sellerprofilesummary IS NOT INITIAL.
          lv_sellerprofileid = lo_sellerprofilesummary->get_id( ).
          lv_unicodestring = lo_sellerprofilesummary->get_name( ).
        ENDIF.
        lo_accountsummary = lo_participant->get_account( ).
        IF lo_accountsummary IS NOT INITIAL.
          lv_unicodestring = lo_accountsummary->get_name( ).
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDIF.