Skip to content

/AWS1/IF_PRP=>LISTSUBSCRIPTIONS()

About ListSubscriptions

Returns a summary of all flat-rate pricing subscriptions in the calling account.

Method Signature

METHODS /AWS1/IF_PRP~LISTSUBSCRIPTIONS
  IMPORTING
    !IV_NEXTTOKEN TYPE /AWS1/PRPSTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_prplistsubscroutput
  RAISING
    /AWS1/CX_PRPACCESSDENIEDEX
    /AWS1/CX_PRPINTERNALSERVEREX
    /AWS1/CX_PRPRESOURCENOTFOUNDEX
    /AWS1/CX_PRPTHROTTLINGEX
    /AWS1/CX_PRPVLDTNEXCEPTION
    /AWS1/CX_PRPCLIENTEXC
    /AWS1/CX_PRPSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Optional arguments:

iv_nexttoken TYPE /AWS1/PRPSTRING /AWS1/PRPSTRING

A token from a previous ListSubscriptions response. If the response included a nextToken, there are more results available. Pass this value to retrieve the next page of results.

RETURNING

oo_output TYPE REF TO /aws1/cl_prplistsubscroutput /AWS1/CL_PRPLISTSUBSCROUTPUT

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->listsubscriptions( |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_subscriptionsummaries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_subscriptionarn = lo_row_1->get_arn( ).
      lv_string = lo_row_1->get_planfamily( ).
      lv_string = lo_row_1->get_plantier( ).
      lv_string = lo_row_1->get_usagelevel( ).
      lo_scheduledchange = lo_row_1->get_scheduledchange( ).
      IF lo_scheduledchange IS NOT INITIAL.
        lv_scheduledchangetype = lo_scheduledchange->get_changetype( ).
        lv_timestamp = lo_scheduledchange->get_effectivedate( ).
        lv_string = lo_scheduledchange->get_plantier( ).
        lv_string = lo_scheduledchange->get_usagelevel( ).
      ENDIF.
      lv_status = lo_row_1->get_status( ).
      lv_string = lo_row_1->get_statusreason( ).
      LOOP AT lo_row_1->get_resourcearns( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_string = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
      lv_timestamp = lo_row_1->get_createdat( ).
      lv_timestamp = lo_row_1->get_updatedat( ).
      lv_string = lo_row_1->get_etag( ).
    ENDIF.
  ENDLOOP.
  lv_string = lo_result->get_nexttoken( ).
ENDIF.

List all subscriptions

List all subscriptions

DATA(lo_result) = lo_client->listsubscriptions( ).