Skip to content

/AWS1/IF_BDO=>LISTCONFBUNDLEVERSIONS()

About ListConfigurationBundleVersions

Lists all versions of a configuration bundle, with optional filtering by branch name or creation source.

Method Signature

METHODS /AWS1/IF_BDO~LISTCONFBUNDLEVERSIONS
  IMPORTING
    !IV_BUNDLEID TYPE /AWS1/BDOCONFIGURATIONBUNDLEID OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/BDOSTRING OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/BDOINTEGER OPTIONAL
    !IO_FILTER TYPE REF TO /AWS1/CL_BDOVERSIONFILTER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdolstconfbndlvrsnrsp
  RAISING
    /AWS1/CX_BDOACCESSDENIEDEX
    /AWS1/CX_BDOINTERNALSERVEREX
    /AWS1/CX_BDORESOURCENOTFOUNDEX
    /AWS1/CX_BDOTHROTTLINGEX
    /AWS1/CX_BDOVALIDATIONEX
    /AWS1/CX_BDOCLIENTEXC
    /AWS1/CX_BDOSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_bundleid TYPE /AWS1/BDOCONFIGURATIONBUNDLEID /AWS1/BDOCONFIGURATIONBUNDLEID

The unique identifier of the configuration bundle to list versions for.

Optional arguments:

iv_nexttoken TYPE /AWS1/BDOSTRING /AWS1/BDOSTRING

If the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.

iv_maxresults TYPE /AWS1/BDOINTEGER /AWS1/BDOINTEGER

The maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.

io_filter TYPE REF TO /AWS1/CL_BDOVERSIONFILTER /AWS1/CL_BDOVERSIONFILTER

An optional filter for listing versions, including branch name, creation source, and whether to return only the latest version per branch.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdolstconfbndlvrsnrsp /AWS1/CL_BDOLSTCONFBNDLVRSNRSP

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->listconfbundleversions(
  io_filter = new /aws1/cl_bdoversionfilter(
    iv_branchname = |string|
    iv_createdbyname = |string|
    iv_latestperbranch = ABAP_TRUE
  )
  iv_bundleid = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_versions( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_configurationbundlearn = lo_row_1->get_bundlearn( ).
      lv_configurationbundleid = lo_row_1->get_bundleid( ).
      lv_configurationbundlevers = lo_row_1->get_versionid( ).
      lo_versionlineagemetadata = lo_row_1->get_lineagemetadata( ).
      IF lo_versionlineagemetadata IS NOT INITIAL.
        LOOP AT lo_versionlineagemetadata->get_parentversionids( ) into lo_row_2.
          lo_row_3 = lo_row_2.
          IF lo_row_3 IS NOT INITIAL.
            lv_configurationbundlevers = lo_row_3->get_value( ).
          ENDIF.
        ENDLOOP.
        lv_branchname = lo_versionlineagemetadata->get_branchname( ).
        lo_versioncreatedbysource = lo_versionlineagemetadata->get_createdby( ).
        IF lo_versioncreatedbysource IS NOT INITIAL.
          lv_string = lo_versioncreatedbysource->get_name( ).
          lv_string = lo_versioncreatedbysource->get_arn( ).
        ENDIF.
        lv_string = lo_versionlineagemetadata->get_commitmessage( ).
      ENDIF.
      lv_timestamp = lo_row_1->get_versioncreatedat( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.