Skip to Content
-2

Service Builder: OData Nullable Indicator

Dec 11, 2017 at 08:35 PM

167

avatar image

Hi Experts,

I have set the OData nullable indicator for ABC Indicator in Material Master(Data Element :MAABC). But in the gateway client it is not showing the field value as 'NULL', is it because the field is a character field, what is the standard practise on setting nullable property.

Thank you for the help.

SE11

abcindicator MAABC CHAR(1)

SEGW

abcIndicator Edm.String Max-1 Nullable-True

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Rubin Luke Dec 19, 2017 at 12:47 AM
0

Hi Arjun,

Thank you for the response, actually my query was why I am not able to get 'null' value for edm.String. Please find below the screenshots.

Regards,

Rubin

error.jpg


error.jpg (72.7 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Marking a property as null will force it to derive intial value from its corresponding ABAP type. For Edm.String which maps to string its initial value is empty string hence you are seeing as "" which is correct.

0

Thank you Ankit for the comment, could you please clarify the below doubt also? Why is it behaving differently with a Edm.String and Edm.Date. When I set a Edm.Date field to NULLABLE, in the gateway client I can see 'NULL', whereas it is not the same for Edm.String.

Please see the attachment in the above message.

Thanks in advance.

0

Hi Rubin,

It's beacuse Edm.DateTime intrinsically maps to DATS data type of ABAP Dictionary whose initial value is 00000000.

reference - https://help.sap.com/saphelp_gateway20sp12/helpdata/en/76/4a837928fa4751ab6e0a50a2a4a56b/frameset.htm

0
Arjun Biswas Dec 18, 2017 at 09:48 AM
0

Hi Rubin Luke,

To get null from OData, you have to make the field null, similar to the image.

Hope this helps,

Regards,

Arjun Biswas


dou1.png (34.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
nageswararao gudiseva Feb 27 at 11:14 AM
0

Hello Arjun Biswas,

I have created a project in SEGW . When i execute this service it gives status as "500 Internal Server Error" . I'm having many date fields in that so I have made those date fields as nullable. But still the issue was not resolved.After checking that field as nullable I have loaded the metadata but there in that property name I have not seen the property like Nullable = "true" .But the other fields having the nullable as false. But it was not showing for the field which I have checked as nullable. I have cleared the cache in both the systems but still the issue is going on. Can anyone help me out to resolve the issue.

Kind Regards,

Nageswara Rao

Share
10 |10000 characters needed characters left characters exceeded