Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2008, 11:47 PM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default SAP connection with ASP

Dear all,
I m currently working on ASP application where i have to use SAP connection as some of the data is coming from SAP.
I m new to this so if someone can help me out for this.

Basically how to connect with RFC? how to call funcion from SAP. how to retrieve the data from function, etc.....

Thanks.

Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.
__________________
Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.
 
Old April 1st, 2008, 12:33 AM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default

hi all,
M working on one ASP project where i have to get data from SAP RFC Function.
I have successfully made the connection to SAP but now as soon as m adding function to sap object my system hangs no error msg nothing.
pl help wat to do...?
my code as below:
Public theFunc

Public con
Public sapObj
Dim returnFunc

Set sapObj = CreateObject("SAP.Functions")
Set sapConnection = CreateObject("SAP.Logoncontrol.1")
Set sapConnection = sapConnection.NewConnection

sapConnection.System = "00"
sapConnection.ApplicationServer = "10.27.1.252"
sapConnection.client = 300
sapConnection.user = "TMRAHIL"
sapConnection.Password = "ENGLAND1"
sapConnection.language = "EN"

'**************************************
'Log On to the SAP System
'**************************************
Set functionCtrl = server.CreateObject("SAP.Functions")
retcd=sapConnection.Logon(0,true)
If RetCd = False Then
  Response.write "SAP Logon Failed."
  Response.End
else
  Response.write "SAP Logon Succeeded."
end if

UPTO THIS MY SYSTEM WORKS FINE BUT AFTER THAT SYSTEM HANGS.
*****************************************
Set theFunc = functionCtrl.Add("ZPOMDRREP")
theFunc.Exports("EBELN") = "3019380"
returnFunc = theFunc.Call

If returnFunc = True Then
  Set docs = theFunc.tables.Item("MAT_INFO")
  Response.write "SAP Data found."
else
  Response.write "SAP Data NOT found."
end if


Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.

Komila Kalia
Software Developer
Reliance engineering Associates (P) Ltd.





Similar Threads
Thread Thread Starter Forum Replies Last Post
SAP Connection with ASP Komila Classic ASP Components 1 June 17th, 2008 10:52 AM
SAP R/3...wanna know more myquery Other Programming Languages 1 October 22nd, 2007 09:09 AM
SAP connection thePT Classic ASP Components 0 May 15th, 2007 11:37 AM
create functions to VisualB from SAP deedee VB How-To 0 December 5th, 2003 02:00 PM
create functions to VisualB from SAP deedee VB.NET 2002/2003 Basics 0 December 5th, 2003 01:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.