03-29-2006 9:48 AM
Hi All!
We have a extrange problem in a table acess. On a non standard table we have added a new field (vbeln) and after that we have executed TRX SE14 for activate and adjust the data on this table. Regarding this modification, we have change a program that make an access to this table, we need to retrieve data which have this field (vbeln) initial. If we use condition "vbeln = space" on the select clause, it retrieves only data created after the modification but not data previous to the table modification. On the other hand if we use condition "vbeln IS NULL", data previous to the modification is retrieved but not data created afer it.
Anybody knows the reason for this rare behavior?
Thanks and regards
03-29-2006 9:59 AM
Hi munoz,
1. thats true.
2. initially, when the field was not there,
not it contains NULL,
3. after adding the field,
and after adding records to it,
it contains SPACE.
4. what u will have to do is
generate one temporary Z program,
and update this field,
to SPACE,
(whereever it contains SPACE or null)
regards,
amit m.
03-29-2006 9:59 AM
Hi munoz,
1. thats true.
2. initially, when the field was not there,
not it contains NULL,
3. after adding the field,
and after adding records to it,
it contains SPACE.
4. what u will have to do is
generate one temporary Z program,
and update this field,
to SPACE,
(whereever it contains SPACE or null)
regards,
amit m.
03-29-2006 10:00 AM
03-29-2006 10:03 AM
Hi,
It is peobably because before adding the field, the pointer which is assigned to this field will yield NULL value. but after adding this field it will have a pointer to this field but the value is initial and hence the records will be fetched if it is equqted to space.
If you want to retrieve all the data where vbeln is initial, you will have to use both IS NULL and SPACE in WHERE clause or if possible delete the old data and recreate it.
Regards,
Shashank
03-29-2006 10:14 AM
Hi!
Thanks a lot!!
For Sekhar: INITIAL is not allowed with IS operator on a SELECT CLAUSE (SAP 4.6C).
For Shashank Deshpande, I have use the solution given by Amit Mittal , but thanks.
Special thanks to Amit.
I only wanted to known if this behaviour is correct.
Regards