on 03-23-2016 10:54 AM
Hello SAP Gateway Expert,
I'm using the Gateway for some times now and I encountered a strange error.
I created a service with Entities based on ABAP RFM and it was working fine. I added an association to manage a DEEP_ENTITY creation and now I have an error when I try to use the service.
From /n/iwfnd/maint_service, when I select my service and click the button "Load metadata", I get an error "Loading the metadata for service 'Z_PDE_CREATE_SRV' failed. Check the error log. "
And the error log is telling "Data object 'HeaderPDESet' not found" which strange because the object is existing !
I deleted and recreated the Entity and the EntitySet, I regenerated the project, I cleaned the caches /IWFND/CACHE_CLEANUP and /IWBEP/CACHE_CLEANUP.
For no effect... Any clue is appreciated !
Thanks,
Luc
Hello Ashwin,
Sorry for the delay answering I was really not available...
Thanks this was the major part of the problem !
The second part is that I put the EntitySet name inseatd of the Entity Name !
How can I reward you ?
Regards,
Luc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashwin,
Yes I did.
Here it is :
method DEFINE.
DATA:
lo_annotation TYPE REF TO /iwbep/if_mgw_odata_annotation,
lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ,
lo_complex_type TYPE REF TO /iwbep/if_mgw_odata_cmplx_type,
lo_property TYPE REF TO /iwbep/if_mgw_odata_property,
lo_entity_set TYPE REF TO /iwbep/if_mgw_odata_entity_set.
***************************************************************************************************************
* ENTITY - Deep Entity
***************************************************************************************************************
lo_entity_type = model->get_entity_type( iv_entity_name = 'HeaderPDESet' ).
lo_entity_type->bind_structure( iv_structure_name = 'ZCL_Z_PDE_CREATE_MPC_EXT=>TS_DEEP_ENTITY' ).
endmethod.
And I created also the TS_DEEP_ENTITY
class ZCL_Z_PDE_CREATE_MPC_EXT definition
public
inheriting from ZCL_Z_PDE_CREATE_MPC
create public .
public section.
types:
begin of TS_DEEP_ENTITY,
include type TS_HEADERPDE,
headeritem type STANDARD TABLE OF TS_ITEMLIST with DEFAULT KEY,
headerpartner type STANDARD TABLE OF TS_PARTNERLIST WITH DEFAULT KEY,
END OF TS_DEEP_ENTITY .
methods DEFINE
redefinition .
Regards,
Luc
Inside DEFINE method first please call the super class as below and then your custom code.
method DEFINE.
DATA:lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ.
super->define( ).
***************************************************************************************************************
* ENTITY - Deep Entity
***************************************************************************************************************
lo_entity_type = model->get_entity_type( iv_entity_name = 'HeaderPDESet' ).
lo_entity_type->bind_structure( iv_structure_name = 'ZCL_Z_PDE_CREATE_MPC_EXT=>TS_DEEP_ENTITY' ).
endmethod.
Hello Luc,
Can you please share the screen shots of the association and navigation created between the entities here ?
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.