2013 Nov 29 4:34 AM
Hi All,
I developed the BSP Applications using java script. I want to get the input value into abap variable from inputfield in javascript. I have written the function code for this but it was not triggered. If any one knows Please let me know ASAP.
Thanks,
Santhosh
2013 Nov 29 5:10 AM
Hi,
Try this
1. Declare Input field like this on the layout of BSP, where ZNUM is the name of your input field.
<input type='text' id="ZNUM" name="ZNUM"
size="10" maxlength="10" value="" />
2.in on inputprocessing event you can fetch its value as Below.
write case statement for the event on any button of your layout.
Eg:- submit button
on layout.
<input name="onInputProcessing(submit)" type="submit" value=" Search " id="Search" class="cell"
style="margin-left:35px; position: absolute" />
on oninpuprocessing
ld_event = event_id.
case ld_event .
when 'submit'.
number(where you will get input value) = request->get_form_field( 'ZNUM' ).
endcase.
Regards,
Venkat
2013 Nov 29 8:49 AM
Hi Venkat,
I know the above condition. I want the same using Java Script in BSP.
Thanks,
Santhosh
2013 Nov 29 9:05 AM
Hi ,
Check this
var w_stat;
var w_stat_val;
w_stat = document.getElementById('ZNUM');
w_stat_val = w_stat.value;
Regards,
Venkat

2013 Nov 29 9:15 AM
Hi Venkat,
Thanks for given info. How can we pass this w_stat_val in abap variable.
Thanks,
Santhosh.