‎2022 Mar 30 4:03 PM
Hello,
i have a VERY strange problem:
in a Z-Report i select a Y-Field (customer field) from SAP Standard table EQUI. The Y-field is part of an append-structure of the table with format DATS (date field).
SELECT SINGLE yyp57a INTO wa_itab-yyp57a FROM equi WHERE
equnr = lo_data-equnr.
The field equnr is the unique key of table EQUI.
So far so good: in most of the cases the value of the field yyp57a is catched correctly. In some cases the select brings EMPTY value of the field yyp57a. BUT in EQUI (when selecting it over SE16, etc....) the field has a correct value !
When i start the report again with the same selection the field yyp57a for the same key equnr is found, but then other records have no value. Sometimes ALL records are correct, so that looks like a "random" choice.
I have NO idea what can cause this problem 😞
br Martin
‎2022 Mar 30 8:29 PM
Hi Martin,
can you please also double check with old-fashioned T-Code SE17 how the data is (really) stored in the database without any output conversion and so on? I assume that the process that is putting the data into the table could sometimes insert values into this field that do not fit to the DATS format, e.g. invalid dates. In this case the transfer into the field of the corresponding type could not work.
Kind regards
Jens
‎2022 Mar 31 7:04 AM
Hello Jens,
thank you for your hint. I am very confused now 🙂
See SE17, the date is initial with 00.00.0000

See SE16, the date is filled with its real value of 09.04.2022 for the SAME EQUINR.

When i go back to selection screen in SE17 and select the equipment the value is displayed also correctly ! I cant do a third screenshot here 😞
How can this be ?
br Martin
‎2022 Mar 31 11:22 AM
Are you really sure that you have a look on the same EQUI-entry (also including the leading zeros)?
On the screenshot I cannot see this detail.
Which data elemet has been used for this field?
KR Jens
‎2022 Mar 30 9:23 PM
‎2022 Mar 31 7:25 AM
Could you check the SQL trace what table/view is actually used in the database?
Could you extract all EQUNR / YYP57A values using both ABAP SQL and Native SQL, and compare the values?
Could you check DB patches?
Could you check SAP notes?
‎2022 Mar 31 7:27 AM
if it is an oracle database, you could destroy & recreate the index
‎2022 Mar 31 7:41 AM
Hi,
I think the work area (or internal table) for that field is not refreshing properly .
(As you said sometimes fetch and sometimes not fetch so.)
‎2022 Mar 31 8:18 AM
‎2022 Mar 31 7:50 AM
‎2022 Mar 31 7:59 AM
sandra.rossi I am not sure what you mean with "check the SQL trace what table/view is actually used in the database" ??? I is about table EQUI as described, what else should i find in SQL trace ?
‎2022 Mar 31 8:17 AM
Thank you all for your help..........i am very desperate. In my 30 years working with SAP i have never seen such mystery 🙂
One more thing to mention: the table has about 270 fields, only 75 of it are standard fields, the rest are Z-fields in 4 include structures. Could this cause any problems ? Is there a limit of (z)-fields in a table ?

br Martin
‎2022 Mar 31 11:21 AM
No I don't think that there is a limitation of Z-fields in a Z-table...
Really strange.
‎2022 Mar 31 9:39 AM
martin.svik2 , I think Sandra would like to check in ST05, the explanation to check how SAP made the SELECT statement
‎2022 Mar 31 9:52 AM
‎2022 Mar 31 12:59 PM
What I mean -> see ABAP documentation concerning Replacement Objects: "A CDS view can be assigned (using the name of its CDS entity) as a replacement object to a transparent database table and to a classic database view in ABAP Dictionary".
Just do an SQL trace. It takes less time than replying "why".
‎2022 Mar 31 1:00 PM
And also here: "Open SQL accesses the CDS view instead of the table itself"
‎2022 Mar 31 1:10 PM
here: "Using Extras -> Proxy Object in SE11 you can find out whether a CDS view is replacing a database table"