I have to call SAP functions from an Excel Macro in VB. When my code reaches to function call, I get an error message: Run-time error '61704': Internal application error. Below is my code: , I tried adding librfc32.dll in the references and I can run SAP recorded GUI scripts. Any idea what could be the issue?