Hi experts,
Currently I am implementing an function module which is able to be called by RFC. Inside this function a table - which is overtaken from the external system - will be processed by a regular loop.
For the RFC result I have to call an other function module (Z-function) and take over the result of this Z-function to the RFC result structure.
The Z-function itself is also ablte to be called direclty via RFC.
Currently it seems that there are any side effects with this Z-Function. So we have some strange situations were the Z-function is not delivering any result and we don't know why...
Like I already said the Z-function itslef is also configured as an RFC service and addtionally it is used inside a web service definition.
If an external program is using the web serice (single call) the problem with wrong result does not occur.
In my opinion the problem is an internal problem of the Z-function. Something that the context is not initalisized after first loop or something like this. Because the problem with wrong result do just occur in a multiple call (this means: 1. Call, 2. Call,...) inside loop...
The questions is:
- Is there any possibility to initalize the context of an Z-function?
- Can I call a Z-function in a separate unit and wait for the result of it?
I think about to call the service internaly with "IN BACKGROUND TASK AS SEPARATE UNIT" but then I will never get the result back. But something like this is necessary - if we have the right assumption.
Also I found the function TRANSACTION_BEGIN and TRANSACTION_END for BAPI implementation. So I saw that these functions will create/open a transaction as bracket for further function calls. But does it really help if I just call TRANSACTION_BEGIN, Z-FUNCTION, TRANSACTION_END?
Means new transaction = separate unti / new context?
Regards
Christian