Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem using concurently SAPFTPAPP

Former Member
0 Likes
507

Hi guys,

I'm really lost with this new interface, sorry, if my question is not at right place.

The problem I have at one of our production systems (ERP 4.6D) is: we are using SAPFTPAPP to connect, send, receive and disconnect to/from a set of FTP-servers. It seems we reached some limit for a concurent gateway processes, where next process started to behave abnormaly. Let me explain:

I have a GUI (transaction, released to end-users) where anyone can send some bunch of data to a particular ftp. After each conversation I called 'FTP_DISCONNECT', supposing this would release all the resources related to user's session. Obviously it is not true. Even after successfull disconnect from ftp-server work process is still with status = CONNECTED in the Gateway monitor (SMGW). This process is connected until the end-user leaves the GUI transaction, or after reaching some timeout, I'm not sure which one exactly. After reaching 10 concurent connections (I suppose, can't be absolutely sure of it), one of my background processes, which periodicaly reads other ftp directory using the same credentials, started to state "COMMAND_ERROR" during execution of GET command (usage of CALL FUNCTION 'FTP_COMMAND' raises COMMAND_ERROR).

This problem arises after successfull usage of the functionality for more than 8 months in production environment. But we are continiuously rolling-out this functionality to new stores at the customer environment. Finaly we got the problem mentioned aboce.

Me and my colleague SAP basis administrator checked parameters of SAP Gateway, but we are not exactly sure what parameter to tune/increase.

Can anyone help me with suggestions regarding this? What should I do - in Gateway configuration, or in my ABAP code, in order to:

- increase the limit of connections (which perhaps is not the right solution)

- desrease timeout or release the Gateway resourses after successful FTP disconnect.

Any suggestions would be highly appreciated.

Thanks,

Ivaylo Mutafchiev

SAP ABAP Consultant

1 ACCEPTED SOLUTION
Read only

vijaymanikandan
Contributor
0 Likes
433

Hi

Try to use the function module RFC_CONNECTION_CLOSE after the FTP_DISCONNECT

This is used to disconnect the RFC connection between SAP and other system.

  CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
      destination = l_dest
    EXCEPTIONS
      OTHERS      = 1.

Br

Vijay V

2 REPLIES 2
Read only

vijaymanikandan
Contributor
0 Likes
434

Hi

Try to use the function module RFC_CONNECTION_CLOSE after the FTP_DISCONNECT

This is used to disconnect the RFC connection between SAP and other system.

  CALL FUNCTION 'RFC_CONNECTION_CLOSE'
    EXPORTING
      destination = l_dest
    EXCEPTIONS
      OTHERS      = 1.

Br

Vijay V

Read only

0 Likes
433

Thanks Vijay,

that did the trick - now my rfc connection is closed in a Gateway monitor right after closing ftp-connection.

Regards,

Ivaylo