Skip to content

/AWS1/CL_QST=>CREATETOPIC()

About CreateTopic

Creates a new Q topic.

Method Signature

IMPORTING

Required arguments:

iv_awsaccountid TYPE /AWS1/QSTAWSACCOUNTID /AWS1/QSTAWSACCOUNTID

The ID of the Amazon Web Services account that you want to create a topic in.

iv_topicid TYPE /AWS1/QSTTOPICID /AWS1/QSTTOPICID

The ID for the topic that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

io_topic TYPE REF TO /AWS1/CL_QSTTOPICDETAILS /AWS1/CL_QSTTOPICDETAILS

The definition of a topic to create.

Optional arguments:

it_tags TYPE /AWS1/CL_QSTTAG=>TT_TAGLIST TT_TAGLIST

Contains a map of the key-value pairs for the resource tag or tags that are assigned to the dataset.

it_folderarns TYPE /AWS1/CL_QSTFOLDERARNLIST_W=>TT_FOLDERARNLIST TT_FOLDERARNLIST

The Folder ARN of the folder that you want the topic to reside in.

io_custominstructions TYPE REF TO /AWS1/CL_QSTCUSTOMINSTRUCTIONS /AWS1/CL_QSTCUSTOMINSTRUCTIONS

Custom instructions for the topic.

RETURNING

oo_output TYPE REF TO /aws1/cl_qstcreatetopicrsp /AWS1/CL_QSTCREATETOPICRSP

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_qst~createtopic(
  io_custominstructions = new /aws1/cl_qstcustominstructions( |string| )
  io_topic = new /aws1/cl_qsttopicdetails(
    io_configoptions = new /aws1/cl_qsttopicconfigoptions( ABAP_TRUE )
    it_datasets = VALUE /aws1/cl_qstdatasetmetadata=>tt_datasets(
      (
        new /aws1/cl_qstdatasetmetadata(
          io_dataaggregation = new /aws1/cl_qstdataaggregation(
            iv_datasetrowdategranularity = |string|
            iv_defaultdatecolumnname = |string|
          )
          it_calculatedfields = VALUE /aws1/cl_qsttpccalculatedfield=>tt_topiccalculatedfields(
            (
              new /aws1/cl_qsttpccalculatedfield(
                io_comparativeorder = new /aws1/cl_qstcomparativeorder(
                  it_specifedorder = VALUE /aws1/cl_qststringlist_w=>tt_stringlist(
                    ( new /aws1/cl_qststringlist_w( |string| ) )
                  )
                  iv_treatundefinedspecified00 = |string|
                  iv_useordering = |string|
                )
                io_defaultformatting = new /aws1/cl_qstdefaultformatting(
                  io_displayformatoptions = new /aws1/cl_qstdisplayformatopts(
                    io_negativeformat = new /aws1/cl_qstnegativeformat(
                      iv_prefix = |string|
                      iv_suffix = |string|
                    )
                    iv_blankcellformat = |string|
                    iv_currencysymbol = |string|
                    iv_dateformat = |string|
                    iv_decimalseparator = |string|
                    iv_fractiondigits = 123
                    iv_groupingseparator = |string|
                    iv_prefix = |string|
                    iv_suffix = |string|
                    iv_unitscaler = |string|
                    iv_useblankcellformat = ABAP_TRUE
                    iv_usegrouping = ABAP_TRUE
                  )
                  iv_displayformat = |string|
                )
                io_semantictype = new /aws1/cl_qstsemantictype(
                  it_falseycellvaluesynonyms = VALUE /aws1/cl_qstsensitivestrlist_w=>tt_sensitivestringlist(
                    ( new /aws1/cl_qstsensitivestrlist_w( |string| ) )
                  )
                  it_truthycellvaluesynonyms = VALUE /aws1/cl_qstsensitivestrlist_w=>tt_sensitivestringlist(
                    ( new /aws1/cl_qstsensitivestrlist_w( |string| ) )
                  )
                  it_typeparameters = VALUE /aws1/cl_qsttypeparameters_w=>tt_typeparameters(
                    (
                      VALUE /aws1/cl_qsttypeparameters_w=>ts_typeparameters_maprow(
                        key = |string|
                        value = new /aws1/cl_qsttypeparameters_w( |string| )
                      )
                    )
                  )
                  iv_falseycellvalue = |string|
                  iv_subtypename = |string|
                  iv_truthycellvalue = |string|
                  iv_typename = |string|
                )
                it_allowedaggregations = VALUE /aws1/cl_qstauthorspecifieda00=>tt_authorspecifiedaggregations(
                  ( new /aws1/cl_qstauthorspecifieda00( |string| ) )
                )
                it_calculatedfieldsynonyms = VALUE /aws1/cl_qstsynonyms_w=>tt_synonyms(
                  ( new /aws1/cl_qstsynonyms_w( |string| ) )
                )
                it_cellvaluesynonyms = VALUE /aws1/cl_qstcellvaluesynonym=>tt_cellvaluesynonyms(
                  (
                    new /aws1/cl_qstcellvaluesynonym(
                      it_synonyms = VALUE /aws1/cl_qststringlist_w=>tt_stringlist(
                        ( new /aws1/cl_qststringlist_w( |string| ) )
                      )
                      iv_cellvalue = |string|
                    )
                  )
                )
                it_notallowedaggregations = VALUE /aws1/cl_qstauthorspecifieda00=>tt_authorspecifiedaggregations(
                  ( new /aws1/cl_qstauthorspecifieda00( |string| ) )
                )
                iv_aggregation = |string|
                iv_calculatedfielddesc = |string|
                iv_calculatedfieldname = |string|
                iv_columndatarole = |string|
                iv_disableindexing = ABAP_TRUE
                iv_expression = |string|
                iv_isincludedintopic = ABAP_TRUE
                iv_neveraggregateinfilter = ABAP_TRUE
                iv_nonadditive = ABAP_TRUE
                iv_timegranularity = |string|
              )
            )
          )
          it_columns = VALUE /aws1/cl_qsttopiccolumn=>tt_topiccolumns(
            (
              new /aws1/cl_qsttopiccolumn(
                io_comparativeorder = new /aws1/cl_qstcomparativeorder(
                  it_specifedorder = VALUE /aws1/cl_qststringlist_w=>tt_stringlist(
                    ( new /aws1/cl_qststringlist_w( |string| ) )
                  )
                  iv_treatundefinedspecified00 = |string|
                  iv_useordering = |string|
                )
                io_defaultformatting = new /aws1/cl_qstdefaultformatting(
                  io_displayformatoptions = new /aws1/cl_qstdisplayformatopts(
                    io_negativeformat = new /aws1/cl_qstnegativeformat(
                      iv_prefix = |string|
                      iv_suffix = |string|
                    )
                    iv_blankcellformat = |string|
                    iv_currencysymbol = |string|
                    iv_dateformat = |string|
                    iv_decimalseparator = |string|
                    iv_fractiondigits = 123
                    iv_groupingseparator = |string|
                    iv_prefix = |string|
                    iv_suffix = |string|
                    iv_unitscaler = |string|
                    iv_useblankcellformat = ABAP_TRUE
                    iv_usegrouping = ABAP_TRUE
                  )
                  iv_displayformat = |string|
                )
                io_semantictype = new /aws1/cl_qstsemantictype(
                  it_falseycellvaluesynonyms = VALUE /aws1/cl_qstsensitivestrlist_w=>tt_sensitivestringlist(
                    ( new /aws1/cl_qstsensitivestrlist_w( |string| ) )
                  )
                  it_truthycellvaluesynonyms = VALUE /aws1/cl_qstsensitivestrlist_w=>tt_sensitivestringlist(
                    ( new /aws1/cl_qstsensitivestrlist_w( |string| ) )
                  )
                  it_typeparameters = VALUE /aws1/cl_qsttypeparameters_w=>tt_typeparameters(
                    (
                      VALUE /aws1/cl_qsttypeparameters_w=>ts_typeparameters_maprow(
                        key = |string|
                        value = new /aws1/cl_qsttypeparameters_w( |string| )
                      )
                    )
                  )
                  iv_falseycellvalue = |string|
                  iv_subtypename = |string|
                  iv_truthycellvalue = |string|
                  iv_typename = |string|
                )
                it_allowedaggregations = VALUE /aws1/cl_qstauthorspecifieda00=>tt_authorspecifiedaggregations(
                  ( new /aws1/cl_qstauthorspecifieda00( |string| ) )
                )
                it_cellvaluesynonyms = VALUE /aws1/cl_qstcellvaluesynonym=>tt_cellvaluesynonyms(
                  (
                    new /aws1/cl_qstcellvaluesynonym(
                      it_synonyms = VALUE /aws1/cl_qststringlist_w=>tt_stringlist(
                        ( new /aws1/cl_qststringlist_w( |string| ) )
                      )
                      iv_cellvalue = |string|
                    )
                  )
                )
                it_columnsynonyms = VALUE /aws1/cl_qstsynonyms_w=>tt_synonyms(
                  ( new /aws1/cl_qstsynonyms_w( |string| ) )
                )
                it_notallowedaggregations = VALUE /aws1/cl_qstauthorspecifieda00=>tt_authorspecifiedaggregations(
                  ( new /aws1/cl_qstauthorspecifieda00( |string| ) )
                )
                iv_aggregation = |string|
                iv_columndatarole = |string|
                iv_columndescription = |string|
                iv_columnfriendlyname = |string|
                iv_columnname = |string|
                iv_disableindexing = ABAP_TRUE
                iv_isincludedintopic = ABAP_TRUE
                iv_neveraggregateinfilter = ABAP_TRUE
                iv_nonadditive = ABAP_TRUE
                iv_timegranularity = |string|
              )
            )
          )
          it_filters = VALUE /aws1/cl_qsttopicfilter=>tt_topicfilters(
            (
              new /aws1/cl_qsttopicfilter(
                io_categoryfilter = new /aws1/cl_qsttopiccatfilter(
                  io_constant = new /aws1/cl_qsttpccatfiltconstant(
                    io_collectiveconstant = new /aws1/cl_qstcollectiveconstant(
                      it_valuelist = VALUE /aws1/cl_qststringlist_w=>tt_stringlist(
                        ( new /aws1/cl_qststringlist_w( |string| ) )
                      )
                    )
                    iv_constanttype = |string|
                    iv_singularconstant = |string|
                  )
                  iv_categoryfilterfunction = |string|
                  iv_categoryfiltertype = |string|
                  iv_inverse = ABAP_TRUE
                )
                io_daterangefilter = new /aws1/cl_qsttopicdaterangefilt(
                  io_constant = new /aws1/cl_qsttpcrangefiltcons00(
                    io_rangeconstant = new /aws1/cl_qstrangeconstant(
                      iv_maximum = |string|
                      iv_minimum = |string|
                    )
                    iv_constanttype = |string|
                  )
                  iv_inclusive = ABAP_TRUE
                )
                io_numericequalityfilter = new /aws1/cl_qsttpcnumericequali00(
                  io_constant = new /aws1/cl_qsttpcsingularfiltc00(
                    iv_constanttype = |string|
                    iv_singularconstant = |string|
                  )
                  iv_aggregation = |string|
                )
                io_numericrangefilter = new /aws1/cl_qsttpcnumericrangef00(
                  io_constant = new /aws1/cl_qsttpcrangefiltcons00(
                    io_rangeconstant = new /aws1/cl_qstrangeconstant(
                      iv_maximum = |string|
                      iv_minimum = |string|
                    )
                    iv_constanttype = |string|
                  )
                  iv_aggregation = |string|
                  iv_inclusive = ABAP_TRUE
                )
                io_relativedatefilter = new /aws1/cl_qsttpcrelativedatef00(
                  io_constant = new /aws1/cl_qsttpcsingularfiltc00(
                    iv_constanttype = |string|
                    iv_singularconstant = |string|
                  )
                  iv_relativedatefilterfunc = |string|
                  iv_timegranularity = |string|
                )
                it_filtersynonyms = VALUE /aws1/cl_qstsynonyms_w=>tt_synonyms(
                  ( new /aws1/cl_qstsynonyms_w( |string| ) )
                )
                iv_filterclass = |string|
                iv_filterdescription = |string|
                iv_filtername = |string|
                iv_filtertype = |string|
                iv_operandfieldname = |string|
              )
            )
          )
          it_namedentities = VALUE /aws1/cl_qsttopicnamedentity=>tt_topicnamedentities(
            (
              new /aws1/cl_qsttopicnamedentity(
                io_semanticentitytype = new /aws1/cl_qstsemanticentitytype(
                  it_typeparameters = VALUE /aws1/cl_qsttypeparameters_w=>tt_typeparameters(
                    (
                      VALUE /aws1/cl_qsttypeparameters_w=>ts_typeparameters_maprow(
                        key = |string|
                        value = new /aws1/cl_qsttypeparameters_w( |string| )
                      )
                    )
                  )
                  iv_subtypename = |string|
                  iv_typename = |string|
                )
                it_definition = VALUE /aws1/cl_qstnamedentitydefn=>tt_namedentitydefinitions(
                  (
                    new /aws1/cl_qstnamedentitydefn(
                      io_metric = new /aws1/cl_qstnamedentdefnmetric(
                        it_aggrfunctionparameters = VALUE /aws1/cl_qstaggrfuncparams_w=>tt_aggrfunctionparameters(
                          (
                            VALUE /aws1/cl_qstaggrfuncparams_w=>ts_aggrfunctionparams_maprow(
                              value = new /aws1/cl_qstaggrfuncparams_w( |string| )
                              key = |string|
                            )
                          )
                        )
                        iv_aggregation = |string|
                      )
                      iv_fieldname = |string|
                      iv_propertyname = |string|
                      iv_propertyrole = |string|
                      iv_propertyusage = |string|
                    )
                  )
                )
                it_entitysynonyms = VALUE /aws1/cl_qstsynonyms_w=>tt_synonyms(
                  ( new /aws1/cl_qstsynonyms_w( |string| ) )
                )
                iv_entitydescription = |string|
                iv_entityname = |string|
              )
            )
          )
          iv_datasetarn = |string|
          iv_datasetdescription = |string|
          iv_datasetname = |string|
        )
      )
    )
    iv_description = |string|
    iv_name = |string|
    iv_userexperienceversion = |string|
  )
  it_folderarns = VALUE /aws1/cl_qstfolderarnlist_w=>tt_folderarnlist(
    ( new /aws1/cl_qstfolderarnlist_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_qsttag=>tt_taglist(
    (
      new /aws1/cl_qsttag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_awsaccountid = |string|
  iv_topicid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_arn( ).
  lv_topicid = lo_result->get_topicid( ).
  lv_arn = lo_result->get_refresharn( ).
  lv_string = lo_result->get_requestid( ).
  lv_statuscode = lo_result->get_status( ).
ENDIF.