Dear All Experts,
I have big issue that make me crazy. Please take some time to help me
I am creating a service using Gateway Service Builder for GBI.
I redefine a BOPF : EHHSS_INCIDENT.
I want to create a SERVICE in order to create a report incident simplified.
when I redefine EHHSS_INCIDENT, I see that the system generate a model and service and save on /BOFU/GBI_CUST table ,( example : ZINCIDENT_MDL, ZINCIDENT_SRV)
after that, I generated as normal , I see that the system will generate other model and service( example : ZINCIDENT1_MDL, ZINCIDENT1_SRV), and they don't save in /BOFU/GBI_CUST.
So when I registry ZINCIDENT1_SRV then I can not debug in any method I redefined( in my code below is CREATE ENTITY and GET ENTITY)
because I see this code :
SELECT SINGLE * FROM /bofu/gbi_cust INTO ls_gbi_cust WHERE service_name = mv_service_name ##WARN_OK.
if I run URI with service is ok ( in my case : ZINCIDENT_SRV), Howerver, If I create one more entity by my hand , then I can not run URI this entity set with ZINCIDENT_SRV
for get entity,
/sap/opu/odata/sap/ZINICIDENT1_SRV/INCIDENTSet ----> it's ok
/sap/opu/odata/sap/ZINICIDENT_SRV/INCIDENTSet -----> I have error code : 400 : Resource not found for the segment 'INCIDENTSet'.
what service I have to use at here?
I also created some method.
and here is code for CREATE_ROOT_NODE
parameter : IO_INC_ROOT_NODE ref to CL_EHFND_END_NODE
IV_CATELOGY TYPE EHHSS_INC_CATEGORY_CODE
##############
DATA: lr_s_inc_root TYPE REF TO ehhsss_inc_root.
DATA: lo_service_manager TYPE REF TO cl_ehfnd_ena_service_mngr.
* Get the ROOT Node
" io_inc_root_node = lo_service_manager->get_root( ).
CREATE DATA lr_s_inc_root.
"Create an empty row
lr_s_inc_root ?= io_inc_root_node->create_empty_row( ).
lr_s_inc_root->category = iv_category.
lr_s_inc_root->status = if_ehhss_inc_impl_c=>sc_inc_status-new.
"Insert the row
io_inc_root_node->insert_and_focus( lr_s_inc_root ).
io_inc_root_node->get_row( 1 ).
#######################3
But I can not run this method, I debug and see that when run to
lr_s_inc_root ?= io_inc_root_node->create_empty_row( ).
then the sytem get error and go to exception by go to this class:/IWCOR/IF_REST_HANDLER~HANDLE (/IWCOR/CL_DS_HDLR_ROOT).
My purpose is create a service that create a report incident simplified in EHSM.
Please tell me How can I create it or How can I create ROOT_NODE and SUB NODE in this service?
Thanks in advance
Chinh Pham