cancel
Showing results for 
Search instead for 
Did you mean: 

RFCSDK - can't open connection

Former Member
0 Kudos

Hi,

I'm working with SAP NetWeaver and I'm trying to access it from remote with the "nwrfcsdk":

Here is a simple program that I'm using for that:

#include <stdlib.h>

#include <stdio.h>

#include "sapnwrfc.h"

int main()

{

printf("test start...\n");

RFC_RC rc = RFC_OK;

RFC_CONNECTION_PARAMETER loginParams[5];

RFC_ERROR_INFO errorInfo;

RFC_CONNECTION_HANDLE connection;

loginParams[0].name = "ashost"; loginParams[0].value = "my_host";

loginParams[1].name = "sysnr"; loginParams[1].value = "33";

loginParams[2].name = "client"; loginParams[2].value = "001";

loginParams[3].name = "user"; loginParams[3].value = "my_user_name";

loginParams[4].name = "passwd"; loginParams[4].value = "my_pass";

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

if (connection == NULL)

printf("NULL\n");

else

printf("OK\n");

printf("test end.\n");

return 0;

}

1. Can't open the connection - I always get connection as NULL - I can't see the reason for that, since when I'm using the same parm values from the .NET connector I manage to get the connection - what can I do about that?

2. Is there a way that I can debug RfcOpenConnection itself??? (I only have the lib that contains it...)

3. How can I read the NetWieaver logs, so I can know if the connection got to the SAP at all?

tx,

s.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

It worked fine when I defined "SAPwithUNICODE"...