Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HTML SAP LOGON

umayaraj
Participant
0 Likes
539

hi i get some code in online i try to use in html while i got an error message,like "uncaught referenceerror" and search in internet based on some blog ans ,i change my browser settings for active x enable then i try in browser but same error occurred.

<!DOCTYPE html>
<html>
<head>
<script language="JavaScript">
retcd = 0;
exceptions = 0;
function SAPlogon()  
	{  
	fns = new ActiveXObject("SAP.Functions");  
	trans = fns.Transactions;  
	conn = fns.connection;  
	conn.System = "DEV";  
	conn.user = "ABAP";  
	conn.password = "*****";  
	conn.Client = "100";  
	conn.Language = "EN";  
	conn.tracelevel = 6;  
	conn.RFCWithDialog = 1;  
	conn.logon(0, 0);  
	exceptions = 0;  
	};
function SAPlogoff()
{
conn.logoff(0, 0);
exceptions = 0;
};
</script>
</head>
<body>
<button type="button" onclick="SAPlogon()">Logon</button>
<button type="button" onclick="SAPlogoff()">Logoff</button>
</body>
</html> 


error on "fns = new ActiveXObject("SAP.Functions"); " this line.

Can you give some idea to resolve this problem .

Thanks and regard,

B.Umayaraj.

1 REPLY 1
Read only

matt
Active Contributor
0 Likes
427

That's not HMTL. It's JavaScript. The HTML even tells you this.

<script language="JavaScript">