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

Call Function in Update task

Former Member
0 Likes
976

I have written the FM Call function 'COMMITROUTINE' in update task.

but this FM is not getting triggered when some commit happens. In all, this FM is not commiting tha data in the table.

CALL FUNCTION 'COMMITROUTINE' IN UPDATE TASK

EXPORTING

lt_dfkkbrlevyrec = lt_dfkkbrlevyrec

and the

What is missing in it?

Regards,

Seema Dadhwal.

5 REPLIES 5
Read only

kostas_tsioubris
Contributor
0 Likes
657

Hi,

if you want to call your FM when a commit happens you should write a routine which is called upon commit and this routine will call your fm.

e.g

form call_my_fm .

CALL FUNCTION 'COMMITROUTINE' IN UPDATE TASK

EXPORTING

lt_dfkkbrlevyrec = lt_dfkkbrlevyrec

endform.

perform call_my_fm on commit.

......

......

commit work. " now your routine will be called

Kostas

Read only

0 Likes
657

what will be the attrite of that Function Module.

Is it normal Fm or update module?

Thanks,

Seema

Read only

0 Likes
657

You should check the update module radiobutton in FM attributes

Kostas

Read only

Former Member
0 Likes
657

Hi,

Go to the attribute tab of the fn module. there check update module radio button.

also check the start immediate radio button or Immediate start , No restart

thn call the fn module

CALL FUNCTION 'COMMITROUTINE' IN UPDATE TASK

EXPORTING

lt_dfkkbrlevyrec = lt_dfkkbrlevyrec.

COMMIT WORK.

Regards,

Nikhil.

Read only

former_member31961
Contributor
0 Likes
657

Hi

if you did the settings for Update module , also check for the following statements.

SAP help documentation for in update task says:

'While an update function module is processed in an update work process, you are not allowed to execute the statements SUBMIT, CALL DIALOG, CALL SCREEN, CALL TRANSACTION, COMMIT WORK, ROLLBACK WORK and all other statements that provoke a database commit'.

Check have you used any statements which provokes a database commit?

Regards,

Shrinivas