Skip to content

/AWS1/IF_SSS=>REGISTERAPPLICATION()

About RegisterApplication

Register an SAP application with AWS Systems Manager for SAP. You must meet the following requirements before registering.

The SAP application you want to register with AWS Systems Manager for SAP is running on Amazon EC2.

AWS Systems Manager Agent must be setup on an Amazon EC2 instance along with the required IAM permissions.

Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets Manager to manage SAP applications and components.

Method Signature

METHODS /AWS1/IF_SSS~REGISTERAPPLICATION
  IMPORTING
    !IV_APPLICATIONID TYPE /AWS1/SSSAPPLICATIONID OPTIONAL
    !IV_APPLICATIONTYPE TYPE /AWS1/SSSAPPLICATIONTYPE OPTIONAL
    !IT_INSTANCES TYPE /AWS1/CL_SSSINSTANCELIST_W=>TT_INSTANCELIST OPTIONAL
    !IV_SAPINSTANCENUMBER TYPE /AWS1/SSSSAPINSTANCENUMBER OPTIONAL
    !IV_SID TYPE /AWS1/SSSSID OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_SSSTAGMAP_W=>TT_TAGMAP OPTIONAL
    !IT_CREDENTIALS TYPE /AWS1/CL_SSSAPPLICATIONCRED=>TT_APPLICATIONCREDENTIALLIST OPTIONAL
    !IV_DATABASEARN TYPE /AWS1/SSSSSMSAPARN OPTIONAL
    !IT_COMPONENTSINFO TYPE /AWS1/CL_SSSCOMPONENTINFO=>TT_COMPONENTINFOLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sssregapplicationout
  RAISING
    /AWS1/CX_SSSCONFLICTEXCEPTION
    /AWS1/CX_SSSINTERNALSERVEREX
    /AWS1/CX_SSSRESOURCENOTFOUNDEX
    /AWS1/CX_SSSVALIDATIONEX
    /AWS1/CX_SSSCLIENTEXC
    /AWS1/CX_SSSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_applicationid TYPE /AWS1/SSSAPPLICATIONID /AWS1/SSSAPPLICATIONID

The ID of the application.

iv_applicationtype TYPE /AWS1/SSSAPPLICATIONTYPE /AWS1/SSSAPPLICATIONTYPE

The type of the application.

it_instances TYPE /AWS1/CL_SSSINSTANCELIST_W=>TT_INSTANCELIST TT_INSTANCELIST

The Amazon EC2 instances on which your SAP application is running.

Optional arguments:

iv_sapinstancenumber TYPE /AWS1/SSSSAPINSTANCENUMBER /AWS1/SSSSAPINSTANCENUMBER

The SAP instance number of the application.

iv_sid TYPE /AWS1/SSSSID /AWS1/SSSSID

The System ID of the application.

it_tags TYPE /AWS1/CL_SSSTAGMAP_W=>TT_TAGMAP TT_TAGMAP

The tags to be attached to the SAP application.

it_credentials TYPE /AWS1/CL_SSSAPPLICATIONCRED=>TT_APPLICATIONCREDENTIALLIST TT_APPLICATIONCREDENTIALLIST

The credentials of the SAP application.

iv_databasearn TYPE /AWS1/SSSSSMSAPARN /AWS1/SSSSSMSAPARN

The Amazon Resource Name of the SAP HANA database.

it_componentsinfo TYPE /AWS1/CL_SSSCOMPONENTINFO=>TT_COMPONENTINFOLIST TT_COMPONENTINFOLIST

This is an optional parameter for component details to which the SAP ABAP application is attached, such as Web Dispatcher.

This is an array of ApplicationComponent objects. You may input 0 to 5 items.

RETURNING

oo_output TYPE REF TO /aws1/cl_sssregapplicationout /AWS1/CL_SSSREGAPPLICATIONOUT

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->registerapplication(
  it_componentsinfo = VALUE /aws1/cl_ssscomponentinfo=>tt_componentinfolist(
    (
      new /aws1/cl_ssscomponentinfo(
        iv_componenttype = |string|
        iv_ec2instanceid = |string|
        iv_sid = |string|
      )
    )
  )
  it_credentials = VALUE /aws1/cl_sssapplicationcred=>tt_applicationcredentiallist(
    (
      new /aws1/cl_sssapplicationcred(
        iv_credentialtype = |string|
        iv_databasename = |string|
        iv_secretid = |string|
      )
    )
  )
  it_instances = VALUE /aws1/cl_sssinstancelist_w=>tt_instancelist(
    ( new /aws1/cl_sssinstancelist_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_ssstagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_ssstagmap_w=>ts_tagmap_maprow(
        key = |string|
        value = new /aws1/cl_ssstagmap_w( |string| )
      )
    )
  )
  iv_applicationid = |string|
  iv_applicationtype = |string|
  iv_databasearn = |string|
  iv_sapinstancenumber = |string|
  iv_sid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_application = lo_result->get_application( ).
  IF lo_application IS NOT INITIAL.
    lv_applicationid = lo_application->get_id( ).
    lv_applicationtype = lo_application->get_type( ).
    lv_ssmsaparn = lo_application->get_arn( ).
    lv_appregistryarn = lo_application->get_appregistryarn( ).
    lv_applicationstatus = lo_application->get_status( ).
    lv_applicationdiscoverysta = lo_application->get_discoverystatus( ).
    LOOP AT lo_application->get_components( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_componentid = lo_row_1->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_timestamp = lo_application->get_lastupdated( ).
    lv_string = lo_application->get_statusmessage( ).
    LOOP AT lo_application->get_assocdapplicationarns( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_ssmsaparn = lo_row_3->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
  lv_operationid = lo_result->get_operationid( ).
ENDIF.