SELECT with BYPASSING BUFFER in SAP ABAP

How to bypass buffer in SAP Select statements ? Bypassing buffer in SAP select statements

+ -

Whenever we use open SQL statements to get fetch data in SAP, it will get data from buffer area(depends on table buffer settings) for better performance, but in real world scenarios some tables may updated very frequently(milliseconds), we may need to bypass buffer to get real-time data, in that case we will bypass buffer using 'BYPASSING BUFFER' keyword.

Syntax for SELECT WITH BYPASSING BUFFER in SAP ABAP

select * FROM  INTO TABLE  BYPASSING BUFFER.

Example for SELECT WITH BYPASSING BUFFER in SAP ABAP

The below example is used to fetch data from MARA(Material Master) table bypassing buffer.

TYPES: BEGIN OF ty_mara,
         matnr TYPE mara-matnr,
         mtart TYPE mara-mtart,
       END OF ty_mara.
DATA: it_mara TYPE TABLE OF ty_mara,
      wa_mara TYPE          ty_mara.

START-OF-SELECTION.
  SELECT matnr mtart FROM mara INTO TABLE it_mara BYPASSING BUFFER.

  LOOP AT it_mara INTO wa_mara.
    WRITE:/ wa_mara-matnr, wa_mara-mtart.
  ENDLOOP.

Learner Questions


No Questions by learners, be first one to ask ..!!

    Please Sign in to ask a question

    Was this lesson helpful to you? Yes No 9 People out of 9 think this lesson helpful


    Lesson Navigation

    ←Previous Chapter
    Next Lesson → Selection Screen Design using SAP ABAP