To use SNC with RFC calls from AS ABAP, you must configure the SNC options for each RFC destination individually. Below You’ll find shortly information how to do it.
At the beginning we have to verify STRUST transaction and check the SNC SAPCryptolib entry. If everything will be ok You’ll see a green lamp like on the below screen. It means that a certificate is generated. In my case, it is self-signed certificate and for my needs this is sufficient. Now all that’s left is to verify the parameters regarding SNC – A little more about this later in the article.
If SNC SAPCryptolib is empty, You have to generate a certificate using SNCWIAZARD transaction:
If You complete the above wizard You’ll have generated a certificate and enabled SNC because wizzard also added suitable parameters to the SAP instance. For more information about parameters check here. Your SNC configuration You can check using transaction: SNCCONFIG. Above steps, You need to repeat in each system which will use SNC in RFC connection.
Now we have a suitable certificate and enabled SNC in our system. What’s next, check the below steps…
Steps in STRUST transaction:
- Export SNC SAPCrypolib certificate to file (file format: Base64) from systems A and B.
- Import certificate from system A to system B in SNC SAPcryptolib tree. Save configuration.
- Import certificate from system B to system A in SNC SAPcryptolib tree. Save configuration.
Now in transaction SNC0 we enter the SNC data of the system that will connect to us, for example in system A we enter information about system B, and vice versa in system B we enter information about system A. You have to enter System ID (SID) and SNC name in the format: “p:CN=SystemB….”
If the above configuration is finished we can now change the RFC connection to use SNC. Run SM59 transaction and choose a suitable RFC connection and click:
Now activate SNC and save the configuration.
At the end test the connection:
The same steps You have to do in other systems which need SNC connections.
In the next article, I will describe the problems I encountered when testing the SNC connection. For example, there will be about: “00024error during logon” and “An error occurred while making a Remote Function Call“