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

Update function module

Former Member
2,871

Hi all,

I am trying to use the statements SUBMIT, CALL DIALOG, CALL SCREEN, CALL TRANSACTION, COMMIT WORK, ROLLBACK WORK in my update function module.

But those statements are not getting triggered. what could be the reason for this.??

Regards,

Abdul Khadeer Shaik.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
1,504

Because those statements are not allowed in an update FM, they could mess database consistency, search and read some online documentation as CALL FUNCTION - IN UPDATE TASK (Look for ‘statements that create a database commit, must not be executed.’) Only solution to break an update is raising an Abort message to trigger DB rollback.

Hint: Such statements could be executed in a RFC FM executed thru CALL FUNCTION - IN BACKGROUND UNIT or CALL FUNCTION - IN BACKGROUND TASK. But they shouldn’t rollback the previous LUW.

Regards,

Raymond

6 REPLIES 6
Read only

siva_subramanian2
Participant
0 Likes
1,504

Hi Abdul,

How you are trying to check these statements at runtime. You need to switch on update debugging and then you need to debug and confirm whether these statements are getting triggered or not.

Thanks

Siva.A

Read only

0 Likes
1,504

Hi Shiva,

Thanks for the reply.

Actually, here I am trying to use these statements in my update function module.

i.e., I called a screen and also a transaction, and those were successfully called(triggered).

But, what if I use these in my report program. will they get triggered??

Please do justify my statement.

Thanks,

Abdul Khadeer Shaik.

Read only

RaymondGiuseppi
Active Contributor
1,505

Because those statements are not allowed in an update FM, they could mess database consistency, search and read some online documentation as CALL FUNCTION - IN UPDATE TASK (Look for ‘statements that create a database commit, must not be executed.’) Only solution to break an update is raising an Abort message to trigger DB rollback.

Hint: Such statements could be executed in a RFC FM executed thru CALL FUNCTION - IN BACKGROUND UNIT or CALL FUNCTION - IN BACKGROUND TASK. But they shouldn’t rollback the previous LUW.

Regards,

Raymond

Read only

0 Likes
1,504

Hi Raymond,

Thanks for the valuable information.

yes, I agree with your statement, because just now I created an Update FM and used those statements in my FM and they got triggered.

But, when I have used those statements in my custom program making use of IN UPDATE TASK. These statements were not triggered.

But what exactly is happening in the background across this scenario.

And why is it not showing any syntax or run time error, instead it is getting executed but exclusively those statements were not triggering i.e., there is no effect of using those statements(call transaction or call screen).

Regards,

Abdul Khadeer shaik

Read only

0 Likes
1,504

Those FM are not executed when you are actually running in an update task (called IN UPDATE TASK followed by a COMMIT WORK)

Hint: the FM TH_IN_UPDATE_TASK is useful to code different behavior between update task and direct execution.

Regards,

Raymond

Read only

siva_subramanian2
Participant
0 Likes
1,504

Hi Abdul,

Please check Raymonds reply. So these statements can be used in RFC FMs and not allowed in Update FM.

Thanks

Siva.A