The example of ASP calling RFC has never been found. On the internet, Asp.net calls RFC,
I have no idea about ASP code, but the Code involved here is relatively simple.
<% @ Language = VBScript %>
<HTML>
<Head>
<%
Dim ologoncontrol
Dim obapicontrol
Dim oconn
Dim ocompanycode
Dim otabcompanycodes
Dim oreturn
Dim ocol
Dim orow
Dim itab
Dim ofun
Dim func
Dim iCall
Dim I
Sub main ()
'Set obapicontrol = Createobject ("sap. bapi.1 ″)
Set ologoncontrol = Createobject ("sap. logoncontrol.1 ″)
Set oconn = ologoncontrol. newconnection
Oconn. applicationserver = "IPaddress" 'IP address
Oconn. System = "00" 'system number
Oconn. Client = "600" 'System
Oconn. User = "user" 'User Name
Oconn. Password = "password" 'Password
Oconn. Language = "en"
Retcm = oconn. Logon (0, true)
Response. Write (retcm)
Response. Write ("<br> ")
If (retcdtrue) then
Response. Write ("No Logon ")
Stop
Else
'Obapicontrol. Connection = oconn
'Set ocompanycode = obapicontrol. getsapobject ("companycode ")
Set ofun = Createobject ("sap. Functions ")
Set ofun. Connection = oconn
Set func = ofun. Add ("z_pp_proodr3") 'Here is the rfc I called (take the production order)
Func. Exports ("inidat") = "20101124 ″'Input parameters
Func. Exports ("enddat") = "20101128 ″'Input parameters
ICall = func. Call
Set itab = func. Tables. Item ("zafpo") 'internal table in my RFC (obtained production order)
Response. Write ("<br> ")
For I = 1 to itab. Rows. Count
For each ocol in itab. Columns
Response. Write ocol. Value (I)
Response. Write ("")
Next
Response. Write ("<br> ")
Next
End if
End sub
%>
</Head>
<Body>
<% Call main () %>
</Body>
</Html>