/AWS1/IF_BIL=>LISTBILLINGVIEWSEGMENTS()¶
About ListBillingViewSegments¶
Lists the segments of a billing view over a given time period. Each segment identifies the billing domain (PRO_FORMA or BILLABLE) and the account relationships that apply during its time range.
If you don't provide an arn, the response includes segments for the caller's PRIMARY billing view.
If a mid-period change occurs, the response includes multiple segments, each with its own time range. The response omits hidden segments, so the segments it returns might not cover the entire requested time period.
Method Signature¶
METHODS /AWS1/IF_BIL~LISTBILLINGVIEWSEGMENTS
IMPORTING
!IO_TIMERANGE TYPE REF TO /AWS1/CL_BILBLLVIEWSEGTIMERNG OPTIONAL
!IV_ARN TYPE /AWS1/BILBILLINGVIEWARN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/BILBLLNGVIEWSMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/BILPAGETOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_billistbllviewsegrsp
RAISING
/AWS1/CX_BILACCESSDENIEDEX
/AWS1/CX_BILBLLVIEWHLTHSTATEX
/AWS1/CX_BILINTERNALSERVEREX
/AWS1/CX_BILRESOURCENOTFOUNDEX
/AWS1/CX_BILTHROTTLINGEX
/AWS1/CX_BILVALIDATIONEX
/AWS1/CX_BILCLIENTEXC
/AWS1/CX_BILSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
io_timerange TYPE REF TO /AWS1/CL_BILBLLVIEWSEGTIMERNG /AWS1/CL_BILBLLVIEWSEGTIMERNG¶
The billing period to query. If you don't provide a time range, the current billing period, which is the calendar month in UTC, is used.
iv_arn TYPE /AWS1/BILBILLINGVIEWARN /AWS1/BILBILLINGVIEWARN¶
The Amazon Resource Name (ARN) that uniquely identifies the billing view to query. If you don't provide an ARN, the caller's
PRIMARYbilling view is used. The ARN must reference a primary billing view. Custom billing views aren't supported.
iv_maxresults TYPE /AWS1/BILBLLNGVIEWSMAXRESULTS /AWS1/BILBLLNGVIEWSMAXRESULTS¶
The number of entries a paginated response contains. Valid values range from 1 to 100. The default is 100.
iv_nexttoken TYPE /AWS1/BILPAGETOKEN /AWS1/BILPAGETOKEN¶
The pagination token that is used on subsequent calls to list billing view segments.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_billistbllviewsegrsp /AWS1/CL_BILLISTBLLVIEWSEGRSP¶
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->listbillingviewsegments(
io_timerange = new /aws1/cl_bilbllviewsegtimerng(
iv_begindateinclusive = '20150101000000.0000000'
iv_enddateexclusive = '20150101000000.0000000'
)
iv_arn = |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_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_billingdomain = lo_row_1->get_domain( ).
lo_billingviewsegmenttimer = lo_row_1->get_timerange( ).
IF lo_billingviewsegmenttimer IS NOT INITIAL.
lv_timestamp = lo_billingviewsegmenttimer->get_begindateinclusive( ).
lv_timestamp = lo_billingviewsegmenttimer->get_enddateexclusive( ).
ENDIF.
lv_accountid = lo_row_1->get_billingtransferaccountid( ).
lv_accountid = lo_row_1->get_managementaccountid( ).
lv_accountid = lo_row_1->get_billinggroupprmryacctid( ).
ENDIF.
ENDLOOP.
lv_pagetoken = lo_result->get_nexttoken( ).
ENDIF.
Invoke ListBillingViewSegments¶
Invoke ListBillingViewSegments
DATA(lo_result) = lo_client->listbillingviewsegments(
io_timerange = new /aws1/cl_bilbllviewsegtimerng(
iv_begindateinclusive = '20240701000000.0000000'
iv_enddateexclusive = '20240801000000.0000000'
)
).
Error example for ListBillingViewSegments¶
Error example for ListBillingViewSegments
DATA(lo_result) = lo_client->listbillingviewsegments(
io_timerange = new /aws1/cl_bilbllviewsegtimerng(
iv_begindateinclusive = '20240801000000.0000000'
iv_enddateexclusive = '20240701000000.0000000'
)
).