What is the reason why we shoudnt use asked 03 Apr '12, 08:39 bobby |
The concept of the BAPI is that actions inside the BAPI should not trigger commit and the programmer after calling one or many BAPIs should call Using call transaction creates a new LUW that will not be under the commit control of the original LUW and that is why it cannot be used in BAPIs. You can read the detailed explanation in this help page. answered 03 Apr '12, 18:02 pedrolima ♦♦ Thanks for the response. :)
(04 Apr '12, 10:14)
bobby
hey could you tell me why we have to create custom structures when creating a bapi and why we pass the values as 'pass by value'. And why an explicit commit is required in a bapi,what happens when an implicit commit occurs.Thanks.
(08 Apr '12, 06:18)
bobby
I don't know about the custom structures (does it give an error when re-using structures from the dictionary?). The pass by value is needed because the BAPI is expected to work when called from different systems, and pass by reference cannot work in remote calls. When a implicit commit happens the problem is that if the program calling the BAPI tries to do a rollback, some parts may be rollbacked but other parts were committed (aka big mess).
(09 Apr '12, 18:48)
pedrolima ♦♦
1
WHY DO WE NEED CUSTOM STRUCTURES: Once any Bapi is realeased the structures it is using gets freezed to the bapi, the structure becomes specific to the Bapi, we can not make any changes over there. That is why we need custom structure for creating a custom bapi. I found this over at: http://scn.sap.com/thread/1225777
(10 Apr '12, 08:21)
bobby
Makes sense. Thanks for the update.
(10 Apr '12, 08:31)
pedrolima ♦♦
|