cancel
Showing results for 
Search instead for 
Did you mean: 

Resource not found for Segment 'XXXXXXX'

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member185414
Active Contributor
0 Kudos

metadata please

JyotiD
Active Participant
0 Kudos

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

Karthik_Gali
Participant
0 Kudos

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.