cancel
Showing results for 
Search instead for 
Did you mean: 

Link ABAP code with JavaScript Code in Business Server Pages (BSPs)

Former Member
0 Kudos

Hello guys,

I'm working in a BSP application and I need to use an ABAP value in the JavaScript code Do you know how do I have to define this variable to be recognized in the JavaScript code?

For example, declaring <%@page language="abap"%> on top of HTM page, I can link HTMLB code with ABAP code as follows: <% ABAP VALUE %>. Exist anything similar for JavaScript?

If answer is not, exist any property of an DIV object which defines the selected row to be recovered with getElementById function?

Thanks in advance,

Arnau

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

LOL I forgot to put the " " ...

I was crazy looking for alternatives...

Thanks to all.

Arnau

Patrick_McMahon
Contributor
0 Kudos

Hi Arnau,

You need to surround your JavaScript code like this (without the spaces before and after script):

< script language="Javascript">
  window.open("<%=ABAP_VARIABLE%>").focus();
</script >

Regards,

Patrick.

athavanraja
Active Contributor
0 Kudos

check the samples below.



var myvar = '<%= myabapvarnname%>' ;