Skip to content

/AWS1/IF_MPB=>CREATELINK()

Creates a new link between RTB applications.

Establishes a connection that allows RTB applications to communicate and exchange bid requests and responses.

Method Signature

METHODS /AWS1/IF_MPB~CREATELINK
  IMPORTING
    !IV_GATEWAYID TYPE /AWS1/MPBGATEWAYID OPTIONAL
    !IV_PEERGATEWAYID TYPE /AWS1/MPBGATEWAYID OPTIONAL
    !IO_ATTRIBUTES TYPE REF TO /AWS1/CL_MPBLINKATTRIBUTES OPTIONAL
    !IV_HTTPRESPONDERALLOWED TYPE /AWS1/MPBBOOLEAN OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_MPBTAGSMAP_W=>TT_TAGSMAP OPTIONAL
    !IO_LOGSETTINGS TYPE REF TO /AWS1/CL_MPBLINKLOGSETTINGS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mpbcreatelinkresponse
  RAISING
    /AWS1/CX_MPBACCESSDENIEDEX
    /AWS1/CX_MPBCONFLICTEXCEPTION
    /AWS1/CX_MPBINTERNALSERVEREX
    /AWS1/CX_MPBRESOURCENOTFOUNDEX
    /AWS1/CX_MPBSERVICEQUOTAEXCDEX
    /AWS1/CX_MPBTHROTTLINGEX
    /AWS1/CX_MPBVALIDATIONEX
    /AWS1/CX_MPBCLIENTEXC
    /AWS1/CX_MPBSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_gatewayid TYPE /AWS1/MPBGATEWAYID /AWS1/MPBGATEWAYID

The unique identifier of the gateway.

iv_peergatewayid TYPE /AWS1/MPBGATEWAYID /AWS1/MPBGATEWAYID

The unique identifier of the peer gateway.

io_logsettings TYPE REF TO /AWS1/CL_MPBLINKLOGSETTINGS /AWS1/CL_MPBLINKLOGSETTINGS

Settings for the application logs.

Optional arguments:

io_attributes TYPE REF TO /AWS1/CL_MPBLINKATTRIBUTES /AWS1/CL_MPBLINKATTRIBUTES

Attributes of the link.

iv_httpresponderallowed TYPE /AWS1/MPBBOOLEAN /AWS1/MPBBOOLEAN

Boolean to specify if an HTTP responder is allowed.

it_tags TYPE /AWS1/CL_MPBTAGSMAP_W=>TT_TAGSMAP TT_TAGSMAP

A map of the key-value pairs of the tag or tags to assign to the resource.

RETURNING

