Programming Examples 

The sample program files for the RFC C++ Class Library reside in the following subdirectory under the directory where you have installed SAP Automation:

\crfcsdk\samples

The following table lists the sample program files:

Program Files

Description of Sample Program

crclient.h, crclient.cpp

Client program

crautocl.hpp, crautocl.cpp

Client program with parameters automatically created in the class library

crautsrv.h, crautsrv.cpp

Server program with an included ABAP client in the header file for testing the auto-creating server feature

crpersst.cpp

Program testing persistent features of the class library

crserver.h, crserver.cpp

Server program

crservth.h, crservth.cpp

Multithreading server program

crtstasv.h, crtstasv.cpp

Client program for testing the auto-creating server feature

sapinfo.hpp, sapinfo.cpp

Client program for getting R/3 system info

srfcserv.hpp, srfcserv.cpp

Server program registering multiple RFC functions with R/3 systems.

trfcserv.hpp, trfcserv.cpp

Server program for transactional RFC

trfctest.hpp, trfctest.cpp

Client program for transactional RFC

crclntth.h, crclntth.cpp

Multithreading client program

Crcltdlg.cpp, crcltdlg.h, crcltmfc.cpp, crcltmfc.h, crcltmfc.rc, crhnderr.h, crimpmdg.cpp, crimpmdg.h, crresrce.h, crrfcclt.cpp, crrfcclt.h, crshexpm.cpp, crshexpm.h, crshtbpm.cpp, crshtbpm.h, crstdafx.cpp, crstdafx.h

Client program using MFC together with the class library to provide a user interface.

For use on Microsoft Windows systems supporting MFC in Visual C++ 5.0 or 6.0 only.

For more information on the sample programs please see the detailed comments in each program and the documentation for each class library function.

All non-multithreading class library programs can run on multiple platforms, including Windows, UNIX, and IBM AS/400.

Multithreading Examples

All multithreading examples require a 32-bit Windows platform (Windows NT or Windows 95/98).