Application Development 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: 

Can I Call Update task function module in a User-exit

Former Member
0 Kudos

Hi All,

Just  wanted to know if I can call Update task function module in a User-exit ..

I have used it many times and is workin fine also, but one of my colleuge told me that we should not use Update task function module in a User-exit ...

Just wanted to have some idea, any standard sap Documnet will be too too helpful.

Thanking You All..!!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi All,

Thanks a lot for the help.

I got the point in OSS 415716.

Thanking You All..!!

4 REPLIES 4

JK
Contributor
0 Kudos

hi

it is allowed to call update functions from user-exists and enhancements

the "Problem" is, that an update function requires a commit work somewhen afterwards

you should not perform a commit work in a user Exit (exceptions confirm the rule) as this can cause Problems

if you don't execute the commit work yourself, you depend on the Standard coding after your user-Exit, if for example for whatever reason the Standard is not performing a commit or even doing a rollback, your function will then not be processed.

so it depends on the userexit (where it is called in Standard), for some userexits like savedocument_prepare/Before_save  etc, it's their purpose for you to do further updates here and a commit is comming later in the Standard flow and

hope this helps you in your Task

former_member195402
Active Contributor
0 Kudos

Hi Ankit,

we are using this for example in USEREXIT_SAVE_DOCUMENT in include MV45AFZZ to update Z-tables.

The function modules will only be processed, after a COMMIT in SAPMV45A (VA01, VA02, DP90, ...) and this is as it should work.

Regards,

Klaus

0 Kudos

Hi,

Thanks a lot to Klaus and Jorg..!!

I agree with both of you and this is what I aslo believe but I came in confusion regarding this point, when one of my senior colegue contradicted, saying " We should not call Update Task FM in Exit".

It would be great, if some one can please provide me any SAP Doc. stating the same..!!

I know, you all are correct and I have written some Update Task FM in exit some 3-4 Yrs. ago and they are still working fine..!!

Just, wanted if some one can help me..!!

Thanking You All..!!

Former Member
0 Kudos

Hi All,

Thanks a lot for the help.

I got the point in OSS 415716.

Thanking You All..!!