Application Development 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: 

Problem when accesing a table after modifying it

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

4 REPLIES 4

Former Member
0 Kudos

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.

Former Member
0 Kudos

hi Munoz,

try with <b>is initial</b>

Former Member
0 Kudos

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

0 Kudos

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