in src/ZGOOG_DEMO_RAP_AGENT/src/zcl_goog_rap_purchasing_agent.clas.abap [0:0]
METHOD get_tool_definitions.
r_result = VALUE #(
( name = 'API_BLOCKED_VENDORS' " Tool-1
description = 'API returns a list of vendors that are blocked'
implementation =
VALUE #( service = 'API_BUSINESS_PARTNER'
version = 'V2'
entity = 'A_BusinessPartner'
cds_name = 'A_BUSINESSPARTNER'
cds_column = 'SUPPLIER'
operation = 'GET'
const_qp = VALUE #( (
name = 'BUSINESSPARTNERISBLOCKED' value = 'X' ) ) )
parameters = VALUE tt_tool_parameters( ) )
( name = 'API_PURCHASE_ORDER_READ' " Tool-2
description = 'Get a list of purchase orders for a given set of vendors'
implementation =
VALUE #( service = 'API_PURCHASEORDER_2'
version = 'V4'
cds_name = 'A_PURCHASEORDER_2'
cds_column = 'PURCHASEORDER'
entity = 'PURCHASEORDER'
operation = 'GET' )
parameters = VALUE tt_tool_parameters(
type = 'string'
is_required = abap_true
( name = 'SUPPLIER' description = 'Business partner who offers or provides materials or services' ) ) )
( name = 'API_PURCHASE_ORDER_CANCEL' " Tool-3
description = 'Cancel Purchase Orders'
implementation =
VALUE #( service = 'API_PURCHASEORDER_2'
version = 'V4'
cds_name = 'A_PURCHASEORDER_2'
cds_column = 'PURCHASEORDER'
entity = 'PURCHASEORDER'
operation = 'PATCH'
upd_param = VALUE #( (
name = 'PURCHASEORDERDELETIONCODE' value = 'X' ) ) ) "Deletion
parameters = VALUE tt_tool_parameters( type = 'string'
is_required = abap_true
( name = 'PURCHASEORDER' description = 'Purchase Order Number' ) ) ) ).