Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call Sap fromC programs

Status
Not open for further replies.

prosa

Programmer
Aug 13, 2002
12
PT
Hello everyone,

i'm trying to call SAP from an C program, i had search for some information and i had some results.

I found the libraries (guilib.lib) to be include in the C program, and also the include files but i still haven´t a working program.

IF someone could help me , i would apreciate!!
Thanks

PROSA
 
Thanks Fred,

i have aldready done'it, and try it to compile those examples, but that´s exactly what is given me problems.

When i compile those files, i get some errors.
It seems that the samples don´t recognize the libraries.
I have aldready link the program to the libraries, but the errors persists.
the error is something like:
"unable to interprete "IT_HANDLE"..."
"unable to interprete "IT_CONNECT"..."

The compiler doesn´t recognize the functions definition.
I don´t know if the error could have a relation with the operating system (windows 2000) or with the SAP version(46b),or if i´m doing something wrong.

If you could help me i would appreciate...
Thanks

PROSA






 
Hi Prosa,

I am not a C- or VB-programmer, but :

You might want to check the RFC DLL version and use the most recent one available. I have just installed a 620 GUI Compilation 3.
The RFC libs I have are :

- librfc32.lib 8.686 bytes 19.11.2002
- librfc32u.dll 7.270.472 bytes 20.11.2002
Build on Tue Nov 19 22:31:16 2002
Product Version 6203.3.480
- librfc32u.lib 48.666 bytes 19.11.2002

I cannot find the functions IT_HANDLE & IT_CONNECT in the 2 libraries ( searched with Notepad ).

Are you sure these functions are valid and exist ?

Regards,
Fred
 
Hello again and thanks one more time,


i check for the files you have mencioned, and it checks OK..

about the functions i mencioned before they were from a diferent example i try to compile, it was from SAMPLE.C file.

But now, I try to compile the file startrfc.c and the errors are similiar:
undefined reference to `RfcFileArgv@8'
...

and so on...

But when reading your last reply, i see something that could be the problem,

You don´t use a C compiler to run the files???
You use a Tool that comes with SapGui??


i´m trying to do this using a C compiler to run the programs, may be this could be the problem??


Regards,
Prosa




 
You should have included librfc32.lib in your compiler instead of guilib.lib.
 
Hello supernova88,

i did, i have include librfc32.lib , but the error persist.

I change in the compiler options, the lib directory were this file is, and still nothing.

thanks

Prosa
 
Hello again,

this are the link i have defined in the compiler options,

i think everythig is ok:

C:\PROGRA~2\SAP\FrontEnd\SAPgui\rfcsdk\bin\gcc
c:\progra~2\sap\frontend\sapgui\rfcsdk\text\rfcexec.c -o c:\progra~2\sap\frontend\sapgui\rfcsdk\text\Rfcexec.exe
-s -fexpensive-optimizations -IC:\DEV-C_~1\Include-IC:\PROGRA~2\SAP\FrontEnd\SAPgui\rfcsdk\include\
-IC:\DEV-C_~1\Include\G__~1 -IC:\DEV-C_~1\Include\
-LC:\PROGRA~2\SAP\FrontEnd\SAPgui\rfcsdk\lib\
-BC:\PROGRA~2\SAP\FrontEnd\SAPgui\rfcsdk\bin\

could be the problem the operating system i have ??
windows 2000??

Any suggestion will be welcome...

thanks
Prosa

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top