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: 

update database in RFC

Former Member
0 Kudos

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

former_member186741
Active Contributor
0 Kudos

Hi Ming,

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

0 Kudos

Do you mean call in tRFC?

0 Kudos

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?

0 Kudos

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

0 Kudos

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

0 Kudos

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?

0 Kudos

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.

0 Kudos

I think that is a good way to do it.