cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding RFC destination 'NONE' and RFC context

raffinkira
Participant
0 Kudos
2,304

Hi experts,

Sometimes I can see RFC destination 'NONE', the RFC call is in the current system but in an RFC context.

have checked the help doc regarding RFC context.

https://help.sap.com/docs/SAP_NETWEAVER_700/108f625f6c53101491e88dc4cf51a6cc/7509c2df49a44c4e9aee129...

But I'm not clear about the difference between if data is in RFC context or not. Could someone help to explain more on that? e.g., LUW.

Regards,
Ming

View Entire Topic
Sandra_Rossi
Active Contributor
0 Kudos

Yes. CALL FUNCTION DESTINATION 'NONE' starts an RFC context.

RFC Context | SAP Help Portal

  • "Every remote call of a function module that is made using the RFC interface defines a separate context in the target system."

Synchronous RFC (CALL FUNCTION-DESTINATION) | SAP Help Portal

  • "Synchronous call of a remote-capable function module specified in func using the RFC interface."

("DESTINATION space" is the only case where it's not RFC = same as without DESTINATION)

raffinkira
Participant
0 Kudos
So if db update is in RFC call with destination NONE, it will be committed after the call finished and can't be rollback, because the content in RFC call is in another LUW, am I right?
Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert

CALL FUNCTION ... DESTINATION 'NONE' creates a new user session (on the same application server), and all DB updates done in that user session, need to be committed in that user session.

That means, the updates will never be committed unless one of these two prerequisites are fulfilled:

  • the function module you call, contains a COMMIT WORK statement
  • you make a CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' DESTINATION 'NONE' after the function module call (without prior closing the connection to 'NONE').
Sandra_Rossi
Active Contributor
0 Kudos

Or the third possibility is an implicit database commit (not a COMMIT WORK) when the connection is closed (i.e. explicitly via RFC_CONNECTION_CLOSE or implicitly if the calling context closes), but one should not count on implicit things, that should be done explicitly i.e. go for the first two options.