Strange problem with RFC

Hi all,

When I call a remote function from BC to SAP individually, it works fine. When I sequence the same RFC as a flow step in my service, it does not seem to call SAP. The log indicates it was OK. But RFC does not return any return parameters or does what it is supposed to do within the RFC. 

I have tested this many times to see the strange behavior to understand the problem, I cannot seem to find out the problem. It seems to happen only in one flow service. I can call the same RFC from a different flow service it works fine. Both of the flow services are under the same package under different folder. I have verified the ACL settings too. I do not get access denied message either. It just that RFC does not do anything with the flow service that I want to call from. This has been pretty frustrating.

I APPRECIATE any light you can shed on this. 

Regards,
Roger

Have you passed the same input parameters in both the cases !!

Generally, one must initialise the tables and structures when invoking the RFC

HTH
BS

Hi Bhavani,
Thanks for the reply.

Yes, I have initialized the parameters and tables in both the cases.
My flow service has a series of steps. I send the IDOC from SAP to BC using savepipelinetofile and retrieve the file with restorepipelinefromfile. After mapping my IDOC to customer XML I invoke to http to post the data. I capture any errors from http to a structure and if there are errors I am calling an RFC to SAP with the IDOC number to report the error. I noticed that if I disable savepipelinetofile and restorepipelinefromfile steps, then the RFC works fine. The moment I enable those steps my RFC does not work. I am using a simple RFC call to return a hardcoded value in a test RFC to test this.

I appreciate if you or someone can guide me through this strange problem.

Regards,
Roger

Roger see if you can post html view of your service here for review…

Adnan,
Here are the steps that I go through before I call the RFC.

Savepipelinetofile
Restorepipelinefromfile
TransformFlatToHierarchy
Loop and Map
recordtodocument
http (post)
bytestostring
stringtodocument
documenttorecord
loop and map
CALL RFC

If I disable Savepipelinetofile and Restorepipelinefromfile test my service, RFC call work fine.

I appreciate your help.

Regards,
Roger

Guess, the save and restore to pipeline are not saving the values you require.

Just check the pipeline contents after the restore to pipeline. Do you see all the data correctly or is something missing?

We did have a same problem. Hence created a small envelope and then saved the pipeline. After restoring, we extracted the desired values from the envelope.

HTH
BS

I found the solution to the problem that I was having. If I disable the step restorefrompipelinefromfile and send an IDOC from SAP, my RFC does get called after the http post. This will work for me for now.

Thank you all for your time.

Regards,
Roger

Rogger,

If you want to enable both Save and restorepipelineToFile then you should use Branch and keep two conditions ie
Branch on tempVariable(this you set in the service input)
$null
–savePipelineToFile(this kicks when temp variable is null)
$default
–restorePipelineToFile(this kicks when temp variable has some value),so that in the runtime flow both will not be executed and savePipeline step will run.

This one helps when you move package to different QA environments you no need to explicitly remove the save and restore pipeline steps unless if you dont want to.

HTH,
RMG

RMG,
I have a follow up question on this. I am not able to do two RFC calls in the same flow service. Within the same flow service, I need to make a call to SAP to get a value and after few more steps, I need to make another call to SAP through RFC to send some errors. I can only do one of the RFC call. Is there any default RFC setting that needs to be done at the server level. I have looked through BC adapter guide and verified the number of threads, memory allocation etc.,

I appreciate your help.

Thanks,
Roger