cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error log "Property 'begda' has invalid value '00000000'"

sudarshan_d29
Active Participant
21,343

Hi,

I got an error during consuming data at gateway client "Error log "Property 'begda' has invalid value '00000000'"".

I am exposing data from CDS view to odata service using "import->reference->data definition".

begda (last changed date) - data type is DATE and it has null value

If there is any specific annotation to make the date field null-able or correct the format, please let me know

Awaiting for you reply,

Sudarshan David

Accepted Solutions (1)

Accepted Solutions (1)

sudarshan_d29
Active Participant

Hi,

I've got the solution to avoid the error,

If data in table contain null value or ' ' we have to change the value to '00000000' in consumption CDS as below

case 
    when aedtm is null then '00000000'    
    when aedtm = '' then '00000000'     else aedtm 
end as aedtm,

why I am using reference to CDS because if any changes occurs in CDS or addition of field, we can do just add the field and regenerated the ODATA which makes less amount of work.

Thank you

EdwarSoto
Participant
0 Kudos

It Work for me, thank you!

In my case "CodOper" is type Guid, then initial value valid for this type is "00000000000000000000000000000000"

Then solution was:

key case
    when CodOper is null then '00000000000000000000000000000000'
    when CodOper = '' then '00000000000000000000000000000000'
    else CodOper
  end                         as CodOper,

Answers (2)

Answers (2)

shilpabasavaraj
Participant

Hi Sudarshan David,

In OData, the entity will have a property Nullable. Make it true(Check the checkbox) for begda. It will work.

Note: The Edm.DateTime fields should be mandatorily maintained as Nullable, unless its not a key field in the entity. Else you will face this issue.

Regards,

Shilpa B.

sudarshan_d29
Active Participant
0 Kudos

Hi Shilpa,

Yes we can make Nullable manually, I have created Odata using CDS reference though I am can't change the properties directly,

But I can add properties in CDS which will affect after regenerating,

For example: in CDS

Below code is working fine,

@Semantics.businessDate.from: true 
begda,<br>

and below code in not working,

@Semantics.businessDate.from: true 
key begda,
glauco
Active Contributor
0 Kudos

Thank you Sudarshan David.
I had same error here and you solution solved my issue.

FreddyTorresC
Discoverer
0 Kudos

Hi Shilpa,

Thanks, it's works.

Regards,

Freddy

MahmoudNasr
Explorer
0 Kudos
Thanks, it's works.
navepras
Explorer
0 Kudos

Hi sudarshan

When i add the below code in my CDS the date property is not changing to Nullable

can you please suggest any other way to achieve this