0

I am using Badi MD_PLDORD_POST when I delete an order using transaction MF50.

I want to retrieve data that is not available in the parameters of the IF_EX_MD_PLDORD_POST~POST_AFTER_SAVE_MAN method.

I tried using BYPASSING BUFFER:

SELECT SINGLE plnum
      FROM plaf
      INTO @DATA(lv_plnum)
      BYPASSING BUFFER
      WHERE plnum = @im_plaf_new-plnum.

It does not find any data, but if I but a break on the select and check the data in SE11, table PLAF - the entry is there.

This select works when the order is being created or edited, so it is not a conversion problem.

Is it impossible the get the data at this point (if so, then why is the data still visible in SE11 at that point ?) , or am I using the BYPASSING BUFFER wrong ?

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
Ovidiu Pocnet
  • 579
  • 12
  • 32
  • 1
    `AFTER_SAVE_` doesn't mean it had been committed, so you are using BYPASSING BUFFER wrong. You should use simple SELECT here, check also this https://stackoverflow.com/questions/49429331/reading-original-before-change-db-values-in-the-current-luw – Suncatcher Jul 19 '22 at 16:46
  • Using 'CONNECTION r/3*my_conn' in the select statement worked ! (I also removed BYPASSING BUFFER from the statement) – Ovidiu Pocnet Jul 20 '22 at 09:10
  • so post this as answer pls – Suncatcher Jul 20 '22 at 09:11

1 Answers1

0

Using CONNECTION r/3*my_conn in the select statement worked!

I also removed BYPASSING BUFFER from the statement:

SELECT SINGLE plnum
      FROM plaf
      INTO @DATA(lv_plnum)
      CONNECTION r/3*my_conn
      WHERE plnum = @im_plaf_new-plnum.
Ovidiu Pocnet
  • 579
  • 12
  • 32