cancel
Showing results for 
Search instead for 
Did you mean: 

Service Builder: OData Nullable Indicator

rubin_luke3
Participant

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

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member516822
Discoverer

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

rubin_luke3
Participant
0 Kudos

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

former_member185414
Active Contributor
0 Kudos

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.

rubin_luke3
Participant

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.

former_member185414
Active Contributor
0 Kudos

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.ht...

former_member484715
Contributor
0 Kudos

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