2008 Jun 24 12:53 PM
Hi ABAPers,
I am trying to run BAPI_MATERIAL_SAVEDATA. When I run, the details are being changed without using 'COMMIT WORK'.
However, if I use ROLLBACK WORK before the end of the program, the database table does not get updated.
Is there any other way I can run BAPI_MATERIAL_SAVEDATA in test mode without updating the Database table?
Help is highly appreciated.
Thanks!
2008 Jun 24 1:00 PM
hi,
There is no option for test mode present in the BAPI unfortunately.
Thanks
Nayan
hi,
There is no option for test mode present in the BAPI unfortunately.
Thanks
Nayan
2008 Jun 24 12:54 PM
dont use BAPI_COMMIT_WORK or COMMIT Statement.
then it will not update the database.
Edited by: swarup basagare on Jun 24, 2008 1:55 PM
2008 Jun 24 12:59 PM
Use BAPI_MATERIAL_SAVEREPLICA with TESTRUN = 'X'
Reward point if helpful
2008 Jun 24 1:00 PM
hi,
There is no option for test mode present in the BAPI unfortunately.
Thanks
Nayan
2008 Jun 24 1:03 PM
Hello,
Only some FI transactions can be run in Test mode.Most of the BAPIs are not having this test mode
Edited by: BVS on Jun 24, 2008 2:04 PM
2008 Jun 24 1:06 PM
Do not call bapi commit function module in test moode, instead call bapi rollback FM, after u call the material save data bapi
*(or) *
I understand that you are using the BAPI, but if you were to use LSMW direct input program instead, you would be able to run in TST mode, and make sure that all of the errors are taken care of before you actually update the system.
*******************Reward points,if found useful
2008 Jun 24 1:11 PM
Hi,
As far as my knowledge none of the BAPI will do commit work on its own. With out calling FM BAPI_TRANSACTION_COMMIT/COMMIT WORK statement database will not be updated. Please check it once again.
For your case u may call FM BAPI_MATERIAL_DELETE for flaging the material for deletion so that u can't use it any more. U can set the deletion flag even in MM01.
MM01->Menu->Material->Flag for deletion->Immediately.
Thanks,
Vinod.
2008 Jun 24 1:16 PM
Hi,
Try in a dev environment, after your bapi_material_savedata, to do something like this :
if p_text eq 'X'.
BAPI_TRANSACTION_ROLLBACK
endif.
Hope this helps,
Erwan
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |