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

Select statement is fetching previous data

Former Member
0 Likes
1,809

Hi,

I am modifying records in a ztable through a program.

records were successfully modified in the ZTABLE.

through the same program i tried to fetch the data from the same ZTABLE

but its deriving the old records only, tough table is showing updated records.

with the doubt of whether still in the buffer, i used the RollBack statement also,

still i am getting the old table data only.

In table techincal settings

Buffering not allowed option was selected,

tough its deriving old table entries only.

Thanks,

Phani.

8 REPLIES 8
Read only

former_member188724
Contributor
0 Likes
1,577

Hi,

You say its updated. Maybe you are not clearing the work area when you are fetching the data after updation.

Hope this helps you.

Regards,

K.S

Read only

paul_bakker2
Active Contributor
0 Likes
1,577

Hi,

Did you do a 'commit work' after updating?

cheers

Paul B

Read only

yogendra_bhaskar
Contributor
0 Likes
1,577

Hi Satya ,

Use commit work after modifying the ztable.

Regards

Yogendra Bhaskar

Read only

0 Likes
1,577

Hi

Before select i already using refresh

and after update i am using commit work also,

Don't understand why its fetching previous data.

Thanks,

Phani

Read only

0 Likes
1,577

Hi Satya,

Check the conditions on basis of which you are selecting the records from Z table.

Might be the updated records in Z table not satisfying the conditions used to fetch the data.

Thanks & Regards,

Swati

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,577

Could you use FM DB_COMMIT (or statement COMMIT WORK, WAIT option not required here) and reload data using a BYPASSING BUFFER option in the SELECT statement.

If data is once again not refreshed, there the database manager has not yet committed in time data, so you may be required to use a FOR UPDATE option (BYPASSING BUFFER will be no longer required as it will be implicit) to insure that, but you will have to catch error (sy-subrc = 😎 and retry.

Regards,

Raymond

Read only

0 Likes
1,577

Hi,

Thanks for your time and inputs.

I did a small mistake, now i corrected its working fine.

Thanks,

Phani.

Read only

0 Likes
1,577

Great! Please close the thread.

cheers

Paul