There might be two possibilities.
1) Due to error in RFC connection, whenever there is an error in tRFC connections, you can view it in SM58.
2) Due to the authorization of the RFC user maintained in SM59 destination, the user might not be having the required authorization to create Idoc.
Check the function module documentation where it is explained about the authorization object.
Refer to the below links for the same.
Help - Rational Application Developer
Regards,
TP