I have been reading up in the ABAPDOCU in SAP that there is a class available to use in ABAP that will simulate a JAVA Script engine.
The class is CL_JAVA_SCRIPT.
According to the documentation there are 4 things you need to do to get the JAVA Script engine to function in the ABAP environment.
The following in exerpted from the ABAPDOCU:
Methods 2 to 4 are combined in the method EVALUATE.
I just used their class to write a hello world in JAVA SCRIPT also taken from their docu section…
DATA: js_processor TYPE REF TO cl_java_script,
return_value TYPE string.
js_processor = cl_java_script=>create( ).
js_processor->compile( script_name = 'SCR.JS'
script = 'var Field = "Hello World!";' ).
js_processor->execute( script_name = 'SCR.JS' ).
js_processor->evaluate( java_script = 'Field;' ).
So I guess my question is, If we have to have the PI environment to run certain programs because they require JAVA Script to run, WHY not convert them to use the JAVA_SCRIPT class?