Skip to content

/AWS1/IF_PTT=>ACCEPTCONNECTIONINVITATION()

About AcceptConnectionInvitation

Accepts a connection invitation from another partner, establishing a formal partnership connection between the two parties.

Method Signature

METHODS /AWS1/IF_PTT~ACCEPTCONNECTIONINVITATION
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTTCATALOG OPTIONAL
    !IV_IDENTIFIER TYPE /AWS1/PTTCONNECTIONINVTNID OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/PTTCLIENTTOKEN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pttacceptconninvtnrsp
  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 invitation exists.

iv_identifier TYPE /AWS1/PTTCONNECTIONINVTNID /AWS1/PTTCONNECTIONINVTNID

The unique identifier of the connection invitation to accept.

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_pttacceptconninvtnrsp /AWS1/CL_PTTACCEPTCONNINVTNRSP

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

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_connection = lo_result->get_connection( ).
  IF lo_connection IS NOT INITIAL.
    lv_catalog = lo_connection->get_catalog( ).
    lv_connectionid = lo_connection->get_id( ).
    lv_connectionarn = lo_connection->get_arn( ).
    lv_awsaccountid = lo_connection->get_otherparticaccountid( ).
    lv_datetime = lo_connection->get_updatedat( ).
    LOOP AT lo_connection->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.
ENDIF.