Problem in Retrieval of archived data
I have archived data from DSO successfully but after sometime activation of new data records on that DSO got failed it was showing this error ' 176 records are locked by the archiving object '. To remove this activation error I deleted the archiving object of that DSO. And issue got resolved.
But now when I want to retrieve that archived data onto the copy of that DSO. DTP is not able to fetch any archived data records and get over with green status.
I also used SARA tcode to reload data onto the DSO for that I entered archiving object name but when i press Archive Selection tab its showing nothing to select.
Kindly help me with this issue.
Hello,
Correct me if i'm wrong with understanding, you want to retrieve the archive data but by running read program you are not able to display data from archive/file.
- Run the read program in batch mode not with option Dialog mode.
Reload will re-load the data back into your database tables. With reload option you are not getting archive session to select... If so then check your archive session status, if case archive session is incomplete then it will not appear.
-Thanks,
Ajay
Similar Messages
-
Problem with retrieving single digit date and month
Hello Sir,
I have the following code. Cuurently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.
This is the jsp for creating and editing the records.
<HTML>
<HEAD>
<TITLE> CRM Event Information </TITLE>
<script language="JavaScript" src="../javascript/misc.js"></script>
<script language="JavaScript">
function saveMe(methodHow) {
var elementNumber = CRMEvent.elements.length
var field1 = "";
var field2 = "";
var field3 = "";
var field4 = "";
var field5 = "";
var field6 = "";
var field7 = "";
var field8 = "";
for(i=0; i < elementNumber; i++){
submitForm.elements.name = CRMEvent.elements[i].name;
submitForm.elements[i].value = CRMEvent.elements[i].value;
for (k = 0; k < oneToMany1.addedItems.options.length; k++){;
if (addTemp.field1oneToMany1Value[k] == ""){
addTemp.field1oneToMany1Value[k] = "9999"
if (addTemp.field2oneToMany1Value[k] == ""){
addTemp.field2oneToMany1Value[k] = "99"
if (addTemp.field3oneToMany1Value[k] == ""){
addTemp.field3oneToMany1Value[k] = "99"
if (addTemp.field4oneToMany1Value[k] == ""){
addTemp.field4oneToMany1Value[k] = "9999"
if (addTemp.field5oneToMany1Value[k] == ""){
addTemp.field5oneToMany1Value[k] = " "
if (addTemp.field6oneToMany1Value[k] == ""){
addTemp.field6oneToMany1Value[k] = " "
if (addTemp.field7oneToMany1Value[k] == ""){
addTemp.field7oneToMany1Value[k] = " "
if (addTemp.field8oneToMany1Value[k] == ""){
addTemp.field8oneToMany1Value[k] = " "
if (eval(oneToMany1.addedItems.options.length - 1) == k){
field1 = field1 + addTemp.field1oneToMany1Value[k];
field2 = field2 + addTemp.field2oneToMany1Value[k];
field3 = field3 + addTemp.field3oneToMany1Value[k];
field4 = field4 + addTemp.field4oneToMany1Value[k];
field5 = field5 + addTemp.field5oneToMany1Value[k];
field6 = field6 + addTemp.field6oneToMany1Value[k];
field7 = field7 + addTemp.field7oneToMany1Value[k];
field8 = field8 + addTemp.field8oneToMany1Value[k];
}else{
field1 = field1 + addTemp.field1oneToMany1Value[k]+"|";
field2 = field2 + addTemp.field2oneToMany1Value[k]+"|";
field3 = field3 + addTemp.field3oneToMany1Value[k]+"|";
field4 = field4 + addTemp.field4oneToMany1Value[k]+"|";
field5 = field5 + addTemp.field5oneToMany1Value[k]+"|";
field6 = field6 + addTemp.field6oneToMany1Value[k]+"|";
field7 = field7 + addTemp.field7oneToMany1Value[k]+"|";
field8 = field8 + addTemp.field8oneToMany1Value[k]+"|";
submitForm.elements[eval(i)].name = "eventtype"
submitForm.elements[eval(i)].value = field1
submitForm.elements[eval(i+1)].name = "dd_crmstart"
submitForm.elements[eval(i+1)].value = field2
submitForm.elements[eval(i+2)].name = "mm_crmstart"
submitForm.elements[eval(i+2)].value = field3
submitForm.elements[eval(i+3)].name = "yy_crmstart"
submitForm.elements[eval(i+3)].value = field4
submitForm.elements[eval(i+4)].name = "crmremark_code"
submitForm.elements[eval(i+4)].value = field5
submitForm.elements[eval(i+5)].name = "crmperson_firstname"
submitForm.elements[eval(i+5)].value = field6
submitForm.elements[eval(i+6)].name = "crmperson_lastname"
submitForm.elements[eval(i+6)].value = field7
submitForm.elements[eval(i+7)].name = "crmnote"
submitForm.elements[eval(i+7)].value = field8
submitForm.elements[eval(i+8)].name = "mode"
submitForm.elements[eval(i+8)].value = methodHow
submitForm.method="post";
onSave(submitForm);
function onSave(form) {
if (!oneToMany1.addedItems.options.length == 0) {
for (i=1;i<=oneToMany1.addedItems.options.length;i++) {
validate.elements[0].value = addTemp.field4oneToMany1Value[i-1];
if (validate.elements[0].value != '9999') {
if(!validateForm('validate','validation','isNumber')) {
alert("CRM Event Information "+ i + ": Year must be number");
return false;
if(!validateForm('validate','validation','checkrange')) {
alert("CRM Event Information "+ i + ": Year out of range");
return false;
form.submit();
return true;
</script>
</HEAD>
<BODY BGCOLOR=#ffffff>
<BASEFONT="3">
<FONT SIZE = -1>
<%@ page errorPage="errorPage.jsp" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="dss.*" %>
<!-- instantiate -->
<jsp:useBean id="pool" scope="session" class="dss.ConnectionPool" />
<jsp:useBean id="SelectBox" scope="session" class="dss.dataMisc" />
<jsp:useBean id="query" class="dss.QueryData" scope="session" />
<%
// *************check for user session *************
session = request.getSession();
if (session.getValue("userSession") == null) {
response.sendRedirect (response.encodeRedirectUrl
("dssLogin.jsp?Origin=dssACCRMEventAddEdit.jsp"));
else {
String dhr_id = "";
String mode = "";
String eventtype = "9999";
String crmremark_code = "";
String crmperson = "";
String crmnote = "";
String crmKey = "";
String dd_crmstart = "99";
String mm_crmstart = "99";
Vector tempVector = new Vector();
Vector CRMEventVector = new Vector();
Vector CRMEventPerson = new Vector();
Vector monthVector = new Vector();
Vector dayVector = new Vector();
Vector field1Vector = new Vector();
Vector field5Vector = new Vector();
Vector field6Vector = new Vector();
Vector field7Vector = new Vector();
Vector field8Vector = new Vector();
Vector field234Vector = new Vector();
Vector tempDayVector = new Vector();
Vector tempMonthVector = new Vector();
Vector tempYearVector = new Vector();
Connection conn = null ;
conn = pool.getConnection() ;
dss.Database db = new dss.Database( conn ) ;
dhr_id = request.getParameter("dhr_id");
try {
mode = request.getParameter("mode");
dhr_id = request.getParameter("dhr_id");
//look up Setting List
String strSQL = "";
//look up CRM Event Type List
strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
db.setSQL( strSQL ) ;
db.query() ;
CRMEventVector = db.getSelectionList() ;
//look up Month List
db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
db.query() ;
monthVector = db.getSelectionList();
//look up Day List
db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
db.query() ;
dayVector = db.getSelectionList();
// ************ EDIT Mode *************
if (mode.equals("edit"))
//out.println("mode is edit");
mode = "edit";
//***********get archaeology_pkey based on dhr_id
int archKey = 0;
strSQL = " SELECT archaeology_pkey "+
" FROM archaeology "+
" WHERE UPPER(dhr_id)='"+ dhr_id.toUpperCase() + "'";
//out.println(strSQL);
Statement stmt2 = conn.createStatement();
ResultSet rs2 = stmt2.executeQuery(strSQL);
while (rs2.next()) {
archKey = rs2.getInt(1);
rs2.close();
stmt2.close();
// ********* end getting **************
strSQL = "Select crmtype_code, crmstart, crmremark, crmperson_firstname, crmperson_lastname, crmnote "+
" From archaeologycrmevent " +
" Where archaeology_pkey =" + archKey ;
Statement stmtSQL = conn.createStatement();
ResultSet rset = stmtSQL.executeQuery(strSQL);
ResultSetMetaData rsmd = rset.getMetaData() ;
while (rset.next()) {
//get values
field1Vector.addElement(rset.getString(1));
field234Vector.addElement(rset.getString(2));
field5Vector.addElement(rset.getString(3));
field6Vector.addElement(rset.getString(4));
field7Vector.addElement(rset.getString(5));
field8Vector.addElement(rset.getString(6));
//crmKey = rset.getString(7);
for (int i=0; i<field234Vector.size(); i++){
StringTokenizer tempDate = new StringTokenizer((String)field234Vector.elementAt(i),"/");
while (tempDate.hasMoreTokens() ) {
tempYearVector.addElement ( tempDate.nextToken());
tempMonthVector.addElement( tempDate.nextToken());
tempDayVector.addElement ( tempDate.nextToken());
} //end edit
} //end try
catch ( Exception e) {
out.println ( e.toString() ) ;
} finally {
db.cleanup() ;
%>
<P>
<FORM NAME="oneToMany1">
<TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#BBBBBB">
<TR>
<TD BGCOLOR="#002B82" COLSPAN=9 width="100%" height="31">
<p align="center">
<font face="Arial" size="2" color="#FFFFFF">
<b>6. CRM Event Information - </b>DHR ID# : <%=dhr_id %>
</font>
</p>
</td>
</TR>
<TR>
<TD WIDTH=83 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>CRM Event Type: </FONT></B></TD>
<TD WIDTH=112 height="21">
<%
out.println ( SelectBox.strSelectionList((Vector)CRMEventVector.elementAt(0), (Vector)CRMEventVector.elementAt(1), "field1", "", eventtype, "180" ));
%>
</TD>
<TD WIDTH=89 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>Event Date: </FONT></B></TD>
<TD WIDTH=455 height="21"><font size="1">
<%
out.println ("<b><font size = 1>Date: "+ SelectBox.strSelectionList((Vector)dayVector.elementAt(0), (Vector)dayVector.elementAt(1), "field2", "", dd_crmstart, "180" ));
out.println ("Month: "+ SelectBox.strSelectionList((Vector)monthVector.elementAt(0), (Vector)monthVector.elementAt(1), "field3", "", mm_crmstart, "180" ));
%>
</select><B>Year:</B><input type="text" name="field4" size="4" id="Year" maxlength="4">
</TD>
</TR>
<TR>
<TD WIDTH=83 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>ID# Associated with Event:</B> </FONT></TD>
<TD WIDTH=112 height="30">
<input type="text" name="field5" size="15" value="<%=crmremark_code%>">
</TD>
<TD WIDTH=89 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>
CRM Person/ Organization: </FONT></B></TD>
<TD WIDTH=455 height="30">
<% // Modified by Robert Cox 09/12/2001 - changed field size from 20 to 30 // %>
<TABLE BORDER="0">
<TR><TD>
<FONT SIZE="1"><B>First:</B></FONT><input type="text" name="field6" size="15">
</TD>
<TD>
<FONT SIZE="1"><B>Last:</B></FONT><input type="text" name="field7" size="15">
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD WIDTH=83 ALIGN="RIGHT" height="79"><FONT SIZE=-1><B>CRM Event Comments: </FONT></B></TD>
<TD COLSPAN="3" width="660" height="79">
<TEXTAREA ROWS="5" NAME="field8" cols="65"></TEXTAREA>
</TD>
</TR>
<TR>
<TD COLSPAN="4">
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="50" align="left"> </td>
<td align="center">
<input type="button" value="Add" onClick="addUpdate(1,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
<input type="button" value="Modify" onClick="addUpdate(2,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
<input type="button" value="Update" onClick="addUpdate(3,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
<input type="button" value="Remove" onClick="addUpdate(4,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
</td>
<td width="50" align="right"> </td>
</tr>
</table>
</TD>
</TR>
<tr>
<td width="100%" align="center" height="40" colspan="4"><select size="3" name="addedItems" style="width:100%">
</td>
</tr>
</TABLE>
<%/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//|------------------------------------------------------------------------------------------------------------------------
//| Start code for one-to-many in edit mode /
//|---------------------------------------------
%>
<script language="javascript">
/* Check to see if the necessary arrays have been defined - if not define them */
try{
if (!eval("addTemp.addoneToMany1Name")){
//alert("False");
addTemp.addoneToMany1Name = Array();
addTemp.addoneToMany1Value = Array();
for(i = 1; i <= 8; i++){
eval("addTemp.field" + i + "oneToMany1Value = Array();");
}else{
//alert("already created");
/* Catch any errors that may occur when checking if arrays are defined */
catch(e) {
alert(e);
<%
Enumeration field1_ = field1Vector.elements();
Enumeration field2_ = tempDayVector.elements();
Enumeration field3_ = tempMonthVector.elements();
Enumeration field4_ = tempYearVector.elements();
Enumeration field5_ = field5Vector.elements();
Enumeration field6_ = field6Vector.elements();
Enumeration field7_ = field7Vector.elements();
Enumeration field8_ = field8Vector.elements();
Object currentfield1 = "";
Object currentfield2 = "";
Object currentfield3 = "";
Object currentfield4 = "";
Object currentfield5 = "";
Object currentfield6 = "";
Object currentfield7 = "";
Object currentfield8 = "";
int counter = 0;
int clength = 1;
while (field1_.hasMoreElements()){
//out.println("while field1_ has more elements");
//|---------------------------------------------------------------------------------------------------------------------------
//| define field elements - Use first and second lines if text box or memo field, Use third line if select box /
//|------------------------------------------------------------------------------------------------------------
// currentfield1 = query.replaceString(field1_.nextElement().toString(),"'","\'").trim();
// currentfield1 = query.replaceString(currentfield1.toString(),"\"","\\" + "\"");
currentfield1 = field1_.nextElement();
// currentfield2 = query.replaceString(field2_.nextElement().toString(),"'","\'").trim();
// currentfield2 = query.replaceString(currentfield2.toString(),"\"","\\" + "\"");
currentfield2 = field2_.nextElement();
// currentfield3 = query.replaceString(field3_.nextElement().toString(),"'","\'").trim();
// currentfield3 = query.replaceString(currentfield3.toString(),"\"","\\" + "\"");
currentfield3 = field3_.nextElement();
currentfield4 = query.replaceString(field4_.nextElement().toString(),"'","\'").trim();
currentfield4 = query.replaceString(currentfield4.toString(),"\"","\\" + "\"");
// currentfield4 = field4_.nextElement();
currentfield5 = query.replaceString(field5_.nextElement().toString(),"'","\'").trim();
currentfield5 = query.replaceString(currentfield5.toString(),"\"","\\" + "\"");
// currentfield5 = tempElement;
currentfield6 = query.replaceString(field6_.nextElement().toString(),"'","\'").trim();
currentfield6 = query.replaceString(currentfield6.toString(),"\"","\\" + "\"");
// currentfield6 = field6_.nextElement();
currentfield7 = query.replaceString(field7_.nextElement().toString(),"'","\'").trim();
currentfield7 = query.replaceString(currentfield7.toString(),"\"","\\" + "\"");
// currentfield7 = field7_.nextElement();
currentfield8 = query.replaceString(field8_.nextElement().toString(),"'","\'").trim();
currentfield8 = query.replaceString(query.replaceString(query.replaceString(currentfield8.toString(),"\"","\\" + "\""),"\r","\\" + "r"),"\n","\\" + "n");
// currentfield8 = field8_.nextElement();
out.println("oneToMany1.addedItems.options.length ="+clength+";");
// First Line - Displayed fields, Second Line - Count value /
out.println("oneToMany1.addedItems.options[" + counter + "].text = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
out.println("oneToMany1.addedItems.options[" + counter + "].value = '" + counter + "';");
// First Line - Displayed fields, Second Line - Count value /
out.println("addTemp.addoneToMany1Name[" + counter + "] = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
out.println("addTemp.addoneToMany1Value[" + counter + "] = \"" + counter + " \";");
// Use first line for text boxes and memo fields, Use second line for Select Boxes /
// out.println("addTemp.field1oneToMany1Value[" + counter + "] = \"" + currentfield1 + "\";");
out.println("addTemp.field1oneToMany1Value[" + counter + "] = '" + currentfield1 + "';");
// out.println("addTemp.field2oneToMany1Value[" + counter + "] = \"" + currentfield2 + "\";");
out.println("addTemp.field2oneToMany1Value[" + counter + "] = '" + currentfield2 + "';");
// out.println("addTemp.field3oneToMany1Value[" + counter + "] = \"" + currentfield3 + " \";");
out.println("addTemp.field3oneToMany1Value[" + counter + "] = '" + currentfield3 + "';");
out.println("addTemp.field4oneToMany1Value[" + counter + "] = \"" + currentfield4 + "\";");
// out.println("addTemp.field4oneToMany1Value[" + counter + "] = '" + currentfield4 + "';");
out.println("addTemp.field5oneToMany1Value[" + counter + "] = \"" + currentfield5 + "\";");
// out.println("addTemp.field5oneToMany1Value[" + counter + "] = '" + currentfield5 + "';");
out.println("addTemp.field6oneToMany1Value[" + counter + "] = \"" + currentfield6 + "\";");
// out.println("addTemp.field6oneToMany1Value[" + counter + "] = '" + currentfield6 + "';");
out.println("addTemp.field7oneToMany1Value[" + counter + "] = \"" + currentfield7 + "\";");
// out.println("addTemp.field7oneToMany1Value[" + counter + "] = '" + currentfield7 + "';");
out.println("addTemp.field8oneToMany1Value[" + counter + "] = \"" + currentfield8 + "\";");
// out.println("addTemp.field8oneToMany1Value[" + counter + "] = '" + currentfield8 + "';");
clength = clength + 1;
counter = counter + 1;
%>
</script>
</FORM>
</FONT>
<BR>
<FORM NAME="CRMEvent">
<input type="hidden" name=dhr_id value=<%=dhr_id %>>
<!-- <input type="hidden" name=crmKey value=<%//=crmKey %>> -->
<input type="hidden" name=mode value=<%=mode%>>
<table border="0" width="100%" cellspacing="1">
<tr>
<%
if (mode.equals("add")) {
%>
<td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
<td width="120"></td>
<td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('add')"></td>
<% } else if (mode.equals("edit")){
%>
<td width="103"><input type="button" value="<< Previous" name="Previous" onclick="history.go(-1)"></td>
<td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
<td width="120"></td>
<td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('edit')"></td>
<%
%>
</tr>
</table>
<%
}; //end else for checking session
%>
</FORM>
<HR>
Click the next button to move to the next screen without saving the current screen.<br>
Click the save button to save the current screen and then move to the next screen.<br>
<p>
<form name="submitForm" action="dssACCRMEventDB.jsp" action="post">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
</form>
<form name="validate">
<input type="hidden" name="validation">
</form>
</BODY>
</HTML>Hello Sir,
I have the following code. Cuurently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.
This is the jsp for creating and editing the records.
<HTML>
<HEAD>
<TITLE> CRM Event Information </TITLE>
<script language="JavaScript" src="../javascript/misc.js"></script>
<script language="JavaScript">
function saveMe(methodHow) {
var elementNumber = CRMEvent.elements.length
var field1 = "";
var field2 = "";
var field3 = "";
var field4 = "";
var field5 = "";
var field6 = "";
var field7 = "";
var field8 = "";
for(i=0; i < elementNumber; i++){
submitForm.elements.name = CRMEvent.elements[i].name;
submitForm.elements[i].value = CRMEvent.elements[i].value;
for (k = 0; k < oneToMany1.addedItems.options.length; k++){;
if (addTemp.field1oneToMany1Value[k] == ""){
addTemp.field1oneToMany1Value[k] = "9999"
if (addTemp.field2oneToMany1Value[k] == ""){
addTemp.field2oneToMany1Value[k] = "99"
if (addTemp.field3oneToMany1Value[k] == ""){
addTemp.field3oneToMany1Value[k] = "99"
if (addTemp.field4oneToMany1Value[k] == ""){
addTemp.field4oneToMany1Value[k] = "9999"
if (addTemp.field5oneToMany1Value[k] == ""){
addTemp.field5oneToMany1Value[k] = " "
if (addTemp.field6oneToMany1Value[k] == ""){
addTemp.field6oneToMany1Value[k] = " "
if (addTemp.field7oneToMany1Value[k] == ""){
addTemp.field7oneToMany1Value[k] = " "
if (addTemp.field8oneToMany1Value[k] == ""){
addTemp.field8oneToMany1Value[k] = " "
if (eval(oneToMany1.addedItems.options.length - 1) == k){
field1 = field1 + addTemp.field1oneToMany1Value[k];
field2 = field2 + addTemp.field2oneToMany1Value[k];
field3 = field3 + addTemp.field3oneToMany1Value[k];
field4 = field4 + addTemp.field4oneToMany1Value[k];
field5 = field5 + addTemp.field5oneToMany1Value[k];
field6 = field6 + addTemp.field6oneToMany1Value[k];
field7 = field7 + addTemp.field7oneToMany1Value[k];
field8 = field8 + addTemp.field8oneToMany1Value[k];
}else{
field1 = field1 + addTemp.field1oneToMany1Value[k]+"|";
field2 = field2 + addTemp.field2oneToMany1Value[k]+"|";
field3 = field3 + addTemp.field3oneToMany1Value[k]+"|";
field4 = field4 + addTemp.field4oneToMany1Value[k]+"|";
field5 = field5 + addTemp.field5oneToMany1Value[k]+"|";
field6 = field6 + addTemp.field6oneToMany1Value[k]+"|";
field7 = field7 + addTemp.field7oneToMany1Value[k]+"|";
field8 = field8 + addTemp.field8oneToMany1Value[k]+"|";
submitForm.elements[eval(i)].name = "eventtype"
submitForm.elements[eval(i)].value = field1
submitForm.elements[eval(i+1)].name = "dd_crmstart"
submitForm.elements[eval(i+1)].value = field2
submitForm.elements[eval(i+2)].name = "mm_crmstart"
submitForm.elements[eval(i+2)].value = field3
submitForm.elements[eval(i+3)].name = "yy_crmstart"
submitForm.elements[eval(i+3)].value = field4
submitForm.elements[eval(i+4)].name = "crmremark_code"
submitForm.elements[eval(i+4)].value = field5
submitForm.elements[eval(i+5)].name = "crmperson_firstname"
submitForm.elements[eval(i+5)].value = field6
submitForm.elements[eval(i+6)].name = "crmperson_lastname"
submitForm.elements[eval(i+6)].value = field7
submitForm.elements[eval(i+7)].name = "crmnote"
submitForm.elements[eval(i+7)].value = field8
submitForm.elements[eval(i+8)].name = "mode"
submitForm.elements[eval(i+8)].value = methodHow
submitForm.method="post";
onSave(submitForm);
function onSave(form) {
if (!oneToMany1.addedItems.options.length == 0) {
for (i=1;i<=oneToMany1.addedItems.options.length;i++) {
validate.elements[0].value = addTemp.field4oneToMany1Value[i-1];
if (validate.elements[0].value != '9999') {
if(!validateForm('validate','validation','isNumber')) {
alert("CRM Event Information "+ i + ": Year must be number");
return false;
if(!validateForm('validate','validation','checkrange')) {
alert("CRM Event Information "+ i + ": Year out of range");
return false;
form.submit();
return true;
</script>
</HEAD>
<BODY BGCOLOR=#ffffff>
<BASEFONT="3">
<FONT SIZE = -1>
<%@ page errorPage="errorPage.jsp" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="dss.*" %>
<!-- instantiate -->
<jsp:useBean id="pool" scope="session" class="dss.ConnectionPool" />
<jsp:useBean id="SelectBox" scope="session" class="dss.dataMisc" />
<jsp:useBean id="query" class="dss.QueryData" scope="session" />
<%
// *************check for user session *************
session = request.getSession();
if (session.getValue("userSession") == null) {
response.sendRedirect (response.encodeRedirectUrl
("dssLogin.jsp?Origin=dssACCRMEventAddEdit.jsp"));
else {
String dhr_id = "";
String mode = "";
String eventtype = "9999";
String crmremark_code = "";
String crmperson = "";
String crmnote = "";
String crmKey = "";
String dd_crmstart = "99";
String mm_crmstart = "99";
Vector tempVector = new Vector();
Vector CRMEventVector = new Vector();
Vector CRMEventPerson = new Vector();
Vector monthVector = new Vector();
Vector dayVector = new Vector();
Vector field1Vector = new Vector();
Vector field5Vector = new Vector();
Vector field6Vector = new Vector();
Vector field7Vector = new Vector();
Vector field8Vector = new Vector();
Vector field234Vector = new Vector();
Vector tempDayVector = new Vector();
Vector tempMonthVector = new Vector();
Vector tempYearVector = new Vector();
Connection conn = null ;
conn = pool.getConnection() ;
dss.Database db = new dss.Database( conn ) ;
dhr_id = request.getParameter("dhr_id");
try {
mode = request.getParameter("mode");
dhr_id = request.getParameter("dhr_id");
//look up Setting List
String strSQL = "";
//look up CRM Event Type List
strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
db.setSQL( strSQL ) ;
db.query() ;
CRMEventVector = db.getSelectionList() ;
//look up Month List
db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
db.query() ;
monthVector = db.getSelectionList();
//look up Day List
db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
db.query() ;
dayVector = db.getSelectionList();
// ************ EDIT Mode *************
if (mode.equals("edit"))
//out.println("mode is edit");
mode = "edit";
//***********get archaeology_pkey based on dhr_id
int archKey = 0;
strSQL = " SELECT archaeology_pkey "+
" FROM archaeology "+
" WHERE UPPER(dhr_id)='"+ dhr_id.toUpperCase() + "'";
//out.println(strSQL);
Statement stmt2 = conn.createStatement();
ResultSet rs2 = stmt2.executeQuery(strSQL);
while (rs2.next()) {
archKey = rs2.getInt(1);
rs2.close();
stmt2.close();
// ********* end getting **************
strSQL = "Select crmtype_code, crmstart, crmremark, crmperson_firstname, crmperson_lastname, crmnote "+
" From archaeologycrmevent " +
" Where archaeology_pkey =" + archKey ;
Statement stmtSQL = conn.createStatement();
ResultSet rset = stmtSQL.executeQuery(strSQL);
ResultSetMetaData rsmd = rset.getMetaData() ;
while (rset.next()) {
//get values
field1Vector.addElement(rset.getString(1));
field234Vector.addElement(rset.getString(2));
field5Vector.addElement(rset.getString(3));
field6Vector.addElement(rset.getString(4));
field7Vector.addElement(rset.getString(5));
field8Vector.addElement(rset.getString(6));
//crmKey = rset.getString(7);
for (int i=0; i<field234Vector.size(); i++){
StringTokenizer tempDate = new StringTokenizer((String)field234Vector.elementAt(i),"/");
while (tempDate.hasMoreTokens() ) {
tempYearVector.addElement ( tempDate.nextToken());
tempMonthVector.addElement( tempDate.nextToken());
tempDayVector.addElement ( tempDate.nextToken());
} //end edit
} //end try
catch ( Exception e) {
out.println ( e.toString() ) ;
} finally {
db.cleanup() ;
%>
<P>
<FORM NAME="oneToMany1">
<TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#BBBBBB">
<TR>
<TD BGCOLOR="#002B82" COLSPAN=9 width="100%" height="31">
<p align="center">
<font face="Arial" size="2" color="#FFFFFF">
<b>6. CRM Event Information - </b>DHR ID# : <%=dhr_id %>
</font>
</p>
</td>
</TR>
<TR>
<TD WIDTH=83 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>CRM Event Type: </FONT></B></TD>
<TD WIDTH=112 height="21">
<%
out.println ( SelectBox.strSelectionList((Vector)CRMEventVector.elementAt(0), (Vector)CRMEventVector.elementAt(1), "field1", "", eventtype, "180" ));
%>
</TD>
<TD WIDTH=89 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>Event Date: </FONT></B></TD>
<TD WIDTH=455 height="21"><font size="1">
<%
out.println ("<b><font size = 1>Date: "+ SelectBox.strSelectionList((Vector)dayVector.elementAt(0), (Vector)dayVector.elementAt(1), "field2", "", dd_crmstart, "180" ));
out.println ("Month: "+ SelectBox.strSelectionList((Vector)monthVector.elementAt(0), (Vector)monthVector.elementAt(1), "field3", "", mm_crmstart, "180" ));
%>
</select><B>Year:</B><input type="text" name="field4" size="4" id="Year" maxlength="4">
</TD>
</TR>
<TR>
<TD WIDTH=83 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>ID# Associated with Event:</B> </FONT></TD>
<TD WIDTH=112 height="30">
<input type="text" name="field5" size="15" value="<%=crmremark_code%>">
</TD>
<TD WIDTH=89 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>
CRM Person/ Organization: </FONT></B></TD>
<TD WIDTH=455 height="30">
<% // Modified by Robert Cox 09/12/2001 - changed field size from 20 to 30 // %>
<TABLE BORDER="0">
<TR><TD>
<FONT SIZE="1"><B>First:</B></FONT><input type="text" name="field6" size="15">
</TD>
<TD>
<FONT SIZE="1"><B>Last:</B></FONT><input type="text" name="field7" size="15">
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD WIDTH=83 ALIGN="RIGHT" height="79"><FONT SIZE=-1><B>CRM Event Comments: </FONT></B></TD>
<TD COLSPAN="3" width="660" height="79">
<TEXTAREA ROWS="5" NAME="field8" cols="65"></TEXTAREA>
</TD>
</TR>
<TR>
<TD COLSPAN="4">
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="50" align="left"> </td>
<td align="center">
<input type="button" value="Add" onClick="addUpdate(1,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
<input type="button" value="Modify" onClick="addUpdate(2,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
<input type="button" value="Update" onClick="addUpdate(3,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
<input type="button" value="Remove" onClick="addUpdate(4,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
</td>
<td width="50" align="right"> </td>
</tr>
</table>
</TD>
</TR>
<tr>
<td width="100%" align="center" height="40" colspan="4"><select size="3" name="addedItems" style="width:100%">
</td>
</tr>
</TABLE>
<%/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//|------------------------------------------------------------------------------------------------------------------------
//| Start code for one-to-many in edit mode /
//|---------------------------------------------
%>
<script language="javascript">
/* Check to see if the necessary arrays have been defined - if not define them */
try{
if (!eval("addTemp.addoneToMany1Name")){
//alert("False");
addTemp.addoneToMany1Name = Array();
addTemp.addoneToMany1Value = Array();
for(i = 1; i <= 8; i++){
eval("addTemp.field" + i + "oneToMany1Value = Array();");
}else{
//alert("already created");
/* Catch any errors that may occur when checking if arrays are defined */
catch(e) {
alert(e);
<%
Enumeration field1_ = field1Vector.elements();
Enumeration field2_ = tempDayVector.elements();
Enumeration field3_ = tempMonthVector.elements();
Enumeration field4_ = tempYearVector.elements();
Enumeration field5_ = field5Vector.elements();
Enumeration field6_ = field6Vector.elements();
Enumeration field7_ = field7Vector.elements();
Enumeration field8_ = field8Vector.elements();
Object currentfield1 = "";
Object currentfield2 = "";
Object currentfield3 = "";
Object currentfield4 = "";
Object currentfield5 = "";
Object currentfield6 = "";
Object currentfield7 = "";
Object currentfield8 = "";
int counter = 0;
int clength = 1;
while (field1_.hasMoreElements()){
//out.println("while field1_ has more elements");
//|---------------------------------------------------------------------------------------------------------------------------
//| define field elements - Use first and second lines if text box or memo field, Use third line if select box /
//|------------------------------------------------------------------------------------------------------------
// currentfield1 = query.replaceString(field1_.nextElement().toString(),"'","\'").trim();
// currentfield1 = query.replaceString(currentfield1.toString(),"\"","\\" + "\"");
currentfield1 = field1_.nextElement();
// currentfield2 = query.replaceString(field2_.nextElement().toString(),"'","\'").trim();
// currentfield2 = query.replaceString(currentfield2.toString(),"\"","\\" + "\"");
currentfield2 = field2_.nextElement();
// currentfield3 = query.replaceString(field3_.nextElement().toString(),"'","\'").trim();
// currentfield3 = query.replaceString(currentfield3.toString(),"\"","\\" + "\"");
currentfield3 = field3_.nextElement();
currentfield4 = query.replaceString(field4_.nextElement().toString(),"'","\'").trim();
currentfield4 = query.replaceString(currentfield4.toString(),"\"","\\" + "\"");
// currentfield4 = field4_.nextElement();
currentfield5 = query.replaceString(field5_.nextElement().toString(),"'","\'").trim();
currentfield5 = query.replaceString(currentfield5.toString(),"\"","\\" + "\"");
// currentfield5 = tempElement;
currentfield6 = query.replaceString(field6_.nextElement().toString(),"'","\'").trim();
currentfield6 = query.replaceString(currentfield6.toString(),"\"","\\" + "\"");
// currentfield6 = field6_.nextElement();
currentfield7 = query.replaceString(field7_.nextElement().toString(),"'","\'").trim();
currentfield7 = query.replaceString(currentfield7.toString(),"\"","\\" + "\"");
// currentfield7 = field7_.nextElement();
currentfield8 = query.replaceString(field8_.nextElement().toString(),"'","\'").trim();
currentfield8 = query.replaceString(query.replaceString(query.replaceString(currentfield8.toString(),"\"","\\" + "\""),"\r","\\" + "r"),"\n","\\" + "n");
// currentfield8 = field8_.nextElement();
out.println("oneToMany1.addedItems.options.length ="+clength+";");
// First Line - Displayed fields, Second Line - Count value /
out.println("oneToMany1.addedItems.options[" + counter + "].text = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
out.println("oneToMany1.addedItems.options[" + counter + "].value = '" + counter + "';");
// First Line - Displayed fields, Second Line - Count value /
out.println("addTemp.addoneToMany1Name[" + counter + "] = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
out.println("addTemp.addoneToMany1Value[" + counter + "] = \"" + counter + " \";");
// Use first line for text boxes and memo fields, Use second line for Select Boxes /
// out.println("addTemp.field1oneToMany1Value[" + counter + "] = \"" + currentfield1 + "\";");
out.println("addTemp.field1oneToMany1Value[" + counter + "] = '" + currentfield1 + "';");
// out.println("addTemp.field2oneToMany1Value[" + counter + "] = \"" + currentfield2 + "\";");
out.println("addTemp.field2oneToMany1Value[" + counter + "] = '" + currentfield2 + "';");
// out.println("addTemp.field3oneToMany1Value[" + counter + "] = \"" + currentfield3 + " \";");
out.println("addTemp.field3oneToMany1Value[" + counter + "] = '" + currentfield3 + "';");
out.println("addTemp.field4oneToMany1Value[" + counter + "] = \"" + currentfield4 + "\";");
// out.println("addTemp.field4oneToMany1Value[" + counter + "] = '" + currentfield4 + "';");
out.println("addTemp.field5oneToMany1Value[" + counter + "] = \"" + currentfield5 + "\";");
// out.println("addTemp.field5oneToMany1Value[" + counter + "] = '" + currentfield5 + "';");
out.println("addTemp.field6oneToMany1Value[" + counter + "] = \"" + currentfield6 + "\";");
// out.println("addTemp.field6oneToMany1Value[" + counter + "] = '" + currentfield6 + "';");
out.println("addTemp.field7oneToMany1Value[" + counter + "] = \"" + currentfield7 + "\";");
// out.println("addTemp.field7oneToMany1Value[" + counter + "] = '" + currentfield7 + "';");
out.println("addTemp.field8oneToMany1Value[" + counter + "] = \"" + currentfield8 + "\";");
// out.println("addTemp.field8oneToMany1Value[" + counter + "] = '" + currentfield8 + "';");
clength = clength + 1;
counter = counter + 1;
%>
</script>
</FORM>
</FONT>
<BR>
<FORM NAME="CRMEvent">
<input type="hidden" name=dhr_id value=<%=dhr_id %>>
<!-- <input type="hidden" name=crmKey value=<%//=crmKey %>> -->
<input type="hidden" name=mode value=<%=mode%>>
<table border="0" width="100%" cellspacing="1">
<tr>
<%
if (mode.equals("add")) {
%>
<td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
<td width="120"></td>
<td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('add')"></td>
<% } else if (mode.equals("edit")){
%>
<td width="103"><input type="button" value="<< Previous" name="Previous" onclick="history.go(-1)"></td>
<td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
<td width="120"></td>
<td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('edit')"></td>
<%
%>
</tr>
</table>
<%
}; //end else for checking session
%>
</FORM>
<HR>
Click the next button to move to the next screen without saving the current screen.<br>
Click the save button to save the current screen and then move to the next screen.<br>
<p>
<form name="submitForm" action="dssACCRMEventDB.jsp" action="post">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
<input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
</form>
<form name="validate">
<input type="hidden" name="validation">
</form>
</BODY>
</HTML> -
Problems in Retrieve Server's Data from Client through RMI
//I feel that this question quite challenging for me. maybe it is easy for you all. anyway, so anybody if know it, pls point out my mistake and give some opinion on my programs.thanks....
/*I have written one retrieve method in my server that is going to
be called by the client�s pc. But I am facing the error when
running
it. The error is � SQL Error in retrieve statemet:
[Microsoft][ODBC
Microsoft Access
Driver] Data type mismatch in criteria expression.� So anybody
know
where is my mistakes? Is it my server retrieveData method wrong? Or
my client is calling not properly? Thanks.
Actually my expected result is when client pc input the particular
staff id , then the client textfield will show all the information
of that particular staff according to the input id to the client
interface text field. */
******************* Interface *****************************
public interface RemoteDBServer extends
java.rmi.Remote //RemoteDBServer interface
public String retrieveData(String idd, String ln, String
fn, String op, String oe, String hp, String ps, String ss) throws
java.rmi.RemoteException;
*************** Server Program ***********************************
//id, last_name, first_name, office_phone, office_ext��..is a
table�s attribute name
//the jdbc and odbc path already been set in control panel �
administrative tools.
public String retrieveData(String idd) throws
java.rmi.RemoteException
String result=" ";
try
//create a statement
Statement statement = connection.createStatement();
String sql="SELECT * FROM emp_overview WHERE id ='"+idd+"'";
//execute quury and capture results
ResultSet rs = statement.executeQuery(sql);
rs.next();
String ln = rs.getString("last_name");
String fn = rs.getString("first_name");
String op = rs.getString("office_phone");
String oe = rs.getString("office_ext");
String hp = rs.getString("home_phone");
String ps = rs.getString("primary_skill");
String ss = rs.getString("secondary_skill");
statement.close();
catch (SQLException sqlex)
System.out.println("SQL Error in retrieve statement: "
+sqlex);
sqlex.printStackTrace();
return result;
****************************Client Program ************************
..............����
//findName already declared in JButton
//tln, tfn, top, toe�..already declared in JTextField
else if (event.getSource() == findName)
try
db.retrieveData(tid.getText());
tln.setText("");
tfn.setText("");
top.setText("");
toe.setText("");
thp.setText("");
tps.setText("");
tss.setText("");
catch(Exception e)
System.out.println ("Cant delete to server " + e);Hi Kevin,
It looks like your id field is of Numeric datatype and you are wrapping it with single quotes in your query, which is not correct.
Your wrote :
String sql="SELECT * FROM emp_overview WHERE id ='"+idd+"'";
If id is of type numeric data type then, use:
String sql="SELECT * FROM emp_overview WHERE id ="+idd;
regards,
Humayun -
Hello experts,
We archive CO/PA, GL, and SL objects regularly and each object has its own info structure configured. I need to find out if we make additions or changes to the coding block, will there be any impact to retrieve the archived data? Any comments and consideration you can provide will be greatly appreciated.
Symei Chennot really. SARI/E/J is your best shot. But then: what would you need it for? the ACC*-tables contain total identic duplicates of MKPF and MSEG so you could always go and look there ...
-
Problem in retrieve data in COSS and COSP from PBS using FM /pbs/select_in
hi all i have problem in retrieving data from COSP and COSS tables from PBS using FM /pbs/select_into_table in this FM i couldn't find the tables if any body knows pls reply back with the Archiving object to be use and parameters to be used.
That are controlling tables-
Have you installed PBS for Controlling ?
try http://www.pbs-bensheim.de/
A. -
Problems with retrieving data from tables with 240 and more records
Hi,
I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
So for the retrievals that hang I have something like:
(3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
(3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
(3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
(3260008): FETCH NEXT:(DBI_FETCHNEXT)
and this is the last line,
while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
I will appreciate any comments/hints/help.
Thank you very much.pgoel wrote:
I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
Thanks. -
EVDRE error "encountered problem when retrieving data from webserver"
Hi,
in a EVDRE we always get the error "encountered problem when retrieving data from webserver"
When analysing this further we noticed this is always generated when a base member is selected in the CV and the expansion on the row for this dimension is has one of the following expansion settings:
DEP
ALL
NOEXPAND
if we select SELF, the error disappears again and the EVDRE works fine again ... is this normal behavior?
there is no problem with application nor dimension.
D
solved itNote that the keyword "ALL" does not include the member itself. This may cause some confusion, but as Harish implies, when you select a base member it finds no matches if your memberset is "ALL".
If you want to design a report to handle the user moving back and forth between base and non-base members in their CV, you either need to include SELF,ALL or SELF,DEP, or something similar....
OR you need to get a little fancier, and use EVPRO to look and see if the CV member is base -- evpro(app,member,"CALC") -- and then use some conditional logic in Excel to choose the correct expansion options. If Calc=N, use Self, otherwise use SELF,DEP or whatever you choose. This can be a bit tricky if you then want the user to be able to drill down in the report (especially if you want the workbook option to insert add'l rows on the expansion, rather than replace), but it's all possible. -
How to retrieve the ARCHIVED Sales order data
Hi All,
When issuing the output for the delivery, it is giving an error saying 'Sales Order XXXX does not exist' due to which the prices in the output were displayed as '0'. Reason for this can be that 'the order might have been archived'.
My requirement is,
1. If Sales Order doesnu2019t exist in data base then need to check if Sales order exists in archive data base.
2. If yes, take needed data from archive data base tables to calculate price. The logic of price calculation should be the same as for not archived Sales Orders.
Can anyone help me on this..?
Please tell me how to check whether the Sales order exists in the Archived database. Please share the table names(sample logic if possible) sothat I can use them in the report logic.
Please tell me how to pull the data from the archive database tables to calculate the price.
Thank you in advance.
Thanks & Regards,
Paddu.
Edited by: Paddu K on Feb 23, 2009 3:42 PM*& Form get_archive_data
* Fetch Archive Data
FORM get_archive_data .
CLEAR: g_read_handle, g_commit_cnt,
g_read_cnt, g_reload_cnt,it_rel_tab,it_bseg_a,it_bkpf_a,
it_bset_a, gt_result.
REFRESH: it_rel_tab[],it_bseg_a[],it_bkpf_a[],
it_bset_a[], gt_result[].
*Populating selection screen fields to field-symbols
PERFORM build_fs_select_options.
*Call FM as_api_read FI Data
CALL FUNCTION 'AS_API_READ'
EXPORTING
i_fieldcat = 'SAP_FI_DOC_002'
i_selections = ft_selections[]
* I_OBLIGATORY_FIELDS =
* I_MAXROWS =
IMPORTING
e_result = gt_result[]
EXCEPTIONS
parameters_invalid = 1
no_infostruc_found = 2
field_missing_in_fieldcat = 3
OTHERS = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF NOT gt_result[] IS INITIAL.
*Sorting by KEY and Offset
SORT gt_result BY archivekey archiveofs.
*To delete duplicates
DELETE ADJACENT DUPLICATES FROM gt_result COMPARING archivekey
archiveofs.
*looping the internal table
LOOP AT gt_result.
*Get read handle for object
CALL FUNCTION 'ARCHIVE_READ_OBJECT'
EXPORTING
object = 'FI_DOCUMNT'
archivkey = gt_result-archivekey
offset = gt_result-archiveofs
IMPORTING
archive_handle = g_read_handle
EXCEPTIONS
OTHERS = 1.
IF NOT sy-subrc IS INITIAL.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
IF sy-subrc = 0.
*Get Acoounting Document details
PERFORM object_read_opened
TABLES it_rel_tab
it_bseg_a
it_bkpf_a
* it_bset_a
* it_bsik_a
* it_bsak_a
it_bsid_a
it_bsad_a
* it_bsec_a
USING g_read_handle
l_archobj
g_commit_cnt
g_read_cnt
g_reload_cnt
ENDIF.
*close the file.
CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
EXPORTING
archive_handle = g_read_handle
EXCEPTIONS
internal_error = 1
wrong_access_to_archive = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE i004." 'Unable to close archive session'.
EXIT.
ENDIF.
ENDLOOP.
ELSE.
MESSAGE i000 WITH 'No data found for Archived data'(095).
EXIT.
ENDIF.
*Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
IF NOT it_bkpf_a[] IS INITIAL.
SORT it_bkpf_a BY belnr.
DELETE ADJACENT DUPLICATES FROM it_bkpf_a COMPARING belnr.
DELETE it_bkpf_a WHERE budat GT p_budat. "#ECDK902206
ENDIF.
*Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
IF it_bkpf_a[] IS INITIAL.
MESSAGE i000 WITH 'No data found for Archived data'(095).
ENDIF.
*End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
IF NOT it_bseg_a[] IS INITIAL.
SORT it_bseg_a BY belnr gjahr buzei.
DELETE ADJACENT DUPLICATES FROM it_bseg_a COMPARING
belnr gjahr buzei.
ENDIF.
*End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
ENDFORM. " get_archive_data
*& Form build_fs_select_options
FORM build_fs_select_options .
REFRESH: ft_selections.
*Comapny code
APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
<fw_selections>-fieldname = 'BUKRS'.
APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
MOVE p_bukrs TO <lw_selopt>-low.
MOVE 'I' TO <lw_selopt>-sign.
MOVE 'EQ' TO <lw_selopt>-option.
*Customer
APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
<fw_selections>-fieldname = 'KUNNR'.
LOOP AT s_kunnr.
APPEND INITIAL LINE TO <fw_selections>-selopt_t
ASSIGNING <lw_selopt>.
MOVE-CORRESPONDING s_kunnr TO <lw_selopt>.
ENDLOOP.
*Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
**Customer Group
* append initial line to ft_selections assigning <fw_selections>.
* <fw_selections>-fieldname = 'KTOKD'.
* loop at s_ktokd.
* append initial line to <fw_selections>-selopt_t
* assigning <lw_selopt>.
* move-corresponding s_ktokd to <lw_selopt>.
* endloop.
*End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
*Profit Center
APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
<fw_selections>-fieldname = 'PRCTR'.
LOOP AT s_prctr.
APPEND INITIAL LINE TO <fw_selections>-selopt_t
ASSIGNING <lw_selopt>.
MOVE-CORRESPONDING s_prctr TO <lw_selopt>.
ENDLOOP.
*Commented #ECDK902210
**Key Date
* append initial line to ft_selections assigning <fw_selections>.
* <fw_selections>-fieldname = 'BUDAT'.
* append initial line to <fw_selections>-selopt_t assigning <lw_selopt>
* move p_budat to <lw_selopt>-low.
* move 'I' to <lw_selopt>-sign.
* move 'EQ' to <lw_selopt>-option.
*Aging Period1
APPEND INITIAL LINE TO ft_selections ASSIGNING <fw_selections>.
<fw_selections>-fieldname = 'ANZTA'.
APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
MOVE p_ag1 TO <lw_selopt>-low.
MOVE 'I' TO <lw_selopt>-sign.
MOVE 'EQ' TO <lw_selopt>-option.
*Aging Period2
*Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
* append initial line to ft_selections assigning <fw_selections>.
* <fw_selections>-fieldname = 'ANZTA'.
*End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
MOVE p_ag2 TO <lw_selopt>-low.
MOVE 'I' TO <lw_selopt>-sign.
MOVE 'EQ' TO <lw_selopt>-option.
*Aging Period3
*Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
* append initial line to ft_selections assigning <fw_selections>.
* <fw_selections>-fieldname = 'ANZTA'.
*End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
MOVE p_ag3 TO <lw_selopt>-low.
MOVE 'I' TO <lw_selopt>-sign.
MOVE 'EQ' TO <lw_selopt>-option.
*Aging Period4
*Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
* append initial line to ft_selections assigning <fw_selections>.
* <fw_selections>-fieldname = 'ANZTA'.
*End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
MOVE p_ag4 TO <lw_selopt>-low.
MOVE 'I' TO <lw_selopt>-sign.
MOVE 'EQ' TO <lw_selopt>-option.
*Aging Period5
*Start of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
* append initial line to ft_selections assigning <fw_selections>.
* <fw_selections>-fieldname = 'ANZTA'.
*End of changes by GTHATIKONDA on 16/10/2008 #ECDK902192
APPEND INITIAL LINE TO <fw_selections>-selopt_t ASSIGNING <lw_selopt>.
MOVE p_ag5 TO <lw_selopt>-low.
MOVE 'I' TO <lw_selopt>-sign.
MOVE 'EQ' TO <lw_selopt>-option.
ENDFORM. " build_fs_select_options
*& Form object_read_opened
* To Fetch Arichive Data
FORM object_read_opened TABLES it_rel_tab
it_bseg_a
it_bkpf_a
* it_bset_a
* it_bsik_a
* it_bsak_a
it_bsid_a
it_bsad_a
* it_bsec_a
USING value(g_read_handle) LIKE sy-tabix
value(l_archobj) LIKE arch_def-object
value(g_commit_cnt) LIKE arch_usr-arch_comit
g_read_cnt TYPE i
g_reload_cnt TYPE i.
DATA: BEGIN OF table_wa ,
table LIKE arch_stat-tabname,
END OF table_wa.
DATA: lit_data(2048) TYPE c OCCURS 1 WITH HEADER LINE.
DATA: l_structure LIKE arch_stat-tabname,
l_lin TYPE i.
CLEAR: it_table_org1,lit_struc,it_table_org2,table_wa,it_rel_tab.
REFRESH: it_table_org1[],lit_struc[],it_table_org2[],it_rel_tab[].
CLEAR: g_duprec,g_read_cnt,g_reload_cnt,g_object_cnt.
*Read data from the infostructure
DO.
ADD 1 TO g_object_cnt.
CLEAR l_structure.
CALL FUNCTION 'ARCHIVE_GET_NEXT_RECORD'
EXPORTING
archive_handle = g_read_handle
IMPORTING
record = lit_data
* RECORD_CURSOR =
* RECORD_FLAGS =
record_structure = l_structure
* RECORD_LENGTH =
* RECORD_REF =
EXCEPTIONS
end_of_object = 1
internal_error = 2
wrong_access_to_archive = 3
OTHERS = 4
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
IF NOT l_structure IS INITIAL.
table_wa-table = l_structure.
APPEND table_wa TO it_rel_tab.
ENDIF.
APPEND lit_data.
CLEAR l_lin.
FIELD-SYMBOLS: <fs_struc> TYPE c.
CASE l_structure.
*BKPF data
WHEN 'BKPF'.
ASSIGN it_bkpf_a TO <fs_struc> CASTING.
<fs_struc> = lit_data.
APPEND it_bkpf_a.
*BSID data
WHEN 'BSID'.
ASSIGN it_bsid_a TO <fs_struc> CASTING.
<fs_struc> = lit_data.
APPEND it_bsid_a.
*BSAD data
WHEN 'BSAD'.
ASSIGN it_bsad_a TO <fs_struc> CASTING.
<fs_struc> = lit_data.
APPEND it_bsad_a.
*BSEG data
WHEN 'BSEG'.
ASSIGN it_bseg_a TO <fs_struc> CASTING.
<fs_struc> = lit_data.
APPEND it_bseg_a.
ENDCASE.
REFRESH lit_data.
CLEAR g_object_cnt.
ENDDO.
ENDFORM. " object_read_opened
*& Form get_bsid_bsad_archive_data
*If Exclude Spl. GL Trnasaction is initial get BSID BSAD Archive data *
FORM get_bsid_bsad_archive_data .
*Work Area
DATA: wa_bsid TYPE type_bsid.
*Reading BSAD Archive internal table
* loop at it_bsad_a where bukrs eq p_bukrs
*Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
*Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
LOOP AT it_bkpf_a WHERE bukrs = p_bukrs AND
budat LE p_budat. "#ECDK902206
*End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
LOOP AT it_bseg_a WHERE bukrs EQ p_bukrs AND
belnr EQ it_bkpf_a-belnr AND
gjahr EQ it_bkpf_a-gjahr AND
augdt GT p_budat AND
* koart eq 'D' and
kunnr IN s_kunnr AND
prctr IN s_prctr.
*Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
* loop at it_bkpf_a where budat le p_budat."#ECDK902206
*Move corresponding fiels
MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
wa_bsid-blart = it_bkpf_a-blart.
wa_bsid-budat = it_bkpf_a-budat.
wa_bsid-bldat = it_bkpf_a-bldat.
APPEND wa_bsid TO i_bsad.
CLEAR wa_bsid.
ENDLOOP.
ENDLOOP.
IF NOT i_bsad[] IS INITIAL.
APPEND LINES OF i_bsad TO i_bsid.
ENDIF.
*Start of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
IF NOT i_bsid[] IS INITIAL.
SORT i_bsid BY belnr.
*Commenting this logic by GTATIKONDA on 10/31/2008 #ECDK902245
* delete adjacent duplicates from i_bsid comparing belnr.
ENDIF.
*End of Changes by GTHATIKONDA on 10/17/2008 #ECDK902206
ENDFORM. " get_bsid_bsad_archive_data
*Reading BSAD Archive internal table
* loop at it_bsad_a where bukrs eq p_bukrs
*Start of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
*Commented by GTHATIKONDA on 10/17/2008 #ECDK902204
LOOP AT it_bkpf_a WHERE bukrs = p_bukrs AND "#ECDK902206
budat LE p_budat.
*End of changes by GTHATIKONDA on 10/14/2008 #ECDK902180
LOOP AT it_bseg_a WHERE bukrs EQ p_bukrs AND
belnr EQ it_bkpf_a-belnr AND
gjahr EQ it_bkpf_a-gjahr AND
kunnr IN s_kunnr AND
umskz EQ space AND
augdt GT p_budat AND
prctr IN s_prctr.
*Changes by GTHATIKONDA on 10/17/2008 #ECDK902204
* loop at it_bkpf_a where budat le p_budat. "#ECDK902206
*Move corresponding fiels
MOVE-CORRESPONDING it_bseg_a TO wa_bsid.
wa_bsid-blart = it_bkpf_a-blart.
wa_bsid-budat = it_bkpf_a-budat.
wa_bsid-bldat = it_bkpf_a-bldat.
APPEND wa_bsid TO i_bsad.
CLEAR wa_bsid.
ENDLOOP.
ENDLOOP.
IF NOT i_bsad[] IS INITIAL.
APPEND LINES OF i_bsad TO i_bsid.
ENDIF. -
KE30 Problem with archived DATA
Hi,
I archived some information and then I have defined a drill-down report
using a summarization level (not including archived data) but the
report is reading it.
Please if someone can help me. FLAVIAPlease I need help About HOWN can I do a correct archived in PA, because we archived using the object COPAA
Thanks FLAVIA -
How to retrieve all the data from a BLOB using view-generated accessor
I am using JDeveveloper 10g v. 10.1.3 and am storing an image in a database as a blob object and need to retrieve all of the data to get the entire image and store it in an ImageIcon. The code I have works partially in that it retrieves the correct data, but only gets a piece of it, leaving me with a partial image.
AppModuleImpl am;
ImageVwViewImpl vo;
am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
ImageIcon icon = new ImageIcon(ivo.getImage().getBytes(1, (int)ivo.getImage().getBufferSize()));
jULabel1.setIcon(icon);I either need to know how to use a stream to get the data out (from BlobDomain method getBinaryStream()), or how to get the other chunks of data separately.
edit: I know the problem is that getBufferSize() returns an int which is too small to hold all the data, but need to know what to use instead. Thanks!This is the code I'm using now. Same problem :(
AppModuleImpl am;
ImageVwViewImpl vo;
am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
ImageIcon icon = new ImageIcon(ivo.getImage().toByteArray());
jULabel1.setIcon(icon); -
Problem with transfering unicode form data in MULTIPART/FORM-DATA
HI experts,
I have this web based multilingual application. Page 1(form6.jsp) is basic registeration form with 5 fields and one image upload to the server. Page 2(verify.jsp) is another jsp page for verification of UTF data entered in page 1.
page 2 (verify.jsp) also uses a bean called (verify.java) for picking up values. page 3(insertEntry.jsp) is the page for inserting that data into the Database and uses a bean called (logicbean.java).
Now, the problem im facing here is that if i use multipart/form-data, the unicode text filled in page1 is shown as garbage when its is transfered to page2 and displayed on page2. It is all gibberish. But if i do not use multipart/form-data, the unicode text transfered from page1 to page2 is displayed perfectly on page2.Im using devenagari(UTF) language for filling in details.
// form6.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*,java.text.*" %>
<%@ page import="com.oreilly.servlet.*" %>
<%
request.setCharacterEncoding("UTF-8");
%>
<HTML>
<HEAD>
<TITLE>
<%=session.getValue("main.title")%>
</TITLE>
</HEAD>
<h1><center><%=session.getValue("main.head")%><Center>
<BODY background="brown.bmp">
<form name=form6 action="verify.jsp" method="post" enctype="multipart/form-data">
<center>
<font>
<table border=1>
<tr>
<td colspan=2><center><img src="asok.bmp"></center>
</tr>
<tr>
<td >
<b>1.)<%=session.getValue("main.ec")%></b>
</td>
<td></td>
</tr>
<tr>
<td align="right"><b><%=session.getValue("main.ecname")%></b>                 <input type="text" name="votername"></td>
<td></td>
</tr>
<tr>
<td align="right"> <b><%=session.getValue("main.ecsurname")%></b>            <input type="text" name="votersurname"></td>
<td></td>
</tr>
<tr>
<td align="left"><b>2.)<%=session.getValue("main.rel")%></b>                
<select name="relation" onchange="if(this.selectedIndex!=0){this.form.texthiddenrelation.value=this.options[this.selectedIndex].value}" size="1">
<option>Choose</option>
<option value="father">Father</option>
<option value="mother">Mother</option>
<option value="husband">Husband</option>
</select>
<input type="hidden" name="texthiddenrelation" />
</td>
</tr>
<tr>
<td align="right"><b><%=session.getValue("main.relname")%></b>                 <input type="text" name="parentname">
<td></td>
</tr>
<tr>
<td align="right"><b><%=session.getValue("main.relsurname")%>            </b><input type="text" name="parentsurname">
<td></td>
</tr>
<tr>
<td align="right"><b>3.)<%=session.getValue("main.sex")%></b>                                                 
      
<select name="sex" onchange="if(this.selectedIndex!=0){this.form.texthiddensex.value=this.options[this.selectedIndex].value}" size="1">
<option>Choose</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
<input type="hidden" name="texthiddensex" /> </td>
<td align="right"><b><%=session.getValue("form6.image")%><input type ="file" name=pic1 onchange={this.form.pic.value=this.form.pic1.value}><input type= hidden name=pic> </b></td>
</tr>
<tr>
<td colspan=2><b>4.)<%=session.getValue("main.age")%></b><input type="text" name="age">
</td>
</tr>
<tr>
<td><b>5.)<%=session.getValue("main.dob")%></b>
<td><b><%=session.getValue("main.dobday")%></b> <select name="cmbday">
<option value="1"> 1 </option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">10</option>
<option value="10">11</option>
<option value="11">12</option>
<option value="12">13</option>
<option value="13">14</option>
<option value="14">15</option>
<option value="15">16</option>
<option value="16">17</option>
<option value="17">18</option>
<option value="18">19</option>
<option value="19">20</option>
<option value="20">21</option>
<option value="21">22</option>
<option value="22">23</option>
<option value="23">24</option>
<option value="24">25</option>
<option value="25">26</option>
<option value="26">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<b><%=session.getValue("main.dobmonth")%></b><select name="cmbmonth">
<option value="jan">JAN</option>
<option value="feb">FEB</option>
<option value="mar">MAR</option>
<option value="apr">APR</option>
<option value="may">MAY</option>
<option value="jun">JUN</option>
<option value="jul">JUL</option>
<option value="aug">AUG</option>
<option value="sep">SEPT</option>
<option value="oct">OCT</option>
<option value="nov">NOV</option>
<option value="dec">DEC</option>
</select>
<b><%=session.getValue("main.dobyear")%></b> <select name="cmbyear" onchange="if(this.form.cmbday.selectedIndex!=0 && this.form.cmbmonth.selectedIndex!=0 && this.form.cmbyear.selectedIndex!=0){this.form.mergedage.value=this.form.cmbday.options[this.form.cmbday.selectedIndex].value +' '+this.form.cmbmonth.options[this.form.cmbmonth.selectedIndex].text +' '+ this.form.cmbyear.options[this.form.cmbmonth.selectedIndex].value}" size="1">
<option value="1970">1970</option>
<option value="1971">1971</option>
<option value="1972">1972</option>
<option value="1973">1973</option>
<option value="1974">1974</option>
<option value="1975">1975</option>
<option value="1976">1976</option>
<option value="1977">1977</option>
<option value="1978">1978</option>
<option value="1979">1979</option>
<option value="1980">1980</option>
<option value="1981">1981</option>
<option value="1982">1982</option>
<option value="1983">1983</option>
<option value="1984">1984</option>
<option value="1985">1985</option>
<option value="1986">1986</option>
<option value="1987">1987</option>
<option value="1988">1988</option>
<option value="1989">1989</option>
<option value="1990">1990</option>
<option>
</select>
<input type="hidden" name="mergedage">
</tr>
<tr>
<td colspan=2><b>6.)<%=session.getValue("main.add")%></b>
</tr>
<tr>
<td align="right"><b><%=session.getValue("main.addline1")%></b>                 <input type="text" name="address1" value=""></td>
<td><b><%=session.getValue("main.addstate")%></b>             <input type="text" name="state"></td>
</tr>
<tr>
<td align="right"><b><%=session.getValue("main.addline2")%></b>                 <input type="text" name="address2" onChange="this.form.finaladdress.value=this.form.address1.value + ';' + this.value;"> <input type="hidden" name="finaladdress"> </td>
<td><b><%=session.getValue("main.addcity")%>               </b><input type="text" name="city"></td>
</tr>
<tr>
<td align="right"> <b><%=session.getValue("main.addpin")%></b>              <input type="text" name="pincode">
<td></td>
</tr>
<tr>
<td ><b>7.)<%=session.getValue("main.const")%></b> <input type="text" name="constituency">
<td ><b>8.)<%=session.getValue("main.id")%></b>   <input type="text" name="refno">
</tr>
<tr>
<td colspan="2"><center><input type="reset" name="reset" value="<%=session.getValue("button.reset")%>">  <input type=submit name=Submit value="<%=session.getValue("button.submit")%>"></center></td>
</tr>
<tr>
<td>
</td>
</tr>
</form>
</font>
</BODY>
</HTML>
// verify.jsp
<%@ page language="java" pageEncoding="UTF-8"%>
<jsp:useBean id="verify" class="pack.verify" scope="request"/>
<%@ page import="com.oreilly.servlet.*" %>
<%@ page import="java.util.*,java.text.*" %>
<%!
MultipartRequest mp;
// ParameterParser pp;
%>
<!-- Perform the actions on the bean. -->
<%
//pp.setCharacterEncoding("utf-8");
%>
<%
try
mp = new MultipartRequest(request, "d:/Files");
out.println("DONE");
/* Set the request object.*/
/* The request object is implicitly available in the JSP page.*/
verify.setRequest(mp);
/* Insert the employee data into the database.*/
verify.verifyEntry();
//verify.setscope();
/* Run the query to retrieve the employee data from the database.*/
//logicbean.runQuery();
catch (Exception e)
System.out.println(e.getMessage());
%>
<HTML>
<HEAD>
<LINK href="theme/Master.css" rel="stylesheet" type="text/css">
<TITLE>
</TITLE>
</HEAD>
<BODY background="brown.bmp">
<form name=form6 action="insertEntry.jsp" method="POST">
<center>
<table border=3>
<tr>
<td colspan=2><center><img src="asok.bmp"></center>
</tr>
<tr>
<td >
<b>1.)<%=session.getValue("main.ec")%></b>
</td>
<td rowspan=3>
<image src="<%=verify.getpic()%>" width="85" hieght="85">
</td>
</tr>
<tr>
<td >             <b><%=session.getValue("main.ecname")%></b> <%=verify.getvotername()%>  <input type="hidden" value= "<%=verify.getvotername()%>" name="votername"></td>
</tr>
<tr >
<td>             <b><%=session.getValue("main.ecsurname")%></b><%=verify.getvotersurname()%>
<input type="hidden" value= "<%=verify.getvotersurname()%>" name="votersurname"></td>
</tr>
<tr>
<td ><b>2.)<%=session.getValue("main.rel")%></b><input type="hidden" value= "<%=verify.getvoterrelation()%>" name="texthiddenrelation"></td>
<td><%=verify.getvoterrelation()%></td>
</tr>
<tr>
<td >            <b><%=session.getValue("main.relname")%></b>    <input type="hidden" value= "<%=verify.getparentname()%>" name="parentname"></td>
<td><%=verify.getparentname()%></td>
</tr>
<tr>
<td >            <b><%=session.getValue("main.relsurname")%></b><input type="hidden" value= "<%=verify.getparentsurname()%>" name="parentsurname"></td>
<td><%=verify.getparentsurname()%></td>
</tr>
<tr>
<td><b>3.)<%=session.getValue("main.sex")%></b><input type="hidden" value= "<%=verify.getsex()%>" name="texthiddensex"></td>
<td><%=verify.getsex()%></td>
</tr>
<tr>
<td ><b>4.)<%=session.getValue("main.age")%></B><input type="hidden" value= "<%=verify.getage()%>" name="age"></td>
<td><%=verify.getage()%></td>
</tr>
<tr>
<td><b>5.)<%=session.getValue("main.dob")%></b> <input type="hidden" value= "<%=verify.getdob()%>" name="mergedage"></td>
<td> <%=verify.getdob()%></td>
</tr>
<tr>
<td colspan=2><b>
6.)<b><%=session.getValue("main.add")%></b></td>
</tr>
<tr>
<td>             <b><%=session.getValue("verify.add")%></b><input type="hidden" value= "<%=verify.getadderess()%>" name="finaladdress"> </td>
<td><%=verify.getadderess()%></td>
</tr>
<tr>
<td >            <b><%=session.getValue("main.addpin")%></b><input type="hidden" value= "<%=verify.getpin()%>" name="pincode"></td>
<td><%=verify.getpin()%></td>
</tr>
<tr>
<td>            <b><%=session.getValue("main.addstate")%></b><input type="hidden" value= "<%=verify.getstate()%>" name="state"></td>
<td><%=verify.getstate()%></td>
</tr>
<tr>
<td><b>            <%=session.getValue("main.addcity")%></b><input type="hidden" value= "<%=verify.getcity()%>" name="city"></td>
<td><%=verify.getcity()%></td>
</tr>
<tr>
<td><b>7.)<%=session.getValue("main.const")%></b> <input type="hidden" value= "<%=verify.getconst()%>" name="constituency"></td>
<td><%=verify.getconst()%></td>
</tr>
<tr>
<td><b>8.)<%=session.getValue("main.id")%></b> <input type="hidden" value= "<%=verify.getrefno()%>" name="refno"></td>
<td><%=verify.getrefno()%></td>
</tr>
<tr>
<td colspan="2"><center><INPUT TYPE="button" VALUE="<%=session.getValue("ie.back")%>" onClick="history.go(-1)">
<input type=submit name=Submit value="<%=session.getValue("button.submit")%>"></center><input type="hidden" value= "<%=verify.getpic()%>" name="pic"></td>
</tr>
</form>
</BODY>
</HTML>
//verify.java
package pack;
import java.lang.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.oreilly.servlet.*;
import com.oreilly.servlet.ParameterParser.*;
* @author Administrator
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
public class verify {
String votername = "";
String votersurname = "";
String texthiddenrelation="";
String parentname = "";
String parentsurname = "";
String gender = "";
String texthiddensex="";
String age = "";
String dob = "";
String mergedage="";
String address = "";
String finaladdress="";
String pincode = "";
String state = "";
String city = "";
String constituency = "";
String refno = "";
MultipartRequest request = null;
Connection dbConn = null;
ParameterParser pp;
private String voternameParam;
* Set the request object. This is used for getting parameters.
public void setRequest(MultipartRequest request)
this.request = request;
public void verifyEntry()
throws Exception
/* Connect to the database.*/
//pp.setCharacterEncoding("utf-8");
//String nameParam = request.getParameter("name");
MultipartRequest mp;
System.out.println("connected to db2 through insertemployee");
/* Get all the parameters from the calling HTML form.*/
String voternameParam = request.getParameter("votername");
System.out.println("the votername is " + request.getParameter("votername"));
System.out.println(voternameParam);
String votersurnameParam = request.getParameter("votersurname");
System.out.println("the votersurname is " + request.getParameter("votersurname"));
String hiddenrelationParam = request.getParameter("texthiddenrelation");
System.out.println("the relation is " + request.getParameter("texthiddenrelation"));
String parentnameParam = request.getParameter("parentname");
System.out.println("the parentname is " + request.getParameter("parentname"));
String parentsurnameParam = request.getParameter("parentsurname");
System.out.println("the parentsurname is " + request.getParameter("parentsurname"));
String ageParam = request.getParameter("age");
System.out.println("the age is " + request.getParameter("age"));
String mergedageParam = request.getParameter("mergedage");
System.out.println("the mergedage is " + request.getParameter("mergedage"));
String hiddensexParam = request.getParameter("texthiddensex");
System.out.println("the hiddensex is " + request.getParameter("texthiddensex"));
//String dobParam = request.getParameter("dob");
//System.out.println("the dob is " + request.getParameter("dob"));
String finaladdressParam = request.getParameter("finaladdress");
System.out.println("the finaladdress is " + request.getParameter("finaladdress"));
String pincodeParam = request.getParameter("pincode");
System.out.println("the pincode is " + request.getParameter("pincode"));
String stateParam = request.getParameter("state");
System.out.println("the state is " + request.getParameter("state"));
String cityParam = request.getParameter("city");
System.out.println("the city is " + request.getParameter("city"));
String constituencyParam = request.getParameter("constituency");
System.out.println("the constituency is " + request.getParameter("constituency"));
String refnoParam = request.getParameter("refno");
System.out.println("the refno is " + request.getParameter("refno"));
System.out.println("encoding = " + System.getProperty("file.encoding"));
public String getvotername()
return request.getParameter("votername");
public String getvotersurname()
return request.getParameter("votersurname");
public String getvoterrelation()
return request.getParameter("texthiddenrelation");
public String getparentname()
return request.getParameter("parentname");
public String getparentsurname()
return request.getParameter("parentsurname");
public String getage()
return request.getParameter("age");
public String getsex()
return request.getParameter("texthiddensex");
public String getadderess()
return request.getParameter("finaladdress");
public String getpin()
return request.getParameter("pincode");
public String getstate()
return request.getParameter("state");
public String getcity()
return request.getParameter("city");
public String getconst()
return request.getParameter("constituency");
public String getrefno()
return request.getParameter("refno");
public String getdob()
return request.getParameter("mergedage");
public String getpic()
//String a=request.getParameter("pic");
//a=a.substring(a.lastIndexOf("/")+1);
//System.out.print("Java path is "+a);
//Enumeration enum=request.getFileNames();
//while(enum.hasMoreElements())
// String abc=(String)enum.nextElement();
// System.out.print("Java the path is "+abc);
return request.getParameter("pic");
String votername1;
//public void setScope()
//request.setAttribute("votername1" ,voternameParam );
//insertEntry.jsp
<jsp:useBean id="logicbean" class="pack.logicbean" scope="request"/>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="java.util.*,java.text.*" %>
<%@ page import="com.oreilly.servlet.*" %>
<%
request.setCharacterEncoding("UTF-8");
%>
<!-- Perform the actions on the bean. -->
<%
request.setCharacterEncoding("UTF-8");
%>
<%
try
/* Set the request object.*/
/* The request object is implicitly available in the JSP page.*/
logicbean.setRequest(request);
//MultiPartRequest mp=MultiPartRequest(request,"E:\Files");
/* Insert the employee data into the database.*/
logicbean.insertEntry();
/* Run the query to retrieve the employee data from the database.*/
//logicbean.runQueryInsert();
catch (Exception e)
System.out.println(e.getMessage());
%>
<HTML>
<HEAD>
<TITLE>
Insert Record
</TITLE>
</HEAD>
<BODY background="brown.bmp">
<center><H2><%=session.getValue("ie.label")%>
</H2>
<font face = "Devanagari MT for IBM" size = +2>
<b><%=session.getValue("ie.sd")%>|<%=session.getValue("ie.home")%></b>
</font>
</center>
</BODY>
</HTML>
I have narrowed down the problem to the point where i understand that the "request.getParameter()" function for multipart is not able to understand or read UTF data properly. The out.println prints garbage from this function on the console. im using WAS
plz help
thanx in advance
caffainehi,
To solve your problem Servlet Filters
FILTER PROGRAM
===============
package filters;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.UnavailableException;
public class SetCharacterEncodingFilter implements Filter {
// ----------------------------------------------------- Instance Variables
* The default character encoding to set for requests that pass through
* this filter.
protected String encoding = null;
* The filter configuration object we are associated with. If this value
* is null, this filter instance is not currently configured.
protected FilterConfig filterConfig = null;
* Should a character encoding specified by the client be ignored?
protected boolean ignore = true;
// --------------------------------------------------------- Public Methods
* Take this filter out of service.
public void destroy() {
this.encoding = null;
this.filterConfig = null;
* Select and set (if specified) the character encoding to be used to
* interpret request parameters for this request.
* @param request The servlet request we are processing
* @param result The servlet response we are creating
* @param chain The filter chain we are processing
* @exception IOException if an input/output error occurs
* @exception ServletException if a servlet error occurs
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain)
throws IOException, ServletException {
// Conditionally select and set the character encoding to be used
if (ignore || (request.getCharacterEncoding() == null)) {
String encoding = selectEncoding(request);
if (encoding != null)
request.setCharacterEncoding(encoding);
// Pass control on to the next filter
chain.doFilter(request, response);
* Place this filter into service.
* @param filterConfig The filter configuration object
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
this.encoding = filterConfig.getInitParameter("encoding");
String value = filterConfig.getInitParameter("ignore");
if (value == null)
this.ignore = true;
else if (value.equalsIgnoreCase("true"))
this.ignore = true;
else if (value.equalsIgnoreCase("yes"))
this.ignore = true;
else
this.ignore = false;
// ------------------------------------------------------ Protected Methods
* Select an appropriate character encoding to be used, based on the
* characteristics of the current request and/or filter initialization
* parameters. If no character encoding should be set, return
* <code>null</code>.
* <p>
* The default implementation unconditionally returns the value configured
* by the <strong>encoding</strong> initialization parameter for this
* filter.
* @param request The servlet request we are processing
protected String selectEncoding(ServletRequest request) {
return (this.encoding);
web-xml entry
+++++++++++
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping> -
URGENT!!!! - Reading Archived Data from a Report.
Hi,
The data, prior to 15 months, of some tables (BSEG, BSAK),
used in the report YGF11347 has been archived.
Previously this report YGF11347 was run for vendor payment information for any time frame
through FBL1N. So any vendor line items from 2004, 2005, 2006 and current year,
all data elements were available to be extracted and displayed on the report.
Recently the Check Amount is missing when executing the report for payments made prior to
04/01/2006. This is because of archiving the data prior to 15 months.
My requirement is tht i need to display this archived data also in the report "YGF11347".
Can anyone please help me on this issue.
Regards,
Akratihi
good
check this link, hope this would help you to solve your problem.
http://www.ams.utoronto.ca/Assets/output/assets/ixos_637070.pdf.pdf
thanks
mrutyun^ -
HOW to retrieve PURCHASE ORDER DATA from archieve file and print a report
Dear all
1) I have retrieve purchase order data from archived files.
2) print purchase order data and created pdf file.
VIJ.............
Moderator message - Please ask a specific question - post locked
Edited by: Rob Burbank on Apr 28, 2009 12:00 PMDear all
1) I have retrieve purchase order data from archived files.
2) print purchase order data and created pdf file.
VIJ.............
Moderator message - Please ask a specific question - post locked
Edited by: Rob Burbank on Apr 28, 2009 12:00 PM -
In PL-SQL archive data from a table to a file
I am currently developing a vb app where I need to archive data from a table to a file. I was hoping to do this with a stored procedure. I will also need to be able to retrieve the data from the file for future use if necessary. What file types are available? Thanks in advance for any suggestions.
What about exporting in an oracle binary format? The export files cannot be modifiable. Is there a way to use the export and import utility in PL/SQL?
null -
Unable to access Archived data with an ABAP Query
I have an ABAP Query that uses Logical Database KDF (Vendor) for reporting.
KDF is Archive Enabled and I can access archived document via SAP standard programs that used the KDF Logical Database.
the query appears accessing the data but nothing shows on the report.
Has anyone successfully written and ABAP query and included access to the Archived data?
Any help is appreciated.Hi Gena,
I'm facing exactly the same problem as you...
Since this post is an old one, I imagine that you may not remember, but I have to try...
Have you solved it? If yes, could you please tell me how?
I've tried to use CL_ABAP_GZIP and CL_ABAP_UNGZIP_BINARY_STREAM and I'm getting the same error 30 at the IctDecompressStream function.
Tks in advance,
Flavio.
Maybe you are looking for
-
How do I unmerge multiple cells in an excel spreadsheet?
This is driving me nuts! I have no problem using excel on a PC but I can't for the life of me figure out how to unmerge cells on a mac. I've tried opening the formatting toolbox and going to alignment/spacing and then clicking in the "merge cells" bo
-
Error while opening the XML file
Hi all, i'am trying to download data from internal table to XML file with root node and its corresponding child nodes.i have written the program in this way. tables: mara. include bcciixml_decl. include bcciixml_impl. parameters: p_matnr like mara-ma
-
How to use Search plugin functions in your plugin?
Hi, I am developing a plugin which need to add an action for bookmarks. For this I need to search a particular word in the document and the corresponding page number. On going through the SDK documentation I came across the Search plugin. There are w
-
Create document with refrence + update some fields by passing some values
Hello Experts, I have a small problem . I have to create the sales order from BAPI ...but the scenario is have to create with refreence to another document some fields like condition types or material or order quantity etc are passed from
-
Webdynpro ALV checkbox displays 'X'
Hello Webdynpro Champions, I have an issue with displaying ALV output in Webdynpro. I have a checkbox as my first column. This checkbox is bound to a context node. When I check this checkbox, in the ALV output I get 'X' displayed in the output. I thi