Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

rollback work

Former Member
0 Likes
1,884

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

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,474

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

8 REPLIES 8
Read only

Former Member
0 Likes
1,474

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

Read only

Former Member
0 Likes
1,474

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.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,475

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

Read only

0 Likes
1,474

Helloo,

Will this work for HR_infotype_operation function module. am struck with same problem , quick response will be greatly appreciated.

Thanks in advance

Read only

Former Member
0 Likes
1,474

Hi ,

While calling the FM <b>CSAP_MAT_BOM_CREATE</b>

give <b>FL_COMMIT_AND_WAIT = ' '</b>

Regards,

Arun Sambargi.

Read only

Former Member
0 Likes
1,474

thanks Rich it worked. Is there any way i can change the points to solved for your solution.

thanks

Eda

Read only

0 Likes
1,474

Yes, you can, just by selecting a different point value for the other answer that you have mark as "Solved the Problem". This will allow you do mark as solved for other answers.

REgards,

RIch Heilman

Read only

Former Member
0 Likes
1,474

thanks Rich