/AWS1/IF_SGM=>LISTTRAININGPLANS()¶
About ListTrainingPlans¶
Retrieves a list of training plans for the current account.
Method Signature¶
METHODS /AWS1/IF_SGM~LISTTRAININGPLANS
IMPORTING
!IV_NEXTTOKEN TYPE /AWS1/SGMNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/SGMMAXRESULTS OPTIONAL
!IV_STARTTIMEAFTER TYPE /AWS1/SGMTIMESTAMP OPTIONAL
!IV_STARTTIMEBEFORE TYPE /AWS1/SGMTIMESTAMP OPTIONAL
!IV_SORTBY TYPE /AWS1/SGMTRAININGPLANSORTBY OPTIONAL
!IV_SORTORDER TYPE /AWS1/SGMTRAININGPLANSORTORDER OPTIONAL
!IT_FILTERS TYPE /AWS1/CL_SGMTRAININGPLANFILTER=>TT_TRAININGPLANFILTERS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmlisttrnplansrsp
RAISING
/AWS1/CX_SGMCLIENTEXC
/AWS1/CX_SGMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_nexttoken TYPE /AWS1/SGMNEXTTOKEN /AWS1/SGMNEXTTOKEN¶
A token to continue pagination if more results are available.
iv_maxresults TYPE /AWS1/SGMMAXRESULTS /AWS1/SGMMAXRESULTS¶
The maximum number of results to return in the response.
iv_starttimeafter TYPE /AWS1/SGMTIMESTAMP /AWS1/SGMTIMESTAMP¶
Filter to list only training plans with an actual start time after this date.
iv_starttimebefore TYPE /AWS1/SGMTIMESTAMP /AWS1/SGMTIMESTAMP¶
Filter to list only training plans with an actual start time before this date.
iv_sortby TYPE /AWS1/SGMTRAININGPLANSORTBY /AWS1/SGMTRAININGPLANSORTBY¶
The training plan field to sort the results by (e.g., StartTime, Status).
iv_sortorder TYPE /AWS1/SGMTRAININGPLANSORTORDER /AWS1/SGMTRAININGPLANSORTORDER¶
The order to sort the results (Ascending or Descending).
it_filters TYPE /AWS1/CL_SGMTRAININGPLANFILTER=>TT_TRAININGPLANFILTERS TT_TRAININGPLANFILTERS¶
Additional filters to apply to the list of training plans.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sgmlisttrnplansrsp /AWS1/CL_SGMLISTTRNPLANSRSP¶
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->listtrainingplans(
it_filters = VALUE /aws1/cl_sgmtrainingplanfilter=>tt_trainingplanfilters(
(
new /aws1/cl_sgmtrainingplanfilter(
iv_name = |string|
iv_value = |string|
)
)
)
iv_maxresults = 123
iv_nexttoken = |string|
iv_sortby = |string|
iv_sortorder = |string|
iv_starttimeafter = '20150101000000.0000000'
iv_starttimebefore = '20150101000000.0000000'
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_nexttoken = lo_result->get_nexttoken( ).
LOOP AT lo_result->get_trainingplansummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_trainingplanarn = lo_row_1->get_trainingplanarn( ).
lv_trainingplanname = lo_row_1->get_trainingplanname( ).
lv_trainingplanstatus = lo_row_1->get_status( ).
lv_trainingplanstatusmessa = lo_row_1->get_statusmessage( ).
lv_trainingplandurationhou = lo_row_1->get_durationhours( ).
lv_trainingplandurationmin = lo_row_1->get_durationminutes( ).
lv_timestamp = lo_row_1->get_starttime( ).
lv_timestamp = lo_row_1->get_endtime( ).
lv_string256 = lo_row_1->get_upfrontfee( ).
lv_currencycode = lo_row_1->get_currencycode( ).
lv_totalinstancecount = lo_row_1->get_totalinstancecount( ).
lv_availableinstancecount = lo_row_1->get_availableinstancecount( ).
lv_inuseinstancecount = lo_row_1->get_inuseinstancecount( ).
lv_ultraservercount = lo_row_1->get_totalultraservercount( ).
LOOP AT lo_row_1->get_targetresources( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_sagemakerresourcename = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_1->get_reservedcapacitysums( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_reservedcapacityarn = lo_row_5->get_reservedcapacityarn( ).
lv_reservedcapacitytype = lo_row_5->get_reservedcapacitytype( ).
lv_ultraservertype = lo_row_5->get_ultraservertype( ).
lv_ultraservercount = lo_row_5->get_ultraservercount( ).
lv_reservedcapacityinstanc = lo_row_5->get_instancetype( ).
lv_totalinstancecount = lo_row_5->get_totalinstancecount( ).
lv_reservedcapacitystatus = lo_row_5->get_status( ).
lv_availabilityzone = lo_row_5->get_availabilityzone( ).
lv_reservedcapacityduratio = lo_row_5->get_durationhours( ).
lv_reservedcapacityduratio_1 = lo_row_5->get_durationminutes( ).
lv_timestamp = lo_row_5->get_starttime( ).
lv_timestamp = lo_row_5->get_endtime( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.