Getting this error
Error: An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
An unexpected error occurred: ORA-06502: PL/SQL: numeric or value error (WWV-16016)
(WWV-00000)
The preference path does not exist: ORACLE.WEBVIEW.PARAMETERS.62496410985 (WWC-51000)
Here is the code I am working with. I appreciate any help. Thanks
CODE
htp.p('<script language="JavaScript" type="text/javascript">
<!--
document.forms[0].elements[9].disabled = true;
//-->
</script>');
DECLARE
v_source VARCHAR2(100);
v_sessionid NUMBER;
v_detail_id NUMBER:= p_session.get_value_as_number(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_detail_ID');
CURSOR c_detailrpt is
select ah_detail_id, filename, filetype
from ad_hoc_detail
where ad_ah_rpt_id = v_detail_id;
vlink varchar2(1000);
v_current_created_by acquisitions.adhoc_rpt.created_by%TYPE;
BEGIN
select portal.wwctx_api.GET_USER INTO v_source FROM dual;
select portal.wwctx_api.get_sessionid() INTO v_sessionid FROM dual;
SELECT i.created_by
INTO v_current_created_by
FROM adhoc_rpt i
WHERE i.ah_rpt_id = v_detail_id;
htp.p('
<script type="text/javascript" language="javascript">
storeIncident(document.forms[0].elements[9].value);
storeSessionSource("'||v_sessionid||'","'||v_source||'");
document.getElementById("current_created_by").value = "'||v_current_created_by||'";
document.getElementById("current_created_by").disabled = true;
</script>
');
htp.p('
</TD>
</TR></table>
</div>
</div>
</div>
</body>
</TD></TABLE></TD>');
htp.formOpen('PORTAL.wwa_app_module.link?
p_arg_names=_moduleid
&p_arg_values=62514652535
&p_arg_names=ah_detail_id
&p_arg_values='||v_detail_id, 'post');
htp.formSubmit('ADD File');
htp.formClose();
htp.p('<TABLE class="tbl">');
for c in c_detailrpt
LOOP
vlink := portal.wwv_user_utilities.get_url('acquisitions.ADHOC_RPT_LINK','ah_detail_id',c.ah_detail_id,'_detail_id_cond','=');
htp.p('<tr>');
htp.p('<td class="label">Detail ID</td>');
htp.p('<td class="field"><a href="'||vlink||'">'||c.ah_detail_id||'</a></td>');
htp.p('</tr>');
/*htp.p('<tr>');
htp.p('<td class="label">File Name</td>');
htp.p('<td class="field">'||c.filename||'</td>');
htp.p('</tr>');*/
htp.p('<tr>');
htp.p('<td class="label">File Type</td>');
htp.p('<td class="field">'||c.filetype||'</td>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
END LOOP;
htp.p('</TABLE>');
END;
<!--
document.forms[0].elements[9].disabled = true;
//-->
</script>');
DECLARE
v_source VARCHAR2(100);
v_sessionid NUMBER;
v_detail_id NUMBER:= p_session.get_value_as_number(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_detail_ID');
CURSOR c_detailrpt is
select ah_detail_id, filename, filetype
from ad_hoc_detail
where ad_ah_rpt_id = v_detail_id;
vlink varchar2(1000);
v_current_created_by acquisitions.adhoc_rpt.created_by%TYPE;
BEGIN
select portal.wwctx_api.GET_USER INTO v_source FROM dual;
select portal.wwctx_api.get_sessionid() INTO v_sessionid FROM dual;
SELECT i.created_by
INTO v_current_created_by
FROM adhoc_rpt i
WHERE i.ah_rpt_id = v_detail_id;
htp.p('
<script type="text/javascript" language="javascript">
storeIncident(document.forms[0].elements[9].value);
storeSessionSource("'||v_sessionid||'","'||v_source||'");
document.getElementById("current_created_by").value = "'||v_current_created_by||'";
document.getElementById("current_created_by").disabled = true;
</script>
');
htp.p('
</TD>
</TR></table>
</div>
</div>
</div>
</body>
</TD></TABLE></TD>');
htp.formOpen('PORTAL.wwa_app_module.link?
p_arg_names=_moduleid
&p_arg_values=62514652535
&p_arg_names=ah_detail_id
&p_arg_values='||v_detail_id, 'post');
htp.formSubmit('ADD File');
htp.formClose();
htp.p('<TABLE class="tbl">');
for c in c_detailrpt
LOOP
vlink := portal.wwv_user_utilities.get_url('acquisitions.ADHOC_RPT_LINK','ah_detail_id',c.ah_detail_id,'_detail_id_cond','=');
htp.p('<tr>');
htp.p('<td class="label">Detail ID</td>');
htp.p('<td class="field"><a href="'||vlink||'">'||c.ah_detail_id||'</a></td>');
htp.p('</tr>');
/*htp.p('<tr>');
htp.p('<td class="label">File Name</td>');
htp.p('<td class="field">'||c.filename||'</td>');
htp.p('</tr>');*/
htp.p('<tr>');
htp.p('<td class="label">File Type</td>');
htp.p('<td class="field">'||c.filetype||'</td>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
htp.p('<tr>');
htp.p('</tr>');
END LOOP;
htp.p('</TABLE>');
END;