cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Data From ASP to BSP application

Former Member
0 Kudos

Hi,

I have a scenario where my frontend is ASP(not .Net) and my Backend is a CRM sys.

When there is any user registration in ASP i need to create a BP in CRM.

I donot have an option of XI.

My ideaa is on save i call my BSP application which inturn saves the data in CRM.

1.So how do i pass the Data to the BSP .

2.How do i extract the data at the BSP application level

3.Is the length of the data restriced

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

1. you could create a BSP page with required form fields and these can be supplied from your ASP as HTTP POST

2. normal ABAP code

3. if you are using GET method to pass data between asp and bsp, yes there is limitation, if you use POST there is not limitation.

how are you planning to handle authentication when calling BSP from ASP

you could also use saps RFC library to call function modules from your ASP page.

here is a sample VBscript code to call a R/3 FM (for this to work you sould have librfc registered in local machine.


<script language="VBScript"> 
sub get_cust_data() 

dim fns 
set fns = createobject("SAP.Functions") 
fns.logfilename = "my_log.txt" 
fns.loglevel = 6 

dim conn 
set conn = fns.connection

 

conn.ApplicationServer = "<application server address>" 
conn.System = "DEV" 
conn.user = document.myf.t1.value 
conn.password = document.myf.t2.value 
conn.Client = "001" 
conn.Language = "E" 
conn.tracelevel = 6 

if conn.logon(0, true) <> true then 
exit sub 
end if 


dim myfunct 
set myfunc = fns.add("THUSRINFO") 


result = myfunc.Call 
the_exception = myfunc.exception 

dim users 
if result = true then 
set users = myfunc.tables.item("USR_TABL") 
document.write "Table USR_TABL, " & users.rowcount & " rows" 
document.write "<table border=1>" 
document.write "<tr>" 
document.write "<td>BNAME</td>" 
document.write "<td>MANDT</td>" 
document.write "<td>TCODE</td>" 
document.write "<td>TERM</td>" 
document.write "<td>ZEIT</td>" 
document.write "<td>HOSTADR</td>" 
document.write "<td>RFC TYPE</td>" 
document.write "</tr>" 
for each user in users.Rows 
document.write "<tr>" 
document.write "<tr>" 
document.write "<td>" 
document.write trim(user("BNAME")) 
document.write "</td>" 
document.write "<td>" 
document.write trim(user("MANDT")) 
document.write "</td>" 
document.write "<td> " 
document.write trim(user("TCODE")) 
document.write "</td>" 
document.write "<td> " 
document.write trim(user("TERM")) 
document.write "</td>" 
document.write "<td>" 
document.write trim(user("ZEIT")) 
document.write "</td>" 
document.write "<td>" 
document.write trim(user("HOSTADR")) 
document.write "</td>" 
document.write "<td> " 
document.write trim(user("RFC_TYPE")) 
document.write "</td>" 
next 
document.write "</table>" 
set users = nothing 
end if 



fns.connection.logoff 
Set fns = nothing 
Set conn = nothing 

end sub 
</script> 

Raja

Former Member
0 Kudos

Hi,

I mean what is the middleware i need to use.

My Frontend is not a .Net application its an ASP application.

I cannot use the DCOM connector.

Did you try doing this with an ASP system.

Actually i am not familiar with ASP

athavanraja
Active Contributor
0 Kudos

no need of a middleware.

i too dont know ASP but the fundamentals are same as BSP.

what you could do is create bsp applications which return data in xml format and use XMLHTTPRequest object to make calls to these bsp pages to get data.

Raja

Former Member
0 Kudos

Ok,But how do i get data from the ASP to BSP.

athavanraja
Active Contributor
0 Kudos

from asp POST data to bsp.

in the bsp page declare a page attribute with auto checked of type string. and set that as a value of a hidden form field.

from asp post values to this field (may be xml format) and within bsp you have to parse this and use it.

Raja

Former Member
0 Kudos

Hi,

I am very new to ASP.

Any idea how do i post the values from ASP to BSP .

Can you gimme some sample code.

an how do i retrieve the values.

Thanks a lot

athavanraja
Active Contributor
0 Kudos

this code should be something like below

<form method="POST" action="<url of your BSP>">

	<input type="text" name="bsppageattributenam" size="20">
	<input type="submit" value="Submit" name="B1">
</form>

Answers (0)