Skip to content

/AWS1/IF_TCR=>BATCHGETDSCVREGISTRYRECORD()

About BatchGetDiscoverableRegistryRecord

Retrieves multiple discoverable registry records by ID from a single registry. Records that cannot be retrieved are reported individually in the errors list rather than failing the entire request.

Method Signature

METHODS /AWS1/IF_TCR~BATCHGETDSCVREGISTRYRECORD
  IMPORTING
    !IT_ENTRIES TYPE /AWS1/CL_TCRREGRECORDSENTRY=>TT_REGISTRYRECORDSENTRYLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tcrbtcgtdscvregrecrsp
  RAISING
    /AWS1/CX_TCRACCESSDENIEDEX
    /AWS1/CX_TCRINTERNALSERVEREX
    /AWS1/CX_TCRRESOURCENOTFOUNDEX
    /AWS1/CX_TCRTHROTTLINGEX
    /AWS1/CX_TCRUNAUTHEXCEPTION
    /AWS1/CX_TCRVLDTNEXCEPTION
    /AWS1/CX_TCRCLIENTEXC
    /AWS1/CX_TCRSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

it_entries TYPE /AWS1/CL_TCRREGRECORDSENTRY=>TT_REGISTRYRECORDSENTRYLIST TT_REGISTRYRECORDSENTRYLIST

The registry-scoped groups of record IDs to retrieve. Currently, you can specify exactly one entry.

RETURNING

oo_output TYPE REF TO /aws1/cl_tcrbtcgtdscvregrecrsp /AWS1/CL_TCRBTCGTDSCVREGRECRSP

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->batchgetdscvregistryrecord(
  it_entries = VALUE /aws1/cl_tcrregrecordsentry=>tt_registryrecordsentrylist(
    (
      new /aws1/cl_tcrregrecordsentry(
        it_recordids = VALUE /aws1/cl_tcrregrecordidlist_w=>tt_registryrecordidlist(
          ( new /aws1/cl_tcrregrecordidlist_w( |string| ) )
        )
        iv_registryid = |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_registryrecords( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_registryarn = lo_row_1->get_registryarn( ).
      lv_registryrecordarn = lo_row_1->get_recordarn( ).
      lv_registryrecordid = lo_row_1->get_recordid( ).
      lv_registryrecordname = lo_row_1->get_name( ).
      lv_description = lo_row_1->get_description( ).
      lv_registryrecorddisplayna = lo_row_1->get_displayname( ).
      lv_recordtype = lo_row_1->get_recordtype( ).
      lo_descriptors = lo_row_1->get_descriptors( ).
      IF lo_descriptors IS NOT INITIAL.
        lo_mcpserverdescriptor = lo_descriptors->get_mcpserver( ).
        IF lo_mcpserverdescriptor IS NOT INITIAL.
          lv_descriptordata = lo_mcpserverdescriptor->get_data( ).
          lv_dataschemaversion = lo_mcpserverdescriptor->get_dataschemaversion( ).
          lo_mcpserveradditionaldata = lo_mcpserverdescriptor->get_additionaldata( ).
          IF lo_mcpserveradditionaldata IS NOT INITIAL.
            lo_mcptoolsdescriptor = lo_mcpserveradditionaldata->get_tools( ).
            IF lo_mcptoolsdescriptor IS NOT INITIAL.
              lv_descriptordata = lo_mcptoolsdescriptor->get_data( ).
              lv_dataschemaversion = lo_mcptoolsdescriptor->get_dataschemaversion( ).
            ENDIF.
          ENDIF.
          lo_descriptorsource = lo_mcpserverdescriptor->get_source( ).
          IF lo_descriptorsource IS NOT INITIAL.
            lo_descriptorsourcefromurl = lo_descriptorsource->get_fromurl( ).
            IF lo_descriptorsourcefromurl IS NOT INITIAL.
              lv_descriptorsourceurl = lo_descriptorsourcefromurl->get_url( ).
            ENDIF.
          ENDIF.
        ENDIF.
        lo_a2aagentcarddescriptor = lo_descriptors->get_a2aagentcard( ).
        IF lo_a2aagentcarddescriptor IS NOT INITIAL.
          lv_descriptordata = lo_a2aagentcarddescriptor->get_data( ).
          lv_dataschemaversion = lo_a2aagentcarddescriptor->get_dataschemaversion( ).
          lo_descriptorsource = lo_a2aagentcarddescriptor->get_source( ).
          IF lo_descriptorsource IS NOT INITIAL.
            lo_descriptorsourcefromurl = lo_descriptorsource->get_fromurl( ).
            IF lo_descriptorsourcefromurl IS NOT INITIAL.
              lv_descriptorsourceurl = lo_descriptorsourcefromurl->get_url( ).
            ENDIF.
          ENDIF.
        ENDIF.
        lo_agentskillsdefinitionde = lo_descriptors->get_agentskillsdefinition( ).
        IF lo_agentskillsdefinitionde IS NOT INITIAL.
          lv_descriptordata = lo_agentskillsdefinitionde->get_data( ).
          lv_dataschemaversion = lo_agentskillsdefinitionde->get_dataschemaversion( ).
          lo_agentskillsadditionalda = lo_agentskillsdefinitionde->get_additionaldata( ).
          IF lo_agentskillsadditionalda IS NOT INITIAL.
            lo_agentskillsmddescriptor = lo_agentskillsadditionalda->get_skillmd( ).
            IF lo_agentskillsmddescriptor IS NOT INITIAL.
              lv_descriptordata = lo_agentskillsmddescriptor->get_data( ).
              lv_dataschemaversion = lo_agentskillsmddescriptor->get_dataschemaversion( ).
              lo_descriptorsource = lo_agentskillsmddescriptor->get_source( ).
              IF lo_descriptorsource IS NOT INITIAL.
                lo_descriptorsourcefromurl = lo_descriptorsource->get_fromurl( ).
                IF lo_descriptorsourcefromurl IS NOT INITIAL.
                  lv_descriptorsourceurl = lo_descriptorsourcefromurl->get_url( ).
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
        lo_customdescriptor = lo_descriptors->get_custom( ).
        IF lo_customdescriptor IS NOT INITIAL.
          lv_descriptordata = lo_customdescriptor->get_data( ).
        ENDIF.
      ENDIF.
      lv_registryrecordversion = lo_row_1->get_recordversion( ).
      lv_registryrecordstatus = lo_row_1->get_status( ).
      lv_datetimestamp = lo_row_1->get_createdat( ).
      lv_datetimestamp = lo_row_1->get_updatedat( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_errors( ) into lo_row_2.
    lo_row_3 = lo_row_2.
    IF lo_row_3 IS NOT INITIAL.
      lv_registryidentifier = lo_row_3->get_registryid( ).
      lv_recordidentifier = lo_row_3->get_recordid( ).
      lv_batchgetdiscoverablereg = lo_row_3->get_errorcode( ).
      lv_string = lo_row_3->get_message( ).
    ENDIF.
  ENDLOOP.
ENDIF.