cancel
Showing results for 
Search instead for 
Did you mean: 

BDC not working in the background Job - ME9F

0 Kudos

Hi Guys ,

There is a old program ,In the they are first releasing a PO using BAPI (BAPI_PO_RELEASE),Then using a BDC (ME9F).

This BDC is perfectly working in front and perfectly working If I debug using JDBG, but not working in the background.

Throwing a error as "No suitable purchasing documents found". Please help me in this as its a urgent support work.

Thanks in advance.

FredericGirod
Active Contributor
0 Kudos

Did you try to set a SQL trace during the background run to check how the program select data from standard PO tables ?

View Entire Topic
0 Kudos

Thanks for the reply the issue is resolved.

Gave wait time 1 seconds after the BAPI.

raymond_giuseppi
Active Contributor

Did you first try to set the WAIT option in the COMMIT (BAPI_TRANSACTION_COMMIT) before adding a delay?

Sandra_Rossi
Active Contributor
0 Kudos

You have 2 solutions

  • WAIT UP TO 1 SECONDS.
  • CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'.

WAIT UP TO 1 SECONDS is the worst solution, because it loses time if the execution is fast and sometimes the asynchronous task will take more than 1 second so it may still fail in the end.

The second solution is the best one. Very few BAPI don't