When in ST22, appears some errors regarding no rfc authorization, we can investigate with transaction SUIM.
If you double click on the short dump, you will find information about what is missing.
So here you will see the user name, for who is missing, the function module, function group, and you can see the authorization object, in our case S_RFC.
In SUIM go to Roles –> Roles by Complex Selection Criteria–>Roles by Complex Selection Criteria.
Next go to Selection by Profile and Authorization Objects and in the Authorization Object put the S_RFC.
Next in the Selection according to authorization values, on Authorization Object 1, Object 1, put S_RFC and press enter.
After the enter will appear another fields and in the RFC NAME put the function group from the short dump and press execute.
Will appear a list with all roles that contains that object you search for.
You can select one role you consider will be ok for you.
In the role go to Authorization and display.
Next search for s_rfc by pressing ctrl+F.
Next go to Name and click on the glasses. Will appear a list with values, where you can put your function group. Add and save. If you have a Quality system and a production system, first made changes in Q and after transport in P . TR PFCG and put the name of the role.
Next press on generate.
Also you can put the user ID to the role. Press on User and edit here.
Put here the user ID that need the Auth. Object that is in this role.