Skip to content

/AWS1/IF_APC=>GETEXPERIMENTDEFINITION()

About GetExperimentDefinition

Retrieves information about an experiment definition.

Method Signature

METHODS /AWS1/IF_APC~GETEXPERIMENTDEFINITION
  IMPORTING
    !IV_APPLICATIONIDENTIFIER TYPE /AWS1/APCIDENTIFIER OPTIONAL
    !IV_EXPERIMENTDEFINITIONID TYPE /AWS1/APCIDENTIFIER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_apcexperimentdefn
  RAISING
    /AWS1/CX_APCBADREQUESTEX
    /AWS1/CX_APCINTERNALSERVEREX
    /AWS1/CX_APCRESOURCENOTFOUNDEX
    /AWS1/CX_APCCLIENTEXC
    /AWS1/CX_APCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_applicationidentifier TYPE /AWS1/APCIDENTIFIER /AWS1/APCIDENTIFIER

The application ID or name.

iv_experimentdefinitionid TYPE /AWS1/APCIDENTIFIER /AWS1/APCIDENTIFIER

The experiment definition ID or name.

RETURNING

oo_output TYPE REF TO /aws1/cl_apcexperimentdefn /AWS1/CL_APCEXPERIMENTDEFN

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->getexperimentdefinition(
  iv_applicationidentifier = |string|
  iv_experimentdefinitionid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_id = lo_result->get_applicationid( ).
  lv_id = lo_result->get_id( ).
  lv_name = lo_result->get_name( ).
  lv_description = lo_result->get_hypothesis( ).
  lv_experimentdefinitionsta = lo_result->get_status( ).
  lv_id = lo_result->get_configurationprofileid( ).
  lv_id = lo_result->get_environmentid( ).
  lv_flagkey = lo_result->get_flagkey( ).
  lv_rule = lo_result->get_audiencerule( ).
  lv_description = lo_result->get_audiencedescription( ).
  lv_description = lo_result->get_launchcriteria( ).
  LOOP AT lo_result->get_treatments( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_treatmentkey = lo_row_1->get_key( ).
      lv_weight = lo_row_1->get_weight( ).
      lv_description = lo_row_1->get_description( ).
      lo_flagvalue = lo_row_1->get_flagvalue( ).
      IF lo_flagvalue IS NOT INITIAL.
        lv_boolean = lo_flagvalue->get_enabled( ).
        LOOP AT lo_flagvalue->get_attributevalues( ) into ls_row_2.
          lv_key = ls_row_2-key.
          lo_value = ls_row_2-value.
          IF lo_value IS NOT INITIAL.
            lv_attributestring = lo_value->get_stringvalue( ).
            lv_double = lo_value->get_numbervalue( ).
            lv_boolean = lo_value->get_booleanvalue( ).
            LOOP AT lo_value->get_stringarray( ) into lo_row_3.
              lo_row_4 = lo_row_3.
              IF lo_row_4 IS NOT INITIAL.
                lv_attributestring = lo_row_4->get_value( ).
              ENDIF.
            ENDLOOP.
            LOOP AT lo_value->get_numberarray( ) into lo_row_5.
              lo_row_6 = lo_row_5.
              IF lo_row_6 IS NOT INITIAL.
                lv_double = lo_row_6->get_value( ).
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDIF.
  ENDLOOP.
  lo_treatment = lo_result->get_control( ).
  IF lo_treatment IS NOT INITIAL.
    lv_treatmentkey = lo_treatment->get_key( ).
    lv_weight = lo_treatment->get_weight( ).
    lv_description = lo_treatment->get_description( ).
    lo_flagvalue = lo_treatment->get_flagvalue( ).
    IF lo_flagvalue IS NOT INITIAL.
      lv_boolean = lo_flagvalue->get_enabled( ).
      LOOP AT lo_flagvalue->get_attributevalues( ) into ls_row_2.
        lv_key = ls_row_2-key.
        lo_value = ls_row_2-value.
        IF lo_value IS NOT INITIAL.
          lv_attributestring = lo_value->get_stringvalue( ).
          lv_double = lo_value->get_numbervalue( ).
          lv_boolean = lo_value->get_booleanvalue( ).
          LOOP AT lo_value->get_stringarray( ) into lo_row_3.
            lo_row_4 = lo_row_3.
            IF lo_row_4 IS NOT INITIAL.
              lv_attributestring = lo_row_4->get_value( ).
            ENDIF.
          ENDLOOP.
          LOOP AT lo_value->get_numberarray( ) into lo_row_5.
            lo_row_6 = lo_row_5.
            IF lo_row_6 IS NOT INITIAL.
              lv_double = lo_row_6->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
  lv_iso8601datetime = lo_result->get_createdat( ).
  lv_iso8601datetime = lo_result->get_updatedat( ).
  lv_kmskeyidentifier = lo_result->get_kmskeyidentifier( ).
ENDIF.

To get an experiment definition

The following GetExperimentDefinition example retrieves the details of an experiment definition.

DATA(lo_result) = lo_client->getexperimentdefinition(
  iv_applicationidentifier = |339ohji|
  iv_experimentdefinitionid = |bsxyd7k|
).