Skip to content

/AWS1/IF_PTC=>CREATERELATIONSHIP()

About CreateRelationship

Creates a new partner relationship between accounts.

Method Signature

METHODS /AWS1/IF_PTC~CREATERELATIONSHIP
  IMPORTING
    !IV_CATALOG TYPE /AWS1/PTCCATALOG OPTIONAL
    !IV_ASSOCIATIONTYPE TYPE /AWS1/PTCASSOCIATIONTYPE OPTIONAL
    !IV_PROGRAMMNGMTACCOUNTID00 TYPE /AWS1/PTCPROGRAMMNGMTACCOUNTID OPTIONAL
    !IV_ASSOCIATEDACCOUNTID TYPE /AWS1/PTCACCOUNTID OPTIONAL
    !IV_DISPLAYNAME TYPE /AWS1/PTCRELATIONSHIPDSPNAME OPTIONAL
    !IV_RESALEACCOUNTMODEL TYPE /AWS1/PTCRESALEACCOUNTMODEL OPTIONAL
    !IV_SECTOR TYPE /AWS1/PTCSECTOR OPTIONAL
    !IV_CLIENTTOKEN TYPE /AWS1/PTCCLIENTTOKEN OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_PTCTAG=>TT_TAGLIST OPTIONAL
    !IO_REQUESTEDSUPPORTPLAN TYPE REF TO /AWS1/CL_PTCSUPPORTPLAN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ptccrerelationshiprsp
  RAISING
    /AWS1/CX_PTCACCESSDENIEDEX
    /AWS1/CX_PTCINTERNALSERVEREX
    /AWS1/CX_PTCRESOURCENOTFOUNDEX
    /AWS1/CX_PTCTHROTTLINGEX
    /AWS1/CX_PTCVLDTNEXCEPTION
    /AWS1/CX_PTCCONFLICTEXCEPTION
    /AWS1/CX_PTCSERVICEQUOTAEXCDEX
    /AWS1/CX_PTCCLIENTEXC
    /AWS1/CX_PTCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_catalog TYPE /AWS1/PTCCATALOG /AWS1/PTCCATALOG

The catalog identifier for the relationship.

iv_associationtype TYPE /AWS1/PTCASSOCIATIONTYPE /AWS1/PTCASSOCIATIONTYPE

The type of association for the relationship (e.g., reseller, distributor).

iv_programmngmtaccountid00 TYPE /AWS1/PTCPROGRAMMNGMTACCOUNTID /AWS1/PTCPROGRAMMNGMTACCOUNTID

The identifier of the program management account for this relationship.

iv_associatedaccountid TYPE /AWS1/PTCACCOUNTID /AWS1/PTCACCOUNTID

The AWS account ID to associate in this relationship.

iv_displayname TYPE /AWS1/PTCRELATIONSHIPDSPNAME /AWS1/PTCRELATIONSHIPDSPNAME

A human-readable name for the relationship.

iv_sector TYPE /AWS1/PTCSECTOR /AWS1/PTCSECTOR

The business sector for the relationship.

Optional arguments:

iv_resaleaccountmodel TYPE /AWS1/PTCRESALEACCOUNTMODEL /AWS1/PTCRESALEACCOUNTMODEL

The resale account model for the relationship.

iv_clienttoken TYPE /AWS1/PTCCLIENTTOKEN /AWS1/PTCCLIENTTOKEN

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

it_tags TYPE /AWS1/CL_PTCTAG=>TT_TAGLIST TT_TAGLIST

Key-value pairs to associate with the relationship.

io_requestedsupportplan TYPE REF TO /AWS1/CL_PTCSUPPORTPLAN /AWS1/CL_PTCSUPPORTPLAN

The support plan requested for this relationship.

RETURNING

oo_output TYPE REF TO /aws1/cl_ptccrerelationshiprsp /AWS1/CL_PTCCRERELATIONSHIPRSP

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->createrelationship(
  io_requestedsupportplan = new /aws1/cl_ptcsupportplan(
    io_partnerledsupport = new /aws1/cl_ptcpartnerledsupport(
      iv_coverage = |string|
      iv_provider = |string|
      iv_tamlocation = |string|
    )
    io_resoldbusiness = new /aws1/cl_ptcresoldbusiness( |string| )
    io_resoldenterprise = new /aws1/cl_ptcresoldenterprise(
      iv_chargeaccountid = |string|
      iv_coverage = |string|
      iv_tamlocation = |string|
    )
  )
  it_tags = VALUE /aws1/cl_ptctag=>tt_taglist(
    (
      new /aws1/cl_ptctag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_associatedaccountid = |string|
  iv_associationtype = |string|
  iv_catalog = |string|
  iv_clienttoken = |string|
  iv_displayname = |string|
  iv_programmngmtaccountid00 = |string|
  iv_resaleaccountmodel = |string|
  iv_sector = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_createrelationshipdetai = lo_result->get_relationshipdetail( ).
  IF lo_createrelationshipdetai IS NOT INITIAL.
    lv_arn = lo_createrelationshipdetai->get_arn( ).
    lv_relationshipid = lo_createrelationshipdetai->get_id( ).
  ENDIF.
ENDIF.

Example for CreateRelationship

Example for CreateRelationship

DATA(lo_result) = lo_client->createrelationship(
  iv_associatedaccountid = |987654321012|
  iv_associationtype = |DOWNSTREAM_SELLER|
  iv_catalog = |AWS|
  iv_clienttoken = |clientToken|
  iv_displayname = |TestDisplayName|
  iv_programmngmtaccountid00 = |pma-u8ic702rtzng8|
  iv_resaleaccountmodel = |END_CUSTOMER|
  iv_sector = |COMMERCIAL|
).