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: 

BAPISDORDER_GETDETAILEDLIST not synchronised

Former Member
0 Kudos
851

Hello everyone

I am using BAPISDORDER_GETDETAILEDLIST to retrieve the sales order data. It is generally working fine.

BUT, when some one is changing a sales order and I am using the BAPISDORDER_GETDETAILEDLIST to retrieve the data, I am getting the old data not the one that has just been saved.

I need to wait several seconds (20 to 30 seconds) to have the updated data.

Is there any way to specify to BAPISDORDER_GETDETAILEDLIST to take the latest information?

That problem doesn't exist when using tcode va02. If some one is making a change and someone else is using tcode va02 right a way after the save, the data is correct.

Any suggestions?

Regards

dstj

8 REPLIES 8

mvoros
Active Contributor
0 Kudos
188

Hi,

Sometimes it's really a good idea to have a look at BAPI interface as well as code. That BAPI has a parameter I_MEMORY_READ. Here is also a comment from the beginning of BAPI.


* Werte für I_MEMORY_READ:
*  SPACE = zuerst Pufferzugriff, dann DB-Zugriff
*  'A'   = nur Datenbankzugriff
*  'B'   = nur Pufferzugriff

It's not that hard to guess what it does mean even if you don't speak German. By default BAPI uses cache and then DB.

Cheers

Former Member
0 Kudos
188

Hello Martin

The parameter I_MEMORY_READ is an optional one.

Even than, if we are assigning it to space, as mentioned, that doesn't change the result.

Based on my understanding, SPACE is refering first to memory then DB.

We are still facing delay between the sales order save ending process and the result of the BAPI.

I was wondering if there were a problem with the BAPI.

Regards

dstj

mvoros
Active Contributor
0 Kudos
188

Hi,

no, it's written in that comment.

  • SPACE = zuerst Pufferzugriff, dann DB-Zugriff

this line means SPACE = first buffer, then DB. So you need to set it to A if you don't want to use buffer. I don't understand your comment regarding optional. This parameter can be used to modify behavior of this BAPI. As it's written in the comment by default it goes to buffer first (which makes sense).

Cheers

Former Member
0 Kudos
188

Hello Martin

Based on your comment, I am probably misunderstanding the values.

Please confirm if I understand properly or not.

SPACE = First look if the latest information is already in the buffer, if there is nothing in the buffer look to the DB

A = Look into the DB only. So if the latest information is in buffer, because the update is not yet processed, the DB is containing old data

B = Look only in the buffer. Return nothing if there are no data in the buffer.

Is my undestanding is right?

Regards

dstj

mvoros
Active Contributor
0 Kudos
188

Hi,

it should be as you stated but I haven't tested it.

Cheers

Former Member
0 Kudos
188

Hello Martin

If I am right, I tested with the parameter I_MEMORY_READ = ' ' and it doesn't work like I expected.

Even if the data is in the buffer, it seams not to return the latest information.

I will have to test with the other parameters.

I let you know my result.

Regards

dstj

mvoros
Active Contributor
0 Kudos
188

Hi,

just small comment. Omitting parameter I_MEMORY_READ and setting I_MEMORY_READ to blank is equal. You need to test it with I_MEMORY_READ = 'A'.

Cheers

mauriciolauffer
Product and Topic Expert
Product and Topic Expert
0 Kudos
188

Hello, Daniel.

You is right!

For parameter I_MEMORY_READ:

SPACE = first access buffer, after access SD tables in DB

A = access only tables in the DB

B = access only tables in the buffer