cancel
Showing results for 
Search instead for 
Did you mean: 

Netweaver RFC Connector - error logon

SimoneMilesi
Active Contributor
0 Kudos

Hi all

i'm trying to use the NW RFC connector and taking the code from examples in DEMO folder, i filled my connection parameters as below

loginParams[0].name = cU("ashost");

loginParams[0].value  = cU(<<<IP NUMBER>>>);
loginParams[1].name = cU("sysnr");loginParams[1].value =  cU("00");
loginParams[2].name = cU("client");loginParams[2].value =  cU("100");
loginParams[3].name = cU("user");loginParams[3].value =  cU("user");
loginParams[4].name = cU("passwd");loginParams[4].value =  cU("pwd);
loginParams[5].name = cU("lang");loginParams[5].value =  cU("EN");

But i got an error for RFC_INVALID_PARAMETER

I cannot get which is the wrong one and why...


Any suggestion?

Accepted Solutions (0)

Answers (2)

Answers (2)

SimoneMilesi
Active Contributor
0 Kudos

Ok, i found the solution even if some notes are not available (like 1056696 )


On Linux and Windows, certain minimum releases of the C runtime are required to execute the programs. See SAP Notes 1021236 (for Linux) and 684106 (for Windows). The compiler and linker options needed to compile programs using the SAP NetWeaver RFC SDK are listed in SAP Note 1056696.

In addition, for Windows users using Microsoft Visual Studio, this is a description of how to set the Visual Studio project properties:

General section: Make sure the CharacterSet field is set to “Use Unicode Character Set.”

Debugging section: Under Environment, add something like Path=%Path%;nwrfcsdk\lib.

C/C++ section:

General: Add the nwrfcsdk\include directory under Additional Include Directories.

Preprocessor: Add the two preprocessor definitions SAPonNT and SAPwithUNICODE.

Code Generation: Choose “Multi-threaded DLL (/MD)” as the Runtime Library; selecting “Multi-threaded Debug DLL (/MDd)” may lead to strange problems.

Linker section:

General: Add the nwrfcsdk\lib directory under Additional Library Directories.

Input: Under Additional Dependencies, add libsapucum.lib, sapnwrfc.lib, and sapdecfICUlib.lib

The first time i tried on VS2015 i put them, but now i'm working in VS2010 (due other compatibility issues with Siemens Teamcenter 10) and i completly forgot them (and they are not so easy to find!)

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Simone,

Nice to hear that the issue was solved, and thanks for sharing it. I'm sure it will help other people in the future .

I was trying to simulate it here, but was not able to, so far .

Cheers!

Isaías

SimoneMilesi
Active Contributor
0 Kudos

i attach also my sapgui logon data if can be useful

isaias_freitas
Advisor
Advisor
0 Kudos

Hello Simone,

Is the IP between quotes?

For example:

loginParams[0].value  = cU("10.10.10.10");

Cheers!

Isaías

SimoneMilesi
Active Contributor
0 Kudos

Hi Isaias,

Yes, exactly

isaias_freitas
Advisor
Advisor
0 Kudos

hmmmm can you please attach to this thread your source code (or a sample code that presents the same issue)?

There is an option to attach the file to this thread, so you don't need to post the entire source code at your reply.

In addition, which RFC SDK release and patch level are you using?

SimoneMilesi
Active Contributor
0 Kudos

i basically took the DEMO program companyClient.c and put my values to test the logon

i attach the source code as txt

As per version: i took the only one available on Marketplace for Win 64bit