cancel
Showing results for 
Search instead for 
Did you mean: 

BC-BSP: Is it possible to have JavaScrpt & ABAP(BSP) Code on the Same Page?

Former Member
0 Kudos

Hello Experts-

Can I have a page in a BSP application that uses both JavaScript and ABAP for a page language. I want to use both these scripting languages within one same page to utilize some features of both.

I know I can't declare them both to be my page languages on the top of my page. Is there any other way that this is possible?

Can I do something with the way I open and close my script tags within the page?

Thanks,

- Vik.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member583013
Active Contributor
0 Kudos

Sure you can. Use 'page language' for abap, and "<script language=" for javascript.

Regards,

<b>Venky Varadadesigan</b>

SAP NetWeaver consulting.

Former Member
0 Kudos

Hi Venky-

This solution doesn't seem to work for me.

If I declare the directives on my page as:

<%@page language="abap"%>

<%@script language="javascript"%>

<%@extension name="htmlb" prefix="htmlb"%>

Then I get an error during syntax checking. The error refers to line 2 and is: "A page, Include statement, or extension directive was expected.".

So, How can I use 'page language' for ABAP, and 'script language' for Javascript?

Thank you,

- Vik.

Former Member
0 Kudos

Hi Venky:

Nevermind the previous question.

I figured it out.

I think what you were saying was that <script language> doesn't have to be a page level directive. It can be a code specific directive.

I moved the declaration from the top of the page to a section within the page where I was coding some javascript code.

It works very well now.

Thank you,

- Vik.