cancel
Showing results for 
Search instead for 
Did you mean: 

HTMLB Event onClientClick & onClick - Call Javascript and ABAP FM

Former Member
0 Kudos

Hi,

On button click, we want to call Java script function, and if the Java function result is true, in the same event as continuation we want to call ABAP FM.

Went through couple of posts and blog by Thomas jung.

We can make use of HTMLB event onClientClick and onClick, but not sure, how can i take the result of Javascript button press and based on which my ABAP FM to be called.

Pls suggest.

Warm Regards,

Ashwin.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ashwin,

Check the following threads, which speaks about the same functionality.

[link 1|;

[link 2|;

Regards,

Ravi

Former Member
0 Kudos

Thank you.

That helps. But my actual requirement is i need to pass runtime generated value from my javascript to OnInputProcessing ABAP code.

Flow: Click on a button in page: should execute Jscript Function and this gives some return value.

In the same event it should pass this value to OnInputProcessing ABAP variable where i want to pass this value to ABAP FM and update Z-table.

Tried various ways, somehow not successfull.

Kindly suggest.

Warm Regards,

Ashwin.

Former Member
0 Kudos

Ok I can make use of first link, IF ABLE TO fill the ITAB value by calling java script function at runtime i.e on clicking the dropdown list.

Can you pls suggest, how do we do that. I am new to BSP. Basically from SRM.

Warm Regards,

Ashwin.

Former Member
0 Kudos

Hi,

you´ll have to rethink your problem and a possible solution. What you pretend cannot be done: you say you work with events OnClick and OnClientClick for triggering OnInputProcessing and JS-code respectively. Think of it in this way: you follow now to different roads at the same time, 1 goes left and the other one goes right .... and you want that the left road turns at a certain point to the right.

What do you do with the JS-code ??? can´t you write some programme or function that processes the same in your OnInputProcessing event ??

Either you write all the code in JS or in ABAP but not both.

Former Member
0 Kudos

Hi Jorge,

This JS calls a function of JAVA BASED 3rd party interfacing software which verifies the digital signature and returns back signed value to a java script variable.

Function to Sign RFx Text Form data

function_to_formSign()

{

varlcertstr=signText("<%= lv_rfx_id%>");

__alert(lcertstr);

}

Note: Replacing space with underscore "_" as unable to paste java script code here...

My Requirement: Need to save this "lcertstr" into ABAP table. Am able to get value into lcertstr which is a JavaScript variable. But how to further proceed.

Pls suggest any solution feasible. We want to meet this requirement.

Warm Regards,

Ashwin.