07-09-2018 8:03 AM
Hello,
i want to select from Table but021_fs (the business partner adress usage). I want to filter for the field "valid_to" which is DEC15.
I always get error messages.
If i use
where but021_fs.valid_to = '99991231235959' I get an data type conflict error
where but021_fs.valid_to = 99991231235959 I get an error with 4-Byte-Integer error
where but021_fs.valid_to = '99.991.231.235.959' I get an data type conflict error
and but021_fs.valid_to = 99991231235959.0 I get an error that the value is too big.
So, how to correctly make this statement?
Thanks for your help
07-09-2018 8:55 AM
07-09-2018 9:09 AM
Value of literal (-)099991231235959 is greater than a 4-Byte-Integer is the error.
07-09-2018 10:49 AM
08-31-2018 3:47 PM
I opened a ticket at SAP. They said it is a bug and will be fixed in a later release....
09-02-2018 8:14 AM
What is your SAP release ? Can your share with us the SAP message ?
09-11-2018 1:14 PM
Dear customer,
for the time being, all numerical literals in CDS conditions are processed via an intermediary 4-byte integer representation,
leading to an error on overflow. This applies to releases up to and including SAP_BASIS 7.50.
At this point, I can not make a statement if and/or when this will change. Inquiry with development is pending.
02-14-2019 4:57 PM
Johannes, is there an update to this issue? I'm also experiencing this issue regarding data types in CDS views and need a solution. Please share with us the SAP ticket information that you mentioned back on your August 31 post: "I opened a ticket at SAP. They said it is a bug and will be fixed in a later release....". We would like to reference that when we submit our own ticket.
Thanks
02-15-2019 9:54 AM
Hi,
just for you info - I have a 7.50 sp1, in this release it works correct.
lg
07-08-2019 4:30 PM
Fine that it's working with 7.50 sp1, but what to do if we dont have yet this release ? will this bugfix be shipped as a separate note ?
07-08-2019 5:14 PM
Here is the ugly workaround for "old" releases: just use an good old dictionary database view on BUT021_FS with a selection condition "BUT021_FS VALID_TO EQ 99991231235959 " ...
07-17-2020 1:34 PM
Hi,
just use
<table>.valto = + 99991231235959
Works fine for me; you just need to put the sign in front.
Now for creation of a timestamp like
cast( 99991231235959 as abap.dec( 15, 0 ) )
that's a different story.
Regards,
Matthias