cancel
Showing results for 
Search instead for 
Did you mean: 

error RFC_INVALID_PARAMETER and EXTERNAL_RUNTIME_FAILURE

sfaisol
Discoverer
0 Kudos

I am trying to compile a program using Visual C++ 2017 and it compiles fine. But when i execute i get the following connection error

RFC_INVALID_PARAMETER

and

EXTERNAL_RUNTIME_FAILURE

This is my c++ code looks like

RFC_RC rc = RFC_OK;

RFC_CONNECTION_PARAMETER loginParams[6];

RFC_ERROR_INFO errorInfo;

RFC_CONNECTION_HANDLE connection;

RFC_FUNCTION_DESC_HANDLE bapiCompanyDesc;

RFC_FUNCTION_HANDLE bapiCompany;

RFC_STRUCTURE_HANDLE returnStructure;

SAP_UC message[221] = iU("");

RFC_BYTE buffer[1105];

unsigned utf8Len = 1105, resultLen;

FILE* outFile;

errno_t err;

loginParams[0].name = cU("ashost");loginParams[0].value = argc > 1 ? argv[1] : cU("sap");

loginParams[1].name = cU("sysnr");loginParams[1].value = argc > 2 ? argv[2] : cU("00");

loginParams[2].name = cU("user");loginParams[2].value = argc > 3 ? argv[3] : cU("user");

loginParams[3].name = cU("passwd");loginParams[3].value = argc > 4 ? argv[4] : cU("pass");

loginParams[4].name = cU("client");loginParams[4].value = argc > 5 ? argv[5] : cU("100");

loginParams[5].name = cU("lang");loginParams[5].value = cU("EN");

connection = RfcOpenConnection(loginParams, 6, &errorInfo);

I am using x64 bit version of the library and it seems like in need to include C++ PreProcessor

even after this preprocessor i am still getting the same error. What else i am missing in the configuration.

Accepted Solutions (0)

Answers (0)