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

How to get table record from memory before commit (after update)?

Former Member
0 Likes
3,819

Hello,

does anybody know how to get table record from memory before commit (after update)?

I'm developing an user exit. In this user exit I can't do simple select command to a table becouse last record (i'm interested in this record) isn't commited to the table. So, update command to the table is proceeded, but commit command isn't. I can't simple do commit command becouse possible inconsitences may occur. So, what I would like is to get this table record from memory.

Can anybody help me?

Best regards,

Josef Motl

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,304

Hi Josef,

In general, the information that isn't yet commited will still be avialble in the Global Structures, Fpr example in sales order exits, the header data that isn't commited will be in XVBAK and item data in XVBAP.

Look for similar structures in your user exit as well.

REgards,

Ravi

11 REPLIES 11
Read only

Former Member
0 Likes
2,305

Hi Josef,

In general, the information that isn't yet commited will still be avialble in the Global Structures, Fpr example in sales order exits, the header data that isn't commited will be in XVBAK and item data in XVBAP.

Look for similar structures in your user exit as well.

REgards,

Ravi

Read only

0 Likes
2,304

Hi Ravi,

Thank you for your reply. Structures in my case is however empy.

Regards,

Josef

Read only

0 Likes
2,304

Hi Ravi,

Thank you for your reply. Structures in my case is however empty.

Regards,

Josef

Read only

Former Member
0 Likes
2,304

HI..

The SELECT statement bypasses the buffer when you use any of the following:

The BYPASSING BUFFER addition in the FROM clause

The DISTINCT addition in the SELECT clause

Aggregate expressions in the SELECT clause

Joins in the FROM clause

The IS NULL condition in the WHERE clause

Subqueries in the WHERE clause

The ORDER BY clause

The GROUP BY clause

<b>The FOR UPDATE addition</b>

So..buffer dbase table...

<b>Buffer Tables on the Application Server</b>

You can considerably reduce the time required to access data by buffering it in the application server table buffer. Reading a single entry from table T001 can take between 8 and 600 milliseconds, while reading it from the table buffer takes 0.2 - 1 milliseconds.

Whether a table can be buffered or not depends its technical attributes in the ABAP Dictionary. There are three buffering types:

<b>Resident buffering</b> (100%) The first time the table is accessed, its entire contents are loaded in the table buffer.

<b>Generic buffering</b> In this case, you need to specify a generic key (some of the key fields) in the technical settings of the table in the ABAP Dictionary. The table contents are then divided into generic areas. When you access data with one of the generic keys, the whole generic area is loaded into the table buffer. Client-specific tables are often buffered generically by client.

<b>Partial buffering</b> (single entry) Only single entries are read from the database and stored in the table buffer.

read this if helps..

Read only

0 Likes
2,304

Hi Rammohan,

thanks for your replay. The regarding table is proprietary SAP table, so I can't change buffering.

Best regards,

Josef

Read only

0 Likes
2,304

Hi Josef,

Can you tell us which exit are you working in(and Which transaction)?

Regards,

Ravi

Read only

0 Likes
2,304

Hi Ravi,

transaction: vf01

user exit: V05NZZRK

table: dfkkko

Regards,

Josef

Read only

0 Likes
2,304

Hi..Josef,

try like this:

1. while updating record into dbase...<b>store (save) the same record in Application

server or in your GUI</b> using open dataset..command.

2. when u want that record get it from APP server or GUI where u stored it.

hope this will helps a bit..

Read only

0 Likes
2,304

Hi Rammohan,

thanks for your reply. However, I can't put my own code to where the table is updating.

What I really want is to get record from memory.

Regards,

Josef

Read only

0 Likes
2,304

Hi,

You can do this thing by passing all the data to the memory location as

  • Export data.

EXPORT l_doc_info FROM l_doc_info

TO SHARED BUFFER indx(st) FROM wa_indx ID indxkey.

after commit the data from the buffer can be picked up by

IMPORT l_doc_info = l_doc_info

FROM SHARED BUFFER indx(st) ID indxkey TO wa_indx.

So you can got all the data.

Cheers

Lincon

Read only

0 Likes
2,304

Hi Lincon,

thanks for your reply. However, I can't put my own code to where the table is updating becouse of restricted access.

What I really want is to get not-yet-commited record from memory.

Regards,

Josef