‎2012 Apr 24 6:20 PM
Hi;
We are running in background the bapi "BAPI_SALESORDER_CREATEFROMDAT2" and is working ok, it creates the delivery. In tcode VL02N i've added a BADI implementation for SAVE BUTTON to save the items in a Z Table and it does ok.
My question is about the bapi, the bapi is running ok and the delivery is created but the badi for save button is not running, it seems not to be called, but if i run VL02N the badi works ok.
Any help.
Thanks on advance
David Fúnez
Tegucigalpa, Honduras
‎2012 Apr 24 6:41 PM
Does BAPI_SALESORDER_CREATEFROMDAT2 create Delivery or Sales Order?
‎2012 Apr 24 7:03 PM
yes it creates the delivery, but not trigger the badi for SAVE BUTTON
‎2012 Apr 24 7:07 PM
It's not triggering SAVE BUTTON, because probably Delivery is created via a Function Module inside BAPI. I don't think BAPI calls VL01N / VL02N transactions.
So I think you need to find a spot (enhancement, user-exit, etc) in BAPI to do same thing whatever you did for SAVE BUTTON.
‎2012 Apr 24 11:13 PM
I can also recommend you to create a reusable object (either function module or class-method) for "save the items in a Z Table", then you can call it from both SAVE BUTTON and BAPI.