‎2007 Feb 27 5:17 PM
I have added a new field FIELD_1 (domain CHAR10) to a already existing Z table, recreated the "Table Maintenance Generator" and transported the table to Test server. Test data exists on test server with some records having FIELD_1 populated and others having FIELD_1 blank.
However, Data Browser (SE16) selects no records for FIELD_1 = ___________ (Blank Box). The reson being, the already existing records are initialized with NULL value. Is there any solution for this?
One solution to this problem could be to fire the following DML statement:
UPDATE ZDODATA SET FIELD_1 = ' ' WHERE FIELD_1 IS NULL.
However, does this mean that everytime you add a column(s) to an already existing Z table, you have to fire an UPDATE statement to ensure proper selection of data through Data browser (SE16)?
‎2007 Feb 28 8:14 AM
hey hii
for char fields NULL value is SPACE only. But when u add new column, the VALUE in tht column is INITIAL NOT NULL. This is general rule in any devlopment when anything's get created it is used to INITIAL until unless u don't process it.
Rest please be assure
hope this wll help
Thanks
Ashwani
‎2007 Feb 27 5:27 PM
Hi,
I am not sure what exactly your requirement is..
if you want to see the blank records in SE16..
Place the cursor in the field FIELD_1..
Press F2..
Choose the equal to option..
Now press F8..
You will get the records which has blank values..
Thanks,
Naren
‎2007 Feb 28 5:05 AM
Hi Naren,
That exactly is my problem. I have tried to select records by selecting "equal to option" on field Field_1. However, no records are fetched inspite of the fact that many such records exists.
Regards,
Anoop
‎2007 Feb 27 5:30 PM
did you run reorg for the table ? you can check with DBA folks if they can just update all records in this table which have NULL in your field with space.
As an option (if there are not too many entries in this table) you can select all data in SM30, sort by your field, select your entries with empty field & save ... hopefully it updates all these entries with space.
‎2007 Feb 28 5:09 AM
Hi Siarhei,
Sure, i can do that. But, does this mean that everytime you add a column(s) to an existing Z table, you have to fire an UPDATE statement to ensure proper selection of data through Data browser (SE16)?
‎2007 Feb 28 8:14 AM
hey hii
for char fields NULL value is SPACE only. But when u add new column, the VALUE in tht column is INITIAL NOT NULL. This is general rule in any devlopment when anything's get created it is used to INITIAL until unless u don't process it.
Rest please be assure
hope this wll help
Thanks
Ashwani
‎2007 Mar 08 5:19 AM
‎2007 Mar 01 12:16 PM
I am not sure if it will be helpful in your case but there is a tcode SE14 (Utility for Database Tables). It helps to adjust database after maintaining a table. Just choose your table and use "Enter" button. Then use "Activate and adjust database" button with option "Save data".
Regards,
Renata