on 07-15-2015 11:32 AM
Hi Experts,
I am trying to create a OData service for retrieving Purchase order Header and Item Details.
However, I am not able to rectify the error "Resource not found for Segment 'XXXXXXX' "
I have checked other discussion forums and used transactions /IWFND/CACHE_CLEANUP to clean up the cache as wel and also used
/IWFND/MAINT_SERVICEl to refresh catalog and generate metadata document again.
The Metadata is getting loaded correctly .I have done the necessary coding in GET_ENTITY as well. I am specifying PO Number in the URI as well. But still I am not able to figure it out
Please help me.
Best Regards,
Lakshman
Hello Lakshman,
You are trying to send something which is not defined in the GW model and hence the error is coming.
Parameters which you pass in the URL are Case Sensitive. If property 'Name' is defined in GW Model in the URl you need to pass as 'Name' only and not as 'NAME' or 'name'.
Correct ->
/<Service_Name>/<Entity_Set_Name>(Name='XXXX')
Wrong ->
/<Service_Name>/<Entity_Set_Name>(name='XXXX')
/<Service_Name>/<Entity_Set_Name>(NAME='XXXX')
Please check this.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ashwin,
Problem got resolved . It's purely mistake from my side.
In GET_ENTITY method , I have used IO_TECH_REQUEST_CONTEXT->GET_KEYS( ) to get the respective PO Number from URI. But mistakenly , I haven't used the READ statement correctly
I thought that we should use PoNumber as KEY while reading the table , Hence used as below
read table rt_keys into rs_keys with key name = 'PO_NUMBER'
The Context is filled based on fieldNames and Not on Property Names
I have created DataModel using BAPI stuructures, but I haven't expected this behaviour
I tried external debugging , but it didn't worked for so long,
But hasn't expected that correct statement should like below.
read table rt_keys into rs_keys with key name = 'PO_NUMBER'.
Anyways Thanks for helping me out, I apologize for wasting your time.
Best Regards,
Lakshman.
Hi Srini,
There are few points to be checked if this error was encountered.
1. Entity Set Name, Navigation Property Names are Case Sensitive so we should be more
careful when we are building URL.
2. URL Should be checked Twice with respective to Entity Sets names.
Regards
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.