Skip to content

/AWS1/IF_SGM=>EXTENDTRAININGPLAN()

About ExtendTrainingPlan

Extends an existing training plan by purchasing an extension offering. This allows you to add additional compute capacity time to your training plan without creating a new plan or reconfiguring your workloads.

To find available extension offerings, use the SearchTrainingPlanOfferings API with the TrainingPlanArn parameter.

To view the history of extensions for a training plan, use the DescribeTrainingPlanExtensionHistory API.

Method Signature

METHODS /AWS1/IF_SGM~EXTENDTRAININGPLAN
  IMPORTING
    !IV_TRAININGPLANEXTNOFFERID TYPE /AWS1/SGMTRNPLANEXTNOFFERID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmextendtrnplanrsp
  RAISING
    /AWS1/CX_SGMRESOURCENOTFOUND
    /AWS1/CX_SGMCLIENTEXC
    /AWS1/CX_SGMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_trainingplanextnofferid TYPE /AWS1/SGMTRNPLANEXTNOFFERID /AWS1/SGMTRNPLANEXTNOFFERID

The unique identifier of the extension offering to purchase. You can retrieve this ID from the TrainingPlanExtensionOfferings in the response of the SearchTrainingPlanOfferings API.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmextendtrnplanrsp /AWS1/CL_SGMEXTENDTRNPLANRSP

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->extendtrainingplan( |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_trainingplanextensions( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_trainingplanextensionof = lo_row_1->get_trainingplanextnofferid( ).
      lv_timestamp = lo_row_1->get_extendedat( ).
      lv_timestamp = lo_row_1->get_startdate( ).
      lv_timestamp = lo_row_1->get_enddate( ).
      lv_string256 = lo_row_1->get_status( ).
      lv_string256 = lo_row_1->get_paymentstatus( ).
      lv_string256 = lo_row_1->get_availabilityzone( ).
      lv_availabilityzoneid = lo_row_1->get_availabilityzoneid( ).
      lv_trainingplanextensiondu = lo_row_1->get_durationhours( ).
      lv_string256 = lo_row_1->get_upfrontfee( ).
      lv_currencycode = lo_row_1->get_currencycode( ).
    ENDIF.
  ENDLOOP.
ENDIF.