on 02-07-2018 3:45 PM
Hi Experts,
I am trying to create a OData service for retrieving salesorder Details.
However, I am not able to rectify the error "Resource not found for Segment 'XXXXXXX' .
The Metadata is getting loaded correctly .I have done the necessary coding in GET_ENTITY as well. I am specifying salesdocument Number in the URI as well. But still I am not able to figure it out.
i tried below both but no use.
http://<hostname>:<port>/sap/opu/odata/sap/ZGW_SALES_SRV/sales_orderSet(Salesdocument='1')
http://<hostname>:<port>/sap/opu/odata/sap/ZGW_SALES_SRV/sales_orderSet('Salesdocument'='1')
Please help me.
xml version.
<?xml version="1.0" encoding="UTF-8"?> -<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code>/IWBEP/CM_MGW_RT/020</code> <message xml:lang="en">Resource not found for segment 'sales_order'.</message> -<innererror> -<application> <component_id/> <service_namespace>/SAP/</service_namespace> <service_id>ZGW_SALES_SRV</service_id> <service_version>0001</service_version> </application> <transactionid>F80B44E8584F0080E005A55871D32B40</transactionid> <timestamp/> -<Error_Resolution> <SAP_Transaction/> <SAP_Note>See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)</SAP_Note> </Error_Resolution> -<errordetails> -<errordetail> <code>/IWBEP/CX_MGW_BUSI_EXCEPTION</code> <message>Resource not found for segment 'sales_order'</message> <propertyref/> <severity>error</severity> <target/> </errordetail> </errordetails> </innererror> </error>
Best Regards,
Karanam
metadata please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see that second URL is not correct for you, however first one is correct.
/sap/opu/odata/sap/ZGW_SALES_SRV/sales_orderSet(Salesdocument='1')
This error generally means, you don’t have record existing in system for your query.
Check on below points-
1. do you have record existing for sales document = 1
2. have you used conversion exist correctly, preceding zero's maybe causing this issue.
3. Try to put correct sales document number with required zeros
4. debug in corresponding get entity method, and check where it is failing.
Regards,
Tarun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the name of the entity and Property for any typo mistakes (Case sensitive).
Go to service maintenance transaction and do the refresh catalog and load the metadata after any changes.
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.