Skip to content

/AWS1/CL_SAR=>CREATEAPPLICATION()

About CreateApplication

Creates an application, optionally including an AWS SAM file to create the first application version in the same call.

Method Signature

IMPORTING

Required arguments:

iv_author TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

The name of the author publishing the app.

Minimum length=1. Maximum length=127.

Pattern "^a-z0-9?$";

iv_description TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

The description of the application.

Minimum length=1. Maximum length=256

iv_name TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

The name of the application that you want to publish.

Minimum length=1. Maximum length=140

Pattern: "[a-zA-Z0-9\-]+";

Optional arguments:

iv_homepageurl TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A URL with more information about the application, for example the location of your GitHub repository for the application.

it_labels TYPE /AWS1/CL_SAR__LISTOF__STRING_W=>TT___LISTOF__STRING TT___LISTOF__STRING

Labels to improve discovery of apps in search results.

Minimum length=1. Maximum length=127. Maximum number of labels: 10

Pattern: "^[a-zA-Z0-9+\-_:\/@]+$";

iv_licensebody TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A local text file that contains the license of the app that matches the spdxLicenseID value of your application. The file has the format file://<path>/<filename>.

Maximum size 5 MB

You can specify only one of licenseBody and licenseUrl; otherwise, an error results.

iv_licenseurl TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A link to the S3 object that contains the license of the app that matches the spdxLicenseID value of your application.

Maximum size 5 MB

You can specify only one of licenseBody and licenseUrl; otherwise, an error results.

iv_readmebody TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A local text readme file in Markdown language that contains a more detailed description of the application and how it works. The file has the format file://<path>/<filename>.

Maximum size 5 MB

You can specify only one of readmeBody and readmeUrl; otherwise, an error results.

iv_readmeurl TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A link to the S3 object in Markdown language that contains a more detailed description of the application and how it works.

Maximum size 5 MB

You can specify only one of readmeBody and readmeUrl; otherwise, an error results.

iv_semanticversion TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

The semantic version of the application:

https://semver.org/

iv_sourcecodearchiveurl TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A link to the S3 object that contains the ZIP archive of the source code for this version of your application.

Maximum size 50 MB

iv_sourcecodeurl TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A link to a public repository for the source code of your application, for example the URL of a specific GitHub commit.

iv_spdxlicenseid TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A valid identifier from https://spdx.org/licenses/.

iv_templatebody TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

The local raw packaged AWS SAM template file of your application. The file has the format file://<path>/<filename>.

You can specify only one of templateBody and templateUrl; otherwise an error results.

iv_templateurl TYPE /AWS1/SAR__STRING /AWS1/SAR__STRING

A link to the S3 object containing the packaged AWS SAM template of your application.

You can specify only one of templateBody and templateUrl; otherwise an error results.

RETURNING

oo_output TYPE REF TO /aws1/cl_sarcreapplicationrsp /AWS1/CL_SARCREAPPLICATIONRSP

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->/aws1/if_sar~createapplication(
  it_labels = VALUE /aws1/cl_sar__listof__string_w=>tt___listof__string(
    ( new /aws1/cl_sar__listof__string_w( |string| ) )
  )
  iv_author = |string|
  iv_description = |string|
  iv_homepageurl = |string|
  iv_licensebody = |string|
  iv_licenseurl = |string|
  iv_name = |string|
  iv_readmebody = |string|
  iv_readmeurl = |string|
  iv_semanticversion = |string|
  iv_sourcecodearchiveurl = |string|
  iv_sourcecodeurl = |string|
  iv_spdxlicenseid = |string|
  iv_templatebody = |string|
  iv_templateurl = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv___string = lo_result->get_applicationid( ).
  lv___string = lo_result->get_author( ).
  lv___string = lo_result->get_creationtime( ).
  lv___string = lo_result->get_description( ).
  lv___string = lo_result->get_homepageurl( ).
  lv___boolean = lo_result->get_isverifiedauthor( ).
  LOOP AT lo_result->get_labels( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv___string = lo_row_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lv___string = lo_result->get_licenseurl( ).
  lv___string = lo_result->get_name( ).
  lv___string = lo_result->get_readmeurl( ).
  lv___string = lo_result->get_spdxlicenseid( ).
  lv___string = lo_result->get_verifiedauthorurl( ).
  lo_version = lo_result->get_version( ).
  IF lo_version IS NOT INITIAL.
    lv___string = lo_version->get_applicationid( ).
    lv___string = lo_version->get_creationtime( ).
    LOOP AT lo_version->get_parameterdefinitions( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv___string = lo_row_3->get_allowedpattern( ).
        LOOP AT lo_row_3->get_allowedvalues( ) into lo_row.
          lo_row_1 = lo_row.
          IF lo_row_1 IS NOT INITIAL.
            lv___string = lo_row_1->get_value( ).
          ENDIF.
        ENDLOOP.
        lv___string = lo_row_3->get_constraintdescription( ).
        lv___string = lo_row_3->get_defaultvalue( ).
        lv___string = lo_row_3->get_description( ).
        lv___integer = lo_row_3->get_maxlength( ).
        lv___integer = lo_row_3->get_maxvalue( ).
        lv___integer = lo_row_3->get_minlength( ).
        lv___integer = lo_row_3->get_minvalue( ).
        lv___string = lo_row_3->get_name( ).
        lv___boolean = lo_row_3->get_noecho( ).
        LOOP AT lo_row_3->get_referencedbyresources( ) into lo_row.
          lo_row_1 = lo_row.
          IF lo_row_1 IS NOT INITIAL.
            lv___string = lo_row_1->get_value( ).
          ENDIF.
        ENDLOOP.
        lv___string = lo_row_3->get_type( ).
      ENDIF.
    ENDLOOP.
    LOOP AT lo_version->get_requiredcapabilities( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_capability = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    lv___boolean = lo_version->get_resourcessupported( ).
    lv___string = lo_version->get_semanticversion( ).
    lv___string = lo_version->get_sourcecodearchiveurl( ).
    lv___string = lo_version->get_sourcecodeurl( ).
    lv___string = lo_version->get_templateurl( ).
  ENDIF.
ENDIF.