Skip to Content
0
Former Member
Dec 11, 2008 at 12:05 PM

Rollback BAPI in BADI ME_PROCESS_PO_CUST

81 Views

hi guys,

I used BADI ME_PROCESS_PO_CUST to implement a code before saving the purchase order (Method POST).

This code contains a BAPI to create a delivery BAPI_OUTB_DELIVERY_CREATENOREF. If this BAPI fails (this is when Return parameter contains 'E' message), I execute function BAPI_TRANSACTION_ROLLBACK.

Guess what is happening?

There is no purchase order created even when screen shows message "Standard PO created under the number 45#######".

What do I want to do?

- Rollback the bapi executed and let the system continue saving the purchase order.

- If possible show a message to the user that there is an error, but command MESSAGE doesn't seem to work in this BADI

Could you share your insights with this wannabe-abapper?

PD: it says in documentation that it is required ABAP OO to implement this BADI and I think I used it correctly for gathering all data I needed. But I just don't understand why MESSAGE statement and FM POPUP_TO_CONFIRM don't work.