/AWS1/IF_CUS=>UPDATECALCULATEDATTRDEFN()¶
About UpdateCalculatedAttributeDefinition¶
Updates an existing calculated attribute definition. When updating the Conditions, note that increasing the date range of a calculated attribute will not trigger inclusion of historical data greater than the current date range.
Method Signature¶
METHODS /AWS1/IF_CUS~UPDATECALCULATEDATTRDEFN
  IMPORTING
    !IV_DOMAINNAME TYPE /AWS1/CUSNAME OPTIONAL
    !IV_CALCULATEDATTRIBUTENAME TYPE /AWS1/CUSTYPENAME OPTIONAL
    !IV_DISPLAYNAME TYPE /AWS1/CUSDISPLAYNAME OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/CUSSENSITIVETEXT OPTIONAL
    !IO_CONDITIONS TYPE REF TO /AWS1/CL_CUSCONDITIONS OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cusupcalculatedattr01
  RAISING
    /AWS1/CX_CUSACCESSDENIEDEX
    /AWS1/CX_CUSBADREQUESTEX
    /AWS1/CX_CUSINTERNALSERVEREX
    /AWS1/CX_CUSRESOURCENOTFOUNDEX
    /AWS1/CX_CUSTHROTTLINGEX
    /AWS1/CX_CUSCLIENTEXC
    /AWS1/CX_CUSSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_domainname TYPE /AWS1/CUSNAME /AWS1/CUSNAME¶
The unique name of the domain.
iv_calculatedattributename TYPE /AWS1/CUSTYPENAME /AWS1/CUSTYPENAME¶
The unique name of the calculated attribute.
Optional arguments:¶
iv_displayname TYPE /AWS1/CUSDISPLAYNAME /AWS1/CUSDISPLAYNAME¶
The display name of the calculated attribute.
iv_description TYPE /AWS1/CUSSENSITIVETEXT /AWS1/CUSSENSITIVETEXT¶
The description of the calculated attribute.
io_conditions TYPE REF TO /AWS1/CL_CUSCONDITIONS /AWS1/CL_CUSCONDITIONS¶
The conditions including range, object count, and threshold for the calculated attribute.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cusupcalculatedattr01 /AWS1/CL_CUSUPCALCULATEDATTR01¶
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->updatecalculatedattrdefn(
  io_conditions = new /aws1/cl_cusconditions(
    io_range = new /aws1/cl_cusrange(
      io_valuerange = new /aws1/cl_cusvaluerange(
        iv_end = 123
        iv_start = 123
      )
      iv_timestampformat = |string|
      iv_timestampsource = |string|
      iv_unit = |string|
      iv_value = 123
    )
    io_threshold = new /aws1/cl_custhreshold(
      iv_operator = |string|
      iv_value = |string|
    )
    iv_objectcount = 123
  )
  iv_calculatedattributename = |string|
  iv_description = |string|
  iv_displayname = |string|
  iv_domainname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_typename = lo_result->get_calculatedattributename( ).
  lv_displayname = lo_result->get_displayname( ).
  lv_sensitivetext = lo_result->get_description( ).
  lv_timestamp = lo_result->get_createdat( ).
  lv_timestamp = lo_result->get_lastupdatedat( ).
  lv_statistic = lo_result->get_statistic( ).
  lo_conditions = lo_result->get_conditions( ).
  IF lo_conditions IS NOT INITIAL.
    lo_range = lo_conditions->get_range( ).
    IF lo_range IS NOT INITIAL.
      lv_value = lo_range->get_value( ).
      lv_unit = lo_range->get_unit( ).
      lo_valuerange = lo_range->get_valuerange( ).
      IF lo_valuerange IS NOT INITIAL.
        lv_valuerangestart = lo_valuerange->get_start( ).
        lv_valuerangeend = lo_valuerange->get_end( ).
      ENDIF.
      lv_string1to255 = lo_range->get_timestampsource( ).
      lv_string1to255 = lo_range->get_timestampformat( ).
    ENDIF.
    lv_objectcount = lo_conditions->get_objectcount( ).
    lo_threshold = lo_conditions->get_threshold( ).
    IF lo_threshold IS NOT INITIAL.
      lv_string1to255 = lo_threshold->get_value( ).
      lv_operator = lo_threshold->get_operator( ).
    ENDIF.
  ENDIF.
  lo_attributedetails = lo_result->get_attributedetails( ).
  IF lo_attributedetails IS NOT INITIAL.
    LOOP AT lo_attributedetails->get_attributes( ) into lo_row.
      lo_row_1 = lo_row.
      IF lo_row_1 IS NOT INITIAL.
        lv_attributename = lo_row_1->get_name( ).
      ENDIF.
    ENDLOOP.
    lv_string1to255 = lo_attributedetails->get_expression( ).
  ENDIF.
  lv_optionalboolean = lo_result->get_usehistoricaldata( ).
  lv_readinessstatus = lo_result->get_status( ).
  lo_readiness = lo_result->get_readiness( ).
  IF lo_readiness IS NOT INITIAL.
    lv_percentageinteger = lo_readiness->get_progresspercentage( ).
    lv_text = lo_readiness->get_message( ).
  ENDIF.
  LOOP AT lo_result->get_tags( ) into ls_row_2.
    lv_key = ls_row_2-key.
    lo_value_1 = ls_row_2-value.
    IF lo_value_1 IS NOT INITIAL.
      lv_tagvalue = lo_value_1->get_value( ).
    ENDIF.
  ENDLOOP.
ENDIF.