Skip to content

/AWS1/IF_BDN=>LISTMODELS()

About ListModels

Lists all available AI models that can be used for workflow execution, including their status and compatibility information.

Method Signature

METHODS /AWS1/IF_BDN~LISTMODELS
  IMPORTING
    !IV_CLIENTCOMPATIBILITYVRS TYPE /AWS1/BDNINTEGER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdnlistmodelsresponse
  RAISING
    /AWS1/CX_BDNACCESSDENIEDEX
    /AWS1/CX_BDNINTERNALSERVEREX
    /AWS1/CX_BDNTHROTTLINGEX
    /AWS1/CX_BDNCLIENTEXC
    /AWS1/CX_BDNSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_clientcompatibilityvrs TYPE /AWS1/BDNINTEGER /AWS1/BDNINTEGER

The client compatibility version to filter models by compatibility.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdnlistmodelsresponse /AWS1/CL_BDNLISTMODELSRESPONSE

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->listmodels( 123 ).

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_modelsummaries( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_modelid = lo_row_1->get_modelid( ).
      lo_modellifecycle = lo_row_1->get_modellifecycle( ).
      IF lo_modellifecycle IS NOT INITIAL.
        lv_modelstatus = lo_modellifecycle->get_status( ).
      ENDIF.
      lv_integer = lo_row_1->get_minimumcompatibilityvrs( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_modelaliases( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_modelid = lo_row_3->get_aliasname( ).
      lv_modelid = lo_row_3->get_latestmodelid( ).
      lv_modelid = lo_row_3->get_resolvedmodelid( ).
    ENDIF.
  ENDLOOP.
  lo_compatibilityinformatio = lo_result->get_compatibilityinformation( ).
  IF lo_compatibilityinformatio IS NOT INITIAL.
    lv_integer = lo_compatibilityinformatio->get_clientcompatibilityvrs( ).
    LOOP AT lo_compatibilityinformatio->get_supportedmodelids( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_modelid = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_nonblankstring = lo_compatibilityinformatio->get_message( ).
  ENDIF.
ENDIF.