Create a new Resouce in AIE
Development Object
report ZTEST_RESOURCE
ZCL_ADT_RES_PRODUCT
ZCL_PRODUCT_ADT_RES_APP
ZCL_ADT_RES_PRO_CONTENT_HANDLE
BAdI implementation: ZCL_PRODUCT_IMPL
Consumer report
Resource Controller
Super class: CL_ADT_REST_RESOURCE
in our example, we re-implement GET method, which is responsible for assembling corresponding data for requested resouce and delegate the data to response instance.
Content Handler
Super class: CL_ADT_REST_ST_HANDLER
Just re-implement CONSTRUCTOR:co_st_name: specify simple transformation name, which will be used to transform the assembled ABAP structure by resouce controller into xml data which will be passed to client. co_root_name: * co_content_type: specify what kind of data will be passed to client.
Application Class
Central point to expose the resouce to ADT framework. Super class: CL_ADT_DISC_RES_APP_BASE
Tell framework that all URI having prefix /crm/product will be handled by the resouce controller ZCL_ADT_RES_PRODUCT.
BAdI Implementation
Create a new implementation on enhancement spot SADT_REST_RFC_APPLICATION, specify the application class as BAdI Implementation class.
Maintain filter: