Hi ,
Now I am Trying to Integrate the different service into one service using "Include Gateway Service" and trying to custom that integrated service for the Customer requirement using "Redefine Gateway Gateway" which Extend the integrated service .
Current Version : SP5
There are 3 Service ....
1. Include_service
Entity
alerts
- id
- text
2. Extend_service
Entity
PO
- Poid
- text
- docDate "type dats
Navigation Propertes
- Alerts "Link by POAssAlerts Association
- POItems
Association
POAssAlerts
- principal Entity: PO
- Depenedent Entity: alerts "External Association with Include_service
3. Cust_service
Entity
PO
- Poid
- text
- docDate "type p(8,0)
- ABC_no
Navigation Propertes
- Alerts "Link by POAssAlerts Association
- POItems
Association
POAssAlerts
- principal Entity: PO
- Depenedent Entity: PO or Blank "For Some Entity it will be Empty
Problem 1 : (In SEGW tool , entity is missing in Association):
When I Redefine Gateway Service for Cust_service with "Extend_service" then Error comes in Assocation which are inherted from Extend_service and has External Association with Include_service .
In my above Example .
plz Compare Association POAssAlerts in Extend_service and Association POAssAlerts in Cust_service Dependent Entity ... Dependent Entity will be principal Entity or some time Blank in SEGW Tool.
Temp Solution :
Delete All association (delete all assoication set and navigation links related to deleted assoication as well ) which has this problem from Cust_service in SEGW Tool.In Cust_service Model_ext Class all Association , association set and navigation links which are deleted are not phyical deleted it is just disabled . So Enable All the Deleted Association , association set and navigation links by coding ...
Problem 2:(Expand B/w Service and include service)
Before Redefining Gateway Service Cust_service , If I am relate Po (Extend_service) and alerts (Include_service) using expand parameter it throws an exception saying Entity not found....
(Error in Expand) URL: http://XXXXXXXXXXX/sap/opu/odata/sap/Extend_service/POs?$expand=Alerts
but Direct navigation through PO Works : http://XXXXXXXXXXX/sap/opu/odata/sap/Extend_service/POs/Alerts
Problem 3: ( Cust_service Date Format )
Once Cust_service is gerenated . Entities Containing Date , Change its Date Data type to Packed Number .Because of this any Request containing Date Throws an Error .
In Above Example ,
Check PO Entity attribute docDate in Extend_service and Cust_service
Problem 4: (cust_service expand )
URL : http://XXXXXXXXXXX/sap/opu/odata/sap/Extend_service/POs?$expand=POItems
In Get_expanded_entity Method For cust_service DPC_EXT
PO Structure is referring the Extend_service not the Cust_service PO beause of this i am not able to add data to addition attribute which is added in cust_service for PO Entity .
If any doubt .. plz message me
Regards,
Jibin Joy