Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom Table - New Field

Former Member
0 Likes
1,279

Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?

1 ACCEPTED SOLUTION
Read only

christine_evans
Active Contributor
0 Likes
1,241

>

> Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?

Are you sure that SPART = SPACE? I've noticed before that when you add a new character field to an existing table that already contains records, the default value for the new field on the existing records is NULL and not SPACE. Try replacing the = SPACE with IS NULL.

If this is the case, I think that if you update the record the default will then be changed from NULL to SPACE.

Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?

9 REPLIES 9
Read only

Former Member
0 Likes
1,241

What do you mean 'does not work'? Does it dump, give an error message, a return code??

Rob

Read only

0 Likes
1,241

The query does not return a record when there are many records with SPART = SPACE

Read only

0 Likes
1,241

What does the data look like in SE16?

Rob

Read only

0 Likes
1,241

Hi,

Share the Query Please....

Read only

Former Member
0 Likes
1,241

Hi sridhar,

Chek if there is any data for SPART in your custom table in Q system...

-Goodluck,

Bhumika

Read only

christine_evans
Active Contributor
0 Likes
1,242

>

> Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?

Are you sure that SPART = SPACE? I've noticed before that when you add a new character field to an existing table that already contains records, the default value for the new field on the existing records is NULL and not SPACE. Try replacing the = SPACE with IS NULL.

If this is the case, I think that if you update the record the default will then be changed from NULL to SPACE.

Read only

0 Likes
1,241

Hi Christine.. You have understood the problem perfectly... Thank you .. I have even tried with NULL, even that does not work, I mean it does not retrieve the record...Is it by any chance dependent on the database ? We are using Oracle... Just FYI... I have used the database utility and tried to adjust the table, I was hoping that would get in a space into SPART , even then no luck... Only way out that looked to me was getting the user to put a space into each of the record through SM30...

Read only

0 Likes
1,241

It won't work if you put the word NULL into SE16 but it will work if you put SPART IS NULL in a SQL statement in a program - I'm not sure which you are doing.

You can avoid this problem if you tick the Initial Values box when you create the field in SE11.

Read only

0 Likes
1,241

Thank You Christine...That I guess would solve my problem...