Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP without UNICODE - is it possible

Former Member
0 Kudos

Iu2019m working with the NWRFCSDK (c/c++).

My problem is that I can connect to the SAP server only when I have u201CSAPwithUNICODEu201D preprocessor definition - without this the connection is always null.

I donu2019t think sap would make sdk without the option to work with non-unicode.

What do you say?

Here is a code example:

int mainU(int argc, SAP_UC** argv){

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];

RFC_BYTE buffer[1105];

unsigned utf8Len = 1105, resultLen;

FILE* outFile;

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

loginParams[1].name = cU("sysnr"); loginParams[1].value = cU("05");

loginParams[2].name = cU("client"); loginParams[2].value = cU("800");

loginParams[3].name = cU("user"); loginParams[3].value = cU("user");

loginParams[4].name = cU("lang"); loginParams[4].value = cU("JA");

loginParams[5].name = cU("passwd"); loginParams[5].value = cU("1234");

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

// as I specified this always returned as null when u201CSAPwithUNICODEu201D is not defined

if (connection == NULL) errorHandling(rc, cU("Error during logon"), &errorInfo, NULL);

}

Tx.

2 REPLIES 2

KK07
Contributor
0 Kudos

hi,

i think it is not possible.

for Unicode related u can check the following thread...

http://help.sap.com/saphelp_nw04/Helpdata/EN/79/c55458b3dc11d5993800508b6b8b11/content.htm

Former Member
0 Kudos

SAP can works with or without UNICODE.

If the system has UNICODE you can't change the RFC calls.

In the greater part of the upgrades it's a key decision because of the interfaces with other systems. The clients select this option by majority