‎2006 Jul 20 3:14 PM
i am using CSAP_MAT_BOM_CREATE to create a BOM. We have to run it in test mode to check for any error. So after the FM i have written ROLLBACK WORK if in test mode. But this is not working and the data is being saved to the tables.
Is there any way i can roll back the work.
thanks
Eda
‎2006 Jul 20 3:21 PM
I've looked at the code in the function module, i think that it does a commit work, but you might be able to turn this off.
Before you function call, pass this parameter to memeory. Make sure to set it to "X".
data: flg_no_commit_work type c.
flg_no_commit_work = 'X'.
export flg_no_commit_work to memory id 'CS_CSAP'.
* Now call the function module.
I think what this will do is NOT do a commit work. THis will allow you to handle the COMMIT and ROLLBACK in your calling program.
I consider this a hack, and would be very careful in doing this.
Regards,
Rich Heilman
‎2006 Jul 20 3:18 PM
Commit is done inside that funvtion. SO it cant be rollbacked. YOu have to find another way the check correctness of your data.
But what's the problem ?? if something will be not correct it wont be created...
BR, JAcek
Message was edited by: Jacek Slowikowski
‎2006 Jul 20 3:20 PM
KE,
In fact commit is inside the FM,
Other way is if it is TST you can delete the Mat BOM using CSAP_MAT_BOM_DELETE. Please check that option.
Cheers,
Thomas.
‎2006 Jul 20 3:21 PM
I've looked at the code in the function module, i think that it does a commit work, but you might be able to turn this off.
Before you function call, pass this parameter to memeory. Make sure to set it to "X".
data: flg_no_commit_work type c.
flg_no_commit_work = 'X'.
export flg_no_commit_work to memory id 'CS_CSAP'.
* Now call the function module.
I think what this will do is NOT do a commit work. THis will allow you to handle the COMMIT and ROLLBACK in your calling program.
I consider this a hack, and would be very careful in doing this.
Regards,
Rich Heilman
‎2009 Jul 13 9:48 PM
Helloo,
Will this work for HR_infotype_operation function module. am struck with same problem , quick response will be greatly appreciated.
Thanks in advance
‎2006 Jul 20 3:24 PM
Hi ,
While calling the FM <b>CSAP_MAT_BOM_CREATE</b>
give <b>FL_COMMIT_AND_WAIT = ' '</b>
Regards,
Arun Sambargi.
‎2006 Jul 20 3:27 PM
thanks Rich it worked. Is there any way i can change the points to solved for your solution.
thanks
Eda
‎2006 Jul 20 3:31 PM
‎2006 Jul 20 5:30 PM