Testing BAPI FM - How to do the commit?
I'm testing a BAPI FM (BAPI_ACC_ACTIVITY_ALLOC_POST)...the document is created, but it cannot be displayed. I did it with testing ( F8 ) the FM from SE37....
I've found OSS note 198747, which says that commit should be triggered. I've tried to execute FM BAPI_TRANSACTION_COMMIT...but it didn't work...the document is still doesn't exist.
I'm still in the phase that I'm trying to figure it out that which parameter is necessary, and how to use the paramteres...so I cannot peform a commit work in my program....
Is there a solution for this?
Shall I test it in debug mode, where the commit work is automatically triggered?
Incho
Try running the program NOT in debug mode.
Try running the program NOT in debug mode.
Then it won't be any commit....
Write you a temporary non-transporatable program with calls to both BAPI_ACC_ACTIVITY_ALLOC_POST & BAPI_TRANSACTION_COMMIT. That should work.
Good Luck!
Write you a temporary non-transporatable program with calls to both BAPI_ACC_ACTIVITY_ALLOC_POST & BAPI_TRANSACTION_COMMIT. That should work.
Good Luck!
Thanks ZABAP!
I wanted to avoid this...since I'm not yet sure which parameter to fill and with what value....
Anyway which method is recommended within SAP: FM BAPI_TRANSACTION_COMMIT or statement 'COMMIT WORK'?
Incho
I'm sure either way will work, but I prefer the FM. We're continually adding to the number of BAPI's we're using in our programs, so to be consistant I just use the function.
I'm sure either way will work, but I prefer the FM. We're continually adding to the number of BAPI's we're using in our programs, so to be consistant I just use the function.
Thanks ZABAP!
I've checked the source code of this FM and it's quite short...basicly a commit and a buffer refresh ... I prefer the FM way (higher level approach), but in all BAPI example there is only a simple commit work....
I haven't seen any example or OSS note where this was recommended....anyway if you call BAPI from external application you don't have this choice...
Incho
You are correct on both counts. We use them for both internal and external calls. Much cleaner and eaiser to use than BDC or CALL TX.