on 10-11-2013 5:56 AM
Hello Experts,
In order to handle the 'date filed' i have used 'Edm Core Type' as 'Edm.DateTime' as shown below.
In the 'ABAP Type Editor' i have used '/BI0/OIDATE' as type which is provided by Gateway itself.
When backend returns the date filed with values ( for example '20130303' ) my service is not dumping and is working fine as shown below.
I am facing the below issues.
Issues :
1. I am getting the below error when the backend returns the date filed with value '00000000'.
2. I am getting the same above error when date filed is ' ' .
Kindly suggest solution for the above issue and guide if anything is wrong.
Immediately help is very much appreciated as i have already spent much time on this
Regards,
Ashwin
Hi Ashwin,
The problem lies in your model.
You need to mark you date field as nullable in the model.you can do this by checking the nullable checkbox for the property. You are getting this error as you have mentioned a field as not nullable and passing null value into it.
Regards,
Atanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi both,
I had this same issue yesterday, with somebody else's model. I changed to date=nullable expecting that to fix it - it didn't!
The reason for this is that the actual data coming back from the feed had spaces in the date - I still don't know why the SAP kernel allows this as it's not a valid content type.
The ABAP test for "initial" equivalence will only respond true for '00000000', spaces are not considered initial!
The OData parser has a piece of code that checks for initial, and if the date value is space it will still fail as the improper initial value detection sends it down the wrong conversion path.
The only way around this is to make sure your date field has some valid content, either '00000000' or a proper date.
Regards
Ron.
Hi,
You are going to get entity data, after getting record your date field contain no value so you need to make your date field nullable.
Thank you.
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.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.