Skip to content

/AWS1/IF_PTT=>LISTCONNECTIONS()

About ListConnections

Lists active connections for the partner account, with optional filtering by connection type and participant.

Method Signature

METHODS /AWS1/IF_PTT~LISTCONNECTIONS
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTTCATALOG OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/PTTNEXTTOKEN OPTIONAL
    !IV_CONNECTIONTYPE TYPE /AWS1/PTTCONNECTIONTYPEFILTER OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/PTTMAXRESULTS OPTIONAL
    !IT_OTHERPARTICIDENTIFIERS TYPE /AWS1/CL_PTTPARTICIDLIST_W=>TT_PARTICIPANTIDENTIFIERLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_pttlistconnsresponse
  RAISING
    /AWS1/CX_PTTACCESSDENIEDEX
    /AWS1/CX_PTTINTERNALSERVEREX
    /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 for the partner account.

Optional arguments:

iv_nexttoken TYPE /AWS1/PTTNEXTTOKEN /AWS1/PTTNEXTTOKEN

The token for retrieving the next page of results in paginated responses.

iv_connectiontype TYPE /AWS1/PTTCONNECTIONTYPEFILTER /AWS1/PTTCONNECTIONTYPEFILTER

Filter results by connection type (e.g., reseller, distributor, technology partner).

iv_maxresults TYPE /AWS1/PTTMAXRESULTS /AWS1/PTTMAXRESULTS

The maximum number of connections to return in a single response.

it_otherparticidentifiers TYPE /AWS1/CL_PTTPARTICIDLIST_W=>TT_PARTICIPANTIDENTIFIERLIST TT_PARTICIPANTIDENTIFIERLIST

Filter results by specific participant identifiers.

RETURNING

oo_output TYPE REF TO /aws1/cl_pttlistconnsresponse /AWS1/CL_PTTLISTCONNSRESPONSE

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->listconnections(
  it_otherparticidentifiers = VALUE /aws1/cl_pttparticidlist_w=>tt_participantidentifierlist(
    ( new /aws1/cl_pttparticidlist_w( |string| ) )
  )
  iv_catalog = |string|
  iv_connectiontype = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_connectionsummaries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_catalog = lo_row_1->get_catalog( ).
      lv_connectionid = lo_row_1->get_id( ).
      lv_connectionarn = lo_row_1->get_arn( ).
      lv_awsaccountid = lo_row_1->get_otherparticaccountid( ).
      lv_datetime = lo_row_1->get_updatedat( ).
      LOOP AT lo_row_1->get_connectiontypes( ) into ls_row_2.
        lv_key = ls_row_2-key.
        lo_value = ls_row_2-value.
        IF lo_value IS NOT INITIAL.
          lv_connectiontypestatus = lo_value->get_status( ).
          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.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.