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 database in RFC

Former Member
0 Likes
1,586

Hi all,

I have some requirements like this:

In system A, I have a program B, B will call Function Module C in remote system D.

In FM C, I have some UPDATE to change the database.

Here is the problem.

After C goes to the end, these UPDATE will be commited automatically, and the program run back to B. But I am not sure if B will run correctly afterwards and if it has some problems, I cannot ROLLBACK the work that I have done in system D.

If I use IN UPDATE TASK, I think that the updates will be lost after C is over.

So how should I do in this case?

Hi all,

I have some requirements like this:

In system A, I have a program B, B will call Function Module C in remote system D.

In FM C, I have some UPDATE to change the database.

Here is the problem.

After C goes to the end, these UPDATE will be commited automatically, and the program run back to B. But I am not sure if B will run correctly afterwards and if it has some problems, I cannot ROLLBACK the work that I have done in system D.

If I use IN UPDATE TASK, I think that the updates will be lost after C is over.

So how should I do in this case?

8 REPLIES 8
Read only

former_member186741
Active Contributor
0 Likes
1,478

Hi Ming,

surely you can delay the call to the RFC until after the program has run successfully.

Read only

0 Likes
1,478

Do you mean call in tRFC?

Read only

0 Likes
1,478

And I think maybe I should separate the update parts and other parts into two two RFCs.

In the first RFC, I do logic and in the second RFC, I call it in tRFC and do update inside it.

Am I thinking right?

Read only

0 Likes
1,478

no, I mean the function module being called as an RFC...why not call it at the end of processing for the program.

Read only

0 Likes
1,478

This RFC is not just used for database updating, there are also some other logic.

Read only

0 Likes
1,478

Ok, so I guess that is what you mean by splitting the function module into two? One to do the work as you go along and another to do the updates at the end?

Read only

0 Likes
1,478

Yes, actually I am helping another guy fix this and I am thinking a better way to do that.

Maybe in this case, the logic part and the update part should be separated into two FMs.

Read only

0 Likes
1,478

I think that is a good way to do it.