2 Fehler! Formatvorlage nicht definiert./Remote Program Calls
of 25 Axel Angeli 12 March 2001
2
1 R/3 DCOM Connectivity
Access via RFC to R/3 from Windows is done via number of DLLs and Active/X controls
provided by SAP with every SAPGUI installation. The provided DLLs are DCOM compliant
interface classes and are accessed via their proper DCOM registration.
R/3 DCOM Connectivity - Calling RFC Functions And BAPIs From Windows™
Access via RFC to R/3 from Windows is done via number of DLLs and Active/X controls provided by
SAP with every SAPGUI installation. The provided DLLs are DCOM compliant interface classes and 30
are accessed via their proper DCOM registration. This chapter summarises in brief how to call the
DCOM ActiveX components that are provided by SAP to access R/3 function modules from a
Windows platform. We will demonstrate how to call the standard RFC function module
RFC_READ_TABLE.
35
U:\Book\C03@01 DCOM.doc
R/3 DCOM Connectivity
Access via RFC to R/3 from Windows is done via number of DLLs and Active/X
controls provided by SAP with every SAPGUI installation. The provided DLLs
are DCOM compliant interface classes and are accessed via their proper DCOM 40
registration. This chapter su
1.1 Calling RFC Functions And BAPIs From Windows™
This chapter summarises in brief how to call the DCOM ActiveX components that are
provided by SAP to access R/3 function modules from a Windows platform. We will
demonstrate how to call the standard RFC function module RFC_READ_TABLE.
Here you can see the basic example how to call R/3 RFC functions from Visual
Basic. This example will read the data from table T000 as also shown in the
previous chapter, where we discussed the RFC function RFC_READ_TABLE. If 45
you analyzed this example and understood how it works, I see no reason why you
should not be able to create any other application, that links to R/3.
SAP provides a set of interface OCX control and DLLs. They were written and
compiled in Visual Basic, so the OCX are technically compatible with your
Visual Basic. If there are still problems with compatibility, you better take it up 50
with Microsoft, not with SAP. SAP is seen by Visual Basic as an object like any
other object, e.g. the ADO-object, DAO-object or the FileSystem-Object. You
need to know the methods and the meaning of the properties, but you do not need
to know anything about R/3 to be able to use R/3 as an intelligent database server.
If you are completely ignorant about R/3 then you should regard R/3 as a 55
transparent database server and the function modules as stored procedures of this
database system.
This is a little VB Script example that demonstrates how you can call an RFC
function module in R/3. The function used is function RFC_READ_TABLE
which takes the name of a table as a parameter and returns its contents. As an 60
option you can pass a Visual Basic recordset to contain a simple SQL WHERE-
clause, which is added to the SQL statement issued by RFC_READ_TABLE.
If you fully understand how this example works then you should be able to write
any program you want to connect to R/3.
Reading data from an
arbitrary R/3 table with
RFC_READ_TABLE
Apart from the logon data
and the name of the
table we need nothing
else from R/3
R/3 is a stored procedure
database server
Example that reads data
from an R/3 table
The example is the basic
template for every R/3
access
评论0
最新资源