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

Native SQL buffering

NigelJames180
Active Contributor
0 Likes
588

Hi We are doing some native sql in EXEC SQL ENDEXEC statments to get information from a non SAP source to import into SAP.

Problem is it seems to be buffered in some way. After deleting a record from the oracle windows client and rerunning the ABAP program it picks up data that was just deleted. Is there anyway to select without using any buffers or cache that oracle might be using?

Also a native delete seems to not work. Do we need to do a exec sql. commit work. endexec. ?

Thanks in advance,

Nigel

4 REPLIES 4
Read only

Former Member
0 Likes
559

If you are using ABAP SELECT statement, then you have an option 'BYPASSING BUFFER'. See the example below from help.


DATA: WA_SPPROD TYPE SPPROD. 

SELECT * FROM SPPROD INTO WA_SPPROD BYPASSING BUFFER 
         WHERE PRODUCER = 'BOE'. 
  WRITE: / WA_SPPROD-STREET, WA_SPPROD-NUMB, WA_SPPROD-POSTCODE, 
           WA_SPPROD-CITY, WA_SPPROD-COUNTRY. 
ENDSELECT.

Regards,

Srinivas

Read only

0 Likes
559

Sorry this did not answer the question. I was asking about NATIVE SQL. As in...

EXEC SQL.

<insert db spefic code here>

ENDEXEC.

regards,

Nigel

Read only

0 Likes
559

I thought your DELETE is in EXEC SQL whereas your SELECT in the ABAP program uses normal ABAP SELECT statement. Is that not correct? Why are you using native SQl for both DELETE and SELECT? Is your table a non-SAP table?

If that is the case then may be COMMIT is what is missing. I don't know if ORACLE also has some kind of buffering.

Srinivas

Read only

0 Likes
559

It turns out that a commit was what was missing.