You can configure connections to SAP to expire after a specified time by using a policy.
You can use the Connection idle timeout property on a policy to control the number of connections to SAP by closing connections that have not been used for a specified time.