Skip to Content
-1

Execute BSP Application from ABAP and get the results

Jun 23, 2017 at 03:36 PM

117

avatar image
Former Member

Hello,

I have some processing to be done in Javascript using a third party library. So I thought of creating a BSP application and add the JavaScript Library to it. But I need to call the BSP application from ABAP. I have to pass some parameters to the BSP application and get back the result in ABAP.

So Basically I need to execute the BSP application from ABAP by passing some arguments and get back the result from the BSP application.

Can someone help me know how to achieve this?

Regards,

Purayil.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Lars Hvam
Jun 24, 2017 at 06:53 AM
0

The JavaScript is executed in the client browser, fetching the BSP from ABAP will bypass the browser and the JavaScript will not be executed.

Suggest writing the JavaScript logic in ABAP, or introduce additional components in your architecture eg. http://phantomjs.org/

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Lars,

My requirement is to convert HTML to PDF, which is not possible in ABAP. I get the HTML content from the client and ABAP has no idea how the HTML would look like. CONVERT_PDF function module does not work since it required the data to be in a specific OTF format.

I am looking to do this in Java and call the Java from ABAP.

Thanks and regards,

Purayil.

0

In you question, you talk about JavaScript. In your comment Java. These are two quite distinct languages. Furthermore, if you read the answers to your other question, you'll see that you missed a step for getting the data into OTF format.

0
Uwe Fetzer Jun 26, 2017 at 11:33 AM
0

There still (7.50) exists a long depreciated class called CL_JAVA_SCRIPT in the ABAP stack....

If you don't want to run the program in batch mode you may also start the BSP-Application via CL_GUI_FRONTEND_SERVICES=>EXECUTE and passing the variables via URL-Parameters. The last step in the Javascript should be the closing of the window. The returning parameters could be written into the memory or passed via push/message channels..

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Just have read the comments on Lars' answer -> forget my answer

0