Work in debugger but no run time
I am trying to validate the processed document in document flow. For whatever the reason. When I am using debugger. it works just fine. But when it run in real time nothing pops up. What am I doing wrong?
settlein = ''.
SELECT VBELN FROM VBFA into settlein UP TO 1 ROWS where VBELV = INVOICEDOCUMENT.
IF sy-subrc eq 0.
RETURNS-MESSAGE_V1 = settlein.
Do something else
When you call BAPI_TRANSACTION_COMMIT after the bapi call, set WAIT = 'X' and see if this helps.