oo_output TYPE REF TO /aws1/cl_mpbcreatelinkresponse /AWS1/CL_MPBCREATELINKRESPONSE

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->createlink(
  io_attributes = new /aws1/cl_mpblinkattributes(
    it_respondererrormasking = VALUE /aws1/cl_mpbrsrerrmskforhttp00=>tt_respondererrormasking(
      (
        new /aws1/cl_mpbrsrerrmskforhttp00(
          it_loggingtypes = VALUE /aws1/cl_mpbrsrerrmsklogtype00=>tt_resperrormaskinglogtypes(
            ( new /aws1/cl_mpbrsrerrmsklogtype00( |string| ) )
          )
          iv_action = |string|
          iv_httpcode = |string|
          iv_responseloggingpercentage = '0.1'
        )
      )
    )
    iv_customerprovidedid = |string|
  )
  io_logsettings = new /aws1/cl_mpblinklogsettings(
    io_applicationlogs = new /aws1/cl_mpblinkapplogconf(
      io_sampling = new /aws1/cl_mpblinkapplogsampling(
        iv_errorlog = '0.1'
        iv_filterlog = '0.1'
      )
    )
  )
  it_tags = VALUE /aws1/cl_mpbtagsmap_w=>tt_tagsmap(
    (
      VALUE /aws1/cl_mpbtagsmap_w=>ts_tagsmap_maprow(
        key = |string|
        value = new /aws1/cl_mpbtagsmap_w( |string| )
      )
    )
  )
  iv_gatewayid = |string|
  iv_httpresponderallowed = ABAP_TRUE
  iv_peergatewayid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_gatewayid = lo_result->get_gatewayid( ).
  lv_gatewayid = lo_result->get_peergatewayid( ).
  lv_linkstatus = lo_result->get_status( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_updatedat( ).
  lv_linkdirection = lo_result->get_direction( ).
  LOOP AT lo_result->get_flowmodules( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_version = lo_row_1->get_version( ).
      lv_flowmodulename = lo_row_1->get_name( ).
      LOOP AT lo_row_1->get_dependson( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_flowmodulename = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
      lo_moduleparameters = lo_row_1->get_moduleparameters( ).
      IF lo_moduleparameters IS NOT INITIAL.
        lo_nobidmoduleparameters = lo_moduleparameters->get_nobid( ).
        IF lo_nobidmoduleparameters IS NOT INITIAL.
          lv_string = lo_nobidmoduleparameters->get_reason( ).
          lv_integer = lo_nobidmoduleparameters->get_reasoncode( ).
          lv_float = lo_nobidmoduleparameters->get_passthroughpercentage( ).
        ENDIF.
        lo_openrtbattributemodulep = lo_moduleparameters->get_openrtbattribute( ).
        IF lo_openrtbattributemodulep IS NOT INITIAL.
          lv_filtertype = lo_openrtbattributemodulep->get_filtertype( ).
          LOOP AT lo_openrtbattributemodulep->get_filterconfiguration( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              LOOP AT lo_row_5->get_criteria( ) into lo_row_6.
                lo_row_7 = lo_row_6.
                IF lo_row_7 IS NOT INITIAL.
                  lv_string = lo_row_7->get_path( ).
                  LOOP AT lo_row_7->get_values( ) into lo_row_8.
                    lo_row_9 = lo_row_8.
                    IF lo_row_9 IS NOT INITIAL.
                      lv_string = lo_row_9->get_value( ).
                    ENDIF.
                  ENDLOOP.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDLOOP.
          lo_action = lo_openrtbattributemodulep->get_action( ).
          IF lo_action IS NOT INITIAL.
            lo_nobidaction = lo_action->get_nobid( ).
            IF lo_nobidaction IS NOT INITIAL.
              lv_integer = lo_nobidaction->get_nobidreasoncode( ).
            ENDIF.
            lo_headertagaction = lo_action->get_headertag( ).
            IF lo_headertagaction IS NOT INITIAL.
              lv_string = lo_headertagaction->get_name( ).
              lv_string = lo_headertagaction->get_value( ).
            ENDIF.
          ENDIF.
          lv_float = lo_openrtbattributemodulep->get_holdbackpercentage( ).
        ENDIF.
        lo_ratelimitermoduleparame = lo_moduleparameters->get_ratelimiter( ).
        IF lo_ratelimitermoduleparame IS NOT INITIAL.
          lv_float = lo_ratelimitermoduleparame->get_tps( ).
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_pendingflowmodules( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_version = lo_row_1->get_version( ).
      lv_flowmodulename = lo_row_1->get_name( ).
      LOOP AT lo_row_1->get_dependson( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_flowmodulename = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
      lo_moduleparameters = lo_row_1->get_moduleparameters( ).
      IF lo_moduleparameters IS NOT INITIAL.
        lo_nobidmoduleparameters = lo_moduleparameters->get_nobid( ).
        IF lo_nobidmoduleparameters IS NOT INITIAL.
          lv_string = lo_nobidmoduleparameters->get_reason( ).
          lv_integer = lo_nobidmoduleparameters->get_reasoncode( ).
          lv_float = lo_nobidmoduleparameters->get_passthroughpercentage( ).
        ENDIF.
        lo_openrtbattributemodulep = lo_moduleparameters->get_openrtbattribute( ).
        IF lo_openrtbattributemodulep IS NOT INITIAL.
          lv_filtertype = lo_openrtbattributemodulep->get_filtertype( ).
          LOOP AT lo_openrtbattributemodulep->get_filterconfiguration( ) into lo_row_4.
            lo_row_5 = lo_row_4.
            IF lo_row_5 IS NOT INITIAL.
              LOOP AT lo_row_5->get_criteria( ) into lo_row_6.
                lo_row_7 = lo_row_6.
                IF lo_row_7 IS NOT INITIAL.
                  lv_string = lo_row_7->get_path( ).
                  LOOP AT lo_row_7->get_values( ) into lo_row_8.
                    lo_row_9 = lo_row_8.
                    IF lo_row_9 IS NOT INITIAL.
                      lv_string = lo_row_9->get_value( ).
                    ENDIF.
                  ENDLOOP.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDLOOP.
          lo_action = lo_openrtbattributemodulep->get_action( ).
          IF lo_action IS NOT INITIAL.
            lo_nobidaction = lo_action->get_nobid( ).
            IF lo_nobidaction IS NOT INITIAL.
              lv_integer = lo_nobidaction->get_nobidreasoncode( ).
            ENDIF.
            lo_headertagaction = lo_action->get_headertag( ).
            IF lo_headertagaction IS NOT INITIAL.
              lv_string = lo_headertagaction->get_name( ).
              lv_string = lo_headertagaction->get_value( ).
            ENDIF.
          ENDIF.
          lv_float = lo_openrtbattributemodulep->get_holdbackpercentage( ).
        ENDIF.
        lo_ratelimitermoduleparame = lo_moduleparameters->get_ratelimiter( ).
        IF lo_ratelimitermoduleparame IS NOT INITIAL.
          lv_float = lo_ratelimitermoduleparame->get_tps( ).
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
  lo_linkattributes = lo_result->get_attributes( ).
  IF lo_linkattributes IS NOT INITIAL.
    LOOP AT lo_linkattributes->get_respondererrormasking( ) into lo_row_10.
      lo_row_11 = lo_row_10.
      IF lo_row_11 IS NOT INITIAL.
        lv_string = lo_row_11->get_httpcode( ).
        lv_respondererrormaskingac = lo_row_11->get_action( ).
        LOOP AT lo_row_11->get_loggingtypes( ) into lo_row_12.
          lo_row_13 = lo_row_12.
          IF lo_row_13 IS NOT INITIAL.
            lv_respondererrormaskinglo = lo_row_13->get_value( ).
          ENDIF.
        ENDLOOP.
        lv_float = lo_row_11->get_rsploggingpercentage( ).
      ENDIF.
    ENDLOOP.
    lv_customerprovidedid = lo_linkattributes->get_customerprovidedid( ).
  ENDIF.
  lv_linkid = lo_result->get_linkid( ).
  lv_string = lo_result->get_customerprovidedid( ).
ENDIF.

Creates a new link between RTB applications

DATA(lo_result) = lo_client->createlink(
  io_logsettings = new /aws1/cl_mpblinklogsettings(
    io_applicationlogs = new /aws1/cl_mpblinkapplogconf(
      io_sampling = new /aws1/cl_mpblinkapplogsampling(
        iv_errorlog = '100.0'
        iv_filterlog = '0.0'
      )
    )
  )
  iv_gatewayid = |rtb-gw-12345678|
  iv_peergatewayid = |rtb-gw-87654321|
).