cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to SAP gateway or RFC server failed

0 Kudos

Hi SAP Experts!

I'm facing some problems with BAPI_DOCUMENT_CHECKOUTVIEW2. I wrote a VBA code in Excel for testing purposes (it is meant to be a bigger and professional application in .NET) where I call this BAPI to checkout documents.

All needed files are located in Excel Application folder... icudt34.dll, icuin34.dll, icuuc34.dll, librfc32u.dll, sapftp.exe, saphttp.exe.

When I run it connecting to our QA system it works fine and all wanted files go to the specified folder. But when I do exactly the same in DEV or PRD system, an error occurs. Excel hangs on for more than 15 minutes and after that the error "File c:\temp\teste\DMS\301507206.pdf cannot be created" is returned from the BAPI call.

Checking logs in SLG1 the error bellow is reported.

Impossible execute RFC sapftp server - 1: Connect to SAP gateway or RFC server failed

I cannot understand why this works in QA and not in other systems. Does anyone have a clue? I think it is not related to library versions since it works in QA. Could it be related to firewall or RFC ports closed? If so, is there a way I can test this?

Any help will be very much appreciated.

Thanks in advance!

Daniel Pasinato

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hello,

After some (a lot of) research I found that settings of Gateway Security for execution of external files were different in our systems.

Gateway Security Files secinfo and reginfo - Security Settings in the Gateway - SAP Library

The reginfo was not set properly in DEV and PRD. For this to work smoothly it is necessary to add a line in reginfo in order to allow the programs to register on the gateway from an external host.

P TP=* HOST=* CANCEL=* ACCESS=*

After this configuration everything is working fine in every system.

Regards,

Daniel Pasinato

0 Kudos

Hi SAPiens,

Do you have any other suggestion about the error that occurs?

Many thanks!!

Regards,

Daniel Pasinato

SSB
Advisor
Advisor
0 Kudos

Hello ,

Looks like when you are trying to download the file the code which is supposed to connect to Sapftp.exe is failing. Can you check if the RFC destination SAPFTP is working correctly.

Regards

S S B

0 Kudos

Hello, S S B!

Thank you very much for your kind help.

That's exactly what I am trying to do. In QA system it works fine but DEV and PRD I could not make it work.

I ran report RSFTP005 in both systems and the result is the same.

Verify RFC Destination SAPFTP...

... OK.

Ping RFC Destination SAPFTP...

... OK.

Verify RFC Destination SAPFTPA...

... OK.

Ping RFC Destination SAPFTPA...

... OK.

Even in SM59 everything looks good. So the issue doesn't seem to be on RFC destination SAPFTP.

Any other tip?

Thanks again for your replay.

Best regards,

Daniel Pasinato

SSB
Advisor
Advisor
0 Kudos

Hello ,

Do you feel that there is some note missing in other two systems ? / Some RFC related configuration difference ?

Regards

Sagar S Bhide

0 Kudos

Hello again, Sagar!

And again thank you for your willingness trying to help.

It is very unlikely that a note could be missing in other systems. We do not implement notes directly in QA system. It is always implemented in DEV and then goes to QA and PRD via transport system.

If it worked in DEV and not other systems I could investigate more deeply but I guess missing notes is not the issue here.

Kind regards,

Daniel Pasinato