cancel
Showing results for 
Search instead for 
Did you mean: 

Submit button not calling InputRequest

Former Member
0 Kudos

Hi first of all sorry for the long code. I have the following code in one of our BSP applications. It is working fine if we have selected 6 records. If we select anything above 6 the submit button is not working.

<%@page language="abap"%>

<% data : l_counter type n,

l_selected_data type sel_data,

l_user_data type usr_data. %>

<SCRIPT type="text/javascript">

function calculate( counter ) {

var idName_bfc = 'bfc' + counter;

var idName_cer = 'cer' + counter;

var idName_dv = 'dv' + counter;

var idName_new_evalue = 'new_evalue' + counter;

var idName_new_exp = 'new_exp' + counter;

var idName_add_val = 'add_val' + counter;

var idName_new_evalue_i = 'new_evalue_i' + counter;

var dbl_bfc = 0.0;

var dbl_add_val = 0.0;

var dbl_new_exp = 0.0;

var dbl_dv = 0.0;

var dbl_cer = 0.0;

var dbl_result = 0.0;

{

}

dbl_bfc = parseFloat(document.getElementById(idName_bfc).innerText);

if (document.getElementById(idName_add_val).value == '')

dbl_add_val = 0;

else

dbl_add_val = parseFloat(document.getElementById(idName_add_val).value );

if (document.getElementById(idName_new_exp).value == '')

dbl_new_exp = 0;

else

dbl_new_exp = parseFloat(document.getElementById(idName_new_exp).value );

dbl_dv = parseFloat(document.getElementById(idName_dv).innerText );

dbl_cer = parseFloat(document.getElementById(idName_cer).innerText );

if (dbl_new_exp != 0)

dbl_result = (( dbl_bfc + dbl_add_val ) * dbl_new_exp / 100) + dbl_dv;

else

dbl_result = (( dbl_bfc + dbl_add_val ) * dbl_cer / 100) + dbl_dv;

document.getElementById(idName_new_evalue).innerText = Math.round(dbl_result * 100)/100;

document.getElementById(idName_new_evalue_i).value = Math.round(dbl_result * 100)/100;

}

</SCRIPT>

<html>

<head>

<link type="text/css" rel="stylesheet" href="../public/bw/customer/stylesheets/PGFSGB.css">

<title>User entry screen</title>

</head>

<body>

<h3><%= page->messages->assert_message( 'invaliddata' ) %></h3>

<form name="dataform" >

<table width="300" class="SAPBEXCellspacing" border="0" cellspacing="1" cellpadding="1">

<tr>

<% data : l_date(10) type c.

write : sy-datum to l_date.

%>

<td nowrap class="SAPBEXchaText">Document date(dd.mm.yyyy)</td><td><input type=text size=10 name="doc_date" value="<%=l_date%>"></td>

</tr>

<tr>

<td nowrap class="SAPBEXchaText">Posting date(dd.mm.yyyy)</td><td><input type=text size=10 name="post_date" value="<%=l_date%>"></td>

</tr>

</table>

<table width="300" class="SAPBEXCellspacing" border="0" cellspacing="1" cellpadding="1">

<tr>

<td nowrap class="SAPBEXchaText"></td>

<td nowrap class="SAPBEXchaText">Client</td>

<td nowrap class="SAPBEXchaText">Contract</td>

<td nowrap class="SAPBEXchaText">LineNo.</td>

<td nowrap class="SAPBEXchaText">New Exp.Recovery</td>

<td nowrap class="SAPBEXchaText">Additional Value Perf. Var</td>

<td nowrap class="SAPBEXchaText">Narrative</td>

<td nowrap class="SAPBEXchaText">New Engagement Value</td>

<td nowrap class="SAPBEXchaText">Currency</td>

<td nowrap class="SAPBEXchaText">Unbilled VoE</td>

<td nowrap class="SAPBEXchaText">Bills on Account </td>

<td nowrap class="SAPBEXchaText">Engagement Value</td>

<td nowrap class="SAPBEXchaText">Disbursements Value</td>

<td nowrap class="SAPBEXchaText">Calc Perf. Variance</td>

<td nowrap class="SAPBEXchaText">Basis for % Calculation</td>

<td nowrap class="SAPBEXchaText">Value Perf. Var. (Time)</td>

<td nowrap class="SAPBEXchaText">Planned Val.-Time</td>

<td nowrap class="SAPBEXchaText">Market Scale Value</td>

<td nowrap class="SAPBEXchaText">Current Exp. Recovery %</td>

</tr>

<%

clear l_counter.

loop at selected_data into l_selected_data.

l_counter = l_counter + 1.

clear l_user_data.

read table user_data into l_user_data

with key soldto = l_selected_data-soldto

contract = l_selected_data-contract

contractline = l_selected_data-contractline.%>

<tr>

<% if l_user_data-processed = 'X'. %>

<td nowrap class="SAPBEXstdItem"><IMG src="../PUBLIC/BC/Icons/s_b_okay.gif"></td>

<% elseif l_user_data-processed = 'E'. %>

<td nowrap class="SAPBEXstdItem"><IMG src="../PUBLIC/BC/Icons/s_b_canc.gif"></td>

<% else. %>

<td nowrap class="SAPBEXstdItem"></td>

<% endif. %>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-soldto%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-contract%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-contractline%></td>

<td nowrap class="SAPBEXstdItem"><input type=text size=10 id="new_exp<%=l_counter%>" name="user_data[<%=l_counter%>].new_exp" value="<%=l_user_data-new_exp%>" onChange="calculate('<%=l_counter%>')"></td>

<td nowrap class="SAPBEXstdItem"><input type=text size=10 id="add_val<%=l_counter%>" name="user_data[<%=l_counter%>].add_val" value="<%=l_user_data-add_val%>" onChange="calculate('<%=l_counter%>')"></td>

<td nowrap class="SAPBEXstdItem"><input type=text size=10 id="narr<%=l_counter%>" name="user_data[<%=l_counter%>].narr" value="<%=l_user_data-narr%>" onChange="calculate('<%=l_counter%>')"></td>

<td id="new_evalue<%=l_counter%>" nowrap class="SAPBEXaggItem"><%=l_user_data-new_evalue%></td>

<td nowrap class="SAPBEXstdItem"><input type=text readonly size=5 value="<%=l_selected_data-currency%>"></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-uvoe%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-boa%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-ev%></td>

<td id="dv<%=l_counter%>" nowrap class="SAPBEXstdItem"><%=l_selected_data-dv%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-cpv%></td>

<td id="bfc<%=l_counter%>" nowrap class="SAPBEXstdItem"><%=l_selected_data-bfc%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-vpv%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-pvt%></td>

<td nowrap class="SAPBEXstdItem"><%=l_selected_data-msc%></td>

<td id="cer<%=l_counter%>" nowrap class="SAPBEXstdItem"><%=l_selected_data-cer%></td>

</tr>

<input type=hidden name="user_data[<%=l_counter%>].soldto" value="<%=l_selected_data-soldto%>">

<input type=hidden name="user_data[<%=l_counter%>].contract" value="<%=l_selected_data-contract%>">

<input type=hidden name="user_data[<%=l_counter%>].contractline" value="<%=l_selected_data-contractline%>">

<input type=hidden id="new_evalue_i<%=l_counter%>" name="user_data[<%=l_counter%>].new_evalue" value="<%=l_user_data-new_evalue%>">

<% endloop. %>

</table>

<table width="300" class="SAPBEXCellspacing" border="0" cellspacing="1" cellpadding="1">

<tr>

<td><input type="submit" name="onInputProcessing(transfer)" value="Transfer to R/3"></td>

</tr>

</table>

<input type=hidden name="sel_from" value="<%=sel_from%>">

<input type=hidden name="sel_to" value="<%=sel_to%>">

</form>

</body>

</html>

Please help!

Accepted Solutions (0)

Answers (1)

Answers (1)

athavanraja
Active Contributor
0 Kudos

it will be really difficult to go thru this large code. can you you brief us on what you want to do?

Regards

Raja