-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC Call option "KEEPING LOGICAL UNIT OF WORK" #172
Comments
Hi Denis, at the moment, this feature is not available in external RFC programs. The problem is basically: It may be possible to achieve such a "small chunk" scenario, if you store the current line number (up to which you have already selected the lines of the table) in a variable in the ABAP session memory, and then select starting at that line number, when the next RFC request from the external program comes in?! The ABAP session memory stays alive for as long as the RFC connection remains open. I also have a different idea that could work, but I have to check a few details first. |
OK, the following should work. As mentioned last time, the client side (your Python program) has no control over the roll-behavior of the server-side (the SAP system). "KEEPING LOGICAL UNIT OF WORK" only suppresses the roll-out/roll-in of the current process in which it is executed, so even if something like this would be available in the RFC library, it would only keep your Python program from rolling (which it doesn't do anyway...) :-) The solution is to switch sides: instead of an RFC client program you write an RFC server program, which listens for incoming requests. Then on ABAP side you write a report that does the following things:
Note however, that KEEPING LOGICAL UNIT OF WORK is an internal statement and SAP recommends to not use it, because bad things can happen, if you do. Basically it locks a workprocess for one single user session for an undetermined period of time. If your Python program "hangs", the workprocess may also hang forever, and if this happens to all workprocesses in the system, the system is dead... If the requirement is, that the "data extraction process" can be started from external side (Python program) instead from inside SAP (ABAP report), you could refine this scenario as follows:
There are also other solutions possible, e.g.: Best Regards, Ulrich |
@DenisTis Python is used as example here, all the same with NodeJS |
Thanks a lot for your input. I was able to develop same solution as proposed before going in vacations. Thank you for the help!! |
Dear Srdjan,
thank you a lot for the functionality of this package!
In my case I need to extract big abap table to external source.
For that, in first call to ABAP I have to open cursor, and in all consecutive calls do "fetch next cursor..package size" to get data in small chunks per call.
The only option to make this scenario work with RFC is to have addition during RFC Call: "KEEPING LOGICAL UNIT OF WORK".
(Otherwise commit is done by the end of every RFC call).
Is it possible to achieve with the package?
The text was updated successfully, but these errors were encountered: