Incorrect data from "table.getString" in jCO call to a Unicode SAP sys
We have started getting java errors, with a local standalone java application, after we converted our SAP system to Unicode. The java application makes a RFC call to SAP and runs a functional module, which extracts payment data. The data is passed through table parameters T_OUTLOG and T_FILE.
When trying to get data from the first field/parameter of a table, it also picks up data from the second field/parameter. It seems to be picking up twice the number of expected characters. Consequently when we try to get data from the second field/parameter, it now contains the data from the third field/parameter.
Below are the sample data, java code and results:
eg. SAP TABLE "T_OUTLOG" has the following fields and values:
FILE: 103501U1
LAUFD: 20070803
LAUFI: TIN01R
RPPOST: 44
JAVA CODE:
com.sap.mw.jco.JCO.Table table = function.getTableParameterList().getTable("T_OUTLOG");
for(int i = 0; i < table.getNumRows(); i++)
table.setRow(i);
String s12 = table.getString("FILE");
String s13 = table.getString("LAUFD");
String s14 = table.getString("LAUFI");
int j = Integer.parseInt(table.getString("RPOST"));
RESULTS:
S12 ("FILE") = 103501U120070803
S13 ("LAUFD")= TIN01R
Please advise if you have seen this error before. Is there a need to update any of the jCO jar, rfc, dll files etc.? If so how can this be done?
Jco return a big String with the result. When you initialize the JCO.table get the structure and length of each field.
But, your code is correct. Check in SAP the function and structure of T_OUTLOG
Also, you can use JCO.Field to find the error.
com.sap.mw.jco.JCO.Field objCurrentField = null;
com.sap.mw.jco.JCO.Table table = function.getTableParameterList().getTable("T_OUTLOG");
for (int j = 0; j < table.getFieldCount(); j++) {
objCurrentField = table.getField(j);
System.out.println(j> Name: + objCurrentField. getName() + ; Length+ objCurrentField.getLength() + ; Type: + objCurrentField.getTypeAsString() + ; Value: + objCurrentField.getValue());
Remember, The abap data type its different in JAVA and depend of the users parameters. Example: Fields Type DATUM in SAP return to JAVA 00.00.0000 or 00/00/0000 or 00000000. Maybe the problem its the data type.
Similar Messages
-
How to Insert data from Table A to Table B
Hi,
I have to insert data from Table A into Table B.
Table A is having 100 records and table B is having 10000 records.
Condition is if data in Table A is not in table B then I have to insert into Table B or else I have to skip that.
Can anyone help me with sample code.
Thanks in advance and points are awarded for usefull answers.
Thanks,
Kumar.Hello Kumar
Assuming that tables A and B have the same structure you can use the same logic as change documents are prepared. Assuming both of your itabs are of structure struc_a. Then define the following type:
TYPES: BEGIN OF ty_s_itab_di.
INCLUDE TYPE struc_a.
TYPES: CHIND TYPE bu_chind.
TYPES: END OF ty_s_itab_di.
TYPES: ty_t_itab_di TYPE STANDARD TABLE OF ty_s_itab_di
WITH DEFAULT KEY.
DATA: gt_itab_old TYPE ty_t_itab_di,
gt_itab_new TYPE ty_t_itab_di.
Fill itabs gt_Itab_old with the corresponding data of itab1 and gt_itab_new with the corresponding data of itab2.
Very important: sort you itabs either by all key fields or by all fields.
Call function <b>CHANGEDOCUMENT_PREPARE_TABLES</b> with the following parameters:
- CHECK_INDICATOR = ' '
- TABLE_NEW = gt_Itab_new
- TABLE_OLD = gt_itab_old
The function module will remove identical lines from both itabs. New entries in gt_itab_New will have CHIND = 'I' and deleted entries in gt_itab_old will have CHIND = 'D'. Modified entries are indicated by CHIND = 'U'.
Read the documentation of the function module and play around with it. You will see that this a quite easy yet powerful approach for comparing itabs.
Regards
Uwe -
Spool out data from tables by querying user_tables
I want to write a script to export data from tables that I query out of user_tables.
like
for all the tables returned by this query
select table_name from user_tables where table_name like '%LK';
I want to run a select * from on them and print the data out.
Is it possible to do this?
Thanks,I have a nice filedump routine that takes any query provided and produces a flat file. You have options regarding headers, separators, trailing separators, append vs. write mode, etc. Simple to use and works great. I built it into a mail routine that I worked on. We use it regularly in our production environment without issue.
For details ...see my posting called :
PL/SQL Mail Utility :: Binary/Ascii/Cc/Bcc/FileDump
BarryC
http://www.myoracleportal.com -
Issue:
I have SAP BW system and SAP HANA System
SAP BW to SAP HANA connecting through a DB Connection (named HANA)
Whenever I created any Open Hub as Destination like DB Table with the help of DB Connection, table will be created at HANA Schema level ( L_F50800_D )
Executed the Open Hub service without checking DELETING Data from table option
Data loaded with 16 Records from BW to HANA same
Second time again executed from BW to HANA now 32 records came ( it is going to append )
Executed the Open Hub service with checking DELETING Data from table option
Now am getting short Dump DBIF_RSQL_TABLE_KNOWN getting
If checking in SAP BW system tio SAP BW system it is working fine ..
will this option supports through DB Connection or not ?
Please follow the attachemnet along with this discussion and help me to resolve how ?
From
Santhosh KumarHi Ramanjaneyulu ,
First of all thanks for the reply ,
Here the issue is At OH level ( Definition Level - DESTINATION TAB and FIELD DEFINITION )
in that there is check box i have selected already that is what my issue even though selected also
not performing the deletion from target level .
SAP BW - to SAP HANA via DBC connection
1. first time from BW suppose 16 records - Dtp Executed -loaded up to HANA - 16 same
2. second time again executed from BW - now hana side appaended means 16+16 = 32
3. so that i used to select the check box at OH level like Deleting data from table
4. Now excuted the DTP it throws an Short Dump - DBIF_RSQL_TABLE_KNOWN
Now please tell me how to resolve this ? will this option is applicable for HANA mean to say like , deleting data from table option ...
Thanks
Santhosh Kumar -
How to delete a single data from table using control file
I want delete a single row data from table using sql loder control file
Edited by: 977940 on Dec 19, 2012 9:00 PM977940 wrote:
I want delete a single row data from table using sql loder control file
Edited by: 977940 on Dec 19, 2012 9:00 PMWhy?
And how do you imagine this happening with sqlloader?
The entire purpose of sqlloader is to load data (hence, the name sql*loader*) into a table from an external source. If you want to delete rows from a table, you use the sql DELETE statement.
What is the business problem you are trying to solve? -
Fetch data from table and generate attachment than mail it.
Hello Experts,
From couple of day I am searching on Google for a better database procedure that will help me to get data from tables and generate attachment and mail it but i fail.
My Scenario is:
I have a query that will fetch almost 5000 records from database tables. Each record has almost 75 characters
select a.location_code,
a.item_code,
b.description item_desc,
to_char(a.manufact_date,'ddMonyy')mfg,
to_char((a.manufact_date + nvl(b.expiry_period,0)),'ddMonyy')expr,
to_char((a.manufact_date + nvl(b.qurantine_period,0)),'ddMonyy')qrtn,
round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) days_elapsed,
a.closing_balance_posted quantity
from wms_stock_current_balance_v a, wms_item_setup_mast b
where a.closing_balance > 0
and a.item_code = b.item_code
and a.loc_type in ('RACKING','PICKING','QUICKA','BUNDLED')
and nvl(b.qurantine_period,0) > 0
and round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) <= 0
order by a.item_code, a.location_code;
Sample data of above query is
LOCATION_CODE
ITEM_CODE
ITEM_DESC
MFG
Expiry
Quarantine
Days Elapse
Quantity
13DL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
14DL0
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
134
14DL2
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
160
14DR2
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
20
14LL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17ER2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17GL2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
17SL0
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
64
18QL0
000000000000000F0487
CLEAR COOL BLACK 05ML
23-Feb-10
3-Apr-14
7-Jun-13
-119
160
19AR5
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
160
19DL1
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
19JR0
000000000000000F0487
CLEAR COOL BLACK 05ML
17-Feb-10
28-Mar-14
1-Jun-13
-125
60
19TL1
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
160
20GR2
000000000000000F0487
CLEAR COOL BLACK 05ML
20-Feb-10
31-Mar-14
4-Jun-13
-122
40
36FL3
000000000000000F0487
CLEAR COOL BLACK 05ML
18-Feb-10
29-Mar-14
2-Jun-13
-124
65
19UR0
000000000000000F0591
COMFORT WHITE 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
1
12SL1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
42
12SR1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
42
14OR1
000000000000000F0593
COMFORT PINK 24ML*300
28-Oct-09
28-Oct-11
1-May-11
-887
8
36EL4
000000000000000F0594
CLEAR HF DECRASE 5M*360
14-Feb-10
14-Feb-11
12-Oct-10
-1088
14
13VL1
000000000000000F0595
CLEAR COM SFT CRE 5*360
8-Feb-10
8-Feb-11
6-Oct-10
-1094
160
14ER0
000000000000000F0595
CLEAR COM SFT CRE 5*360
8-Feb-10
8-Feb-11
6-Oct-10
-1094
105
Database Info
Oracle 10g
Version 10.2.0.1.0Look at the sample code for generating a CSV file that I've just posted in response to a similar question:
Re: How to execute a proc and spool files in a database job
And the use the search button in this forum to find sample code for sending a CLOB as a plain/text e-mail attachment using UTL_SMTP. -
How to retrieve multiple data from table and represent it in jsp page
Hi
The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
<html> function addRow()
i++;
var newRow = document.all("tblGrid").insertRow();
var oCell = newRow.insertCell();
oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
// oCell = newRow.insertCell();
// oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
}<html> Then this data are send to the next Servlet for adding into two table.
My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
Rows added into jsp page.
Here is an code for that logic.
<html>
ArrayList<String> mucode = new ArrayList<String>();
ArrayList<Integer> serials = new ArrayList<Integer>();
ArrayList<Integer> apxrate = new ArrayList<Integer>();
ArrayList<Integer> srname = new ArrayList<Integer>();
ArrayList<String> itcode = new ArrayList<String>();
ArrayList<String> itname = new ArrayList<String>();
ArrayList<Integer> iqnty = new ArrayList<Integer>();
ArrayList<String> iuom = new ArrayList<String>();
ArrayList<Integer> pqnty = new ArrayList<Integer>();
ArrayList<String> puom1 = new ArrayList<String>();
ArrayList<Integer> arate = new ArrayList<Integer>();
ArrayList<String> rdate = new ArrayList<String>();
ArrayList<String> bcs = new ArrayList<String>();
ArrayList<String> ccs = new ArrayList<String>();
ArrayList<String> remarkss = new ArrayList<String>();
//ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
//ArrayList<String> dors = new ArrayList<String>();
//ArrayList<String> remarks = new ArrayList<String>();
String entryn = request.getParameter("entryno");
String rows = request.getParameter("rows");
out.println(rows);
//String Entryno = request.getParameter("entryno");
// out.println(Entryno);
int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
if(!Entryno.equals("")){
entryno = Integer.valueOf(Entryno);
if(!rows.equals("")){
rowcount = Integer.valueOf(rows);
for(int i=1;i<=rowcount;i++){
if(request.getParameter("srno"+i)!=null){
serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
out.println(serials.size());
for(int i=1;i<=rowcount;i++){
if(request.getParameter("srno"+i)!=null){
srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
out.println(srname.get(0));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("itmcd"+i)!=null){
itcode.add(request.getParameter("itmcd"+i).trim());
} //out.println(itcode.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("itmnm"+i)!=null){
itname.add(request.getParameter("itmnm"+i).trim());
}//out.println(itname.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("indentqty"+i)!=null){
iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("uom"+i)!=null){
iuom.add(request.getParameter("uom"+i).trim());
}//out.println(iuom.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("mcode"+i)!=null){
mucode.add(request.getParameter("mcode"+i).trim());
for(int i=1;i<=rowcount;i++){
if(request.getParameter("packqty"+i).equals("")){
pqnty.add(0);
}else
pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("pack"+i)!=null){
puom1.add(request.getParameter("pack"+i).trim());
}else
puom1.add("");
for(int i=1;i<=rowcount;i++){
if(request.getParameter("rate"+i).equals("")){
arate.add(0);
}else
arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
/* for(int i=1;i<=rowcount;i++){
if(request.getParameter("rate"+i)!=null){
arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("dor"+i)!=null){
try{
rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
}catch(ParseException p){p.printStackTrace();}
}else
{ rdate.add("");}
for(int i=1;i<=rowcount;i++){
if(request.getParameter("bcc"+i)!=null){
bcs.add(request.getParameter("bcc"+i).trim());
}out.println(bcs.get(0));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("ccc"+i)!=null){
ccs.add(request.getParameter("ccc"+i).trim());
}out.println(ccs.get(0));
for(int i=1;i<=rowcount;i++){
out.println("remark2");
if(request.getParameter("remark2"+i)!=null){
remarkss.add(request.getParameter("remark2"+i).trim());
}out.println(remarkss.get(0));
ArrayList<String> Idate = new ArrayList<String>();
for(int i=1;i<=rowcount;i++){
if(request.getParameter("dateindent"+i)!=null){
try{
Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
}catch(ParseException p){p.printStackTrace();}
String Rdate = dashdate.format(new java.util.Date());
String tdate = dashdate.format(new java.util.Date());
// String Indentdate = dashdate.format(new java.util.Date());
// String ApprovedT1 = dashdate.format(new java.util.Date());
// String ApprovedT2 = dashdate.format(new java.util.Date());
// String ApprovedT1=" ";
//String ApprovedT2="";*/
String ApprovedT1= dashdate.format(new java.util.Date());
out.println (ApprovedT1);
String ApprovedT2=dashdate.format(new java.util.Date());
out.println(ApprovedT2);
String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
out.println(Indentdate);
String Cocode ="BML001";
out.println(Cocode);
String Deptcode = request.getParameter("dept1");
out.println(Deptcode);
String Empcode = request.getParameter("emp");
out.println(Empcode);
String Refno =request.getParameter("rtype");
out.println(Refno);
String Divcode = request.getParameter("todiv1");
out.println(Divcode);
String Usercode = "CIRIUS";
String Whcode = request.getParameter("stor");
out.println(Whcode);
// String Itemgroupcode = request.getParameter("");
String Itemgroupcode ="120000";
out.println(Itemgroupcode);
String Supplytypecode = request.getParameter("stype");
out.println(Supplytypecode);
String Delcode = request.getParameter("deliverycode");
out.println(Delcode);
String Itemclass="WS";
out.println(Itemclass);
// String Itemclass = request.getParameter("iclass");
// out.println(Itemclass);
String unitcode = request.getParameter("uni");
out.println(unitcode);
String Todivcode = request.getParameter("todiv1");
out.println(Todivcode);
String Appxrate = request.getParameter("rate");
out.println(Appxrate);
String Srno = request.getParameter("srno");
out.println(Srno);
/* String Indqty = request.getParameter("indentqty");
out.println(Indqty);*/
String Itemcode = request.getParameter("itmcd");
out.println(Itemcode);
String Othersp = request.getParameter("remark1");
out.println(Othersp);
String Reqdt = request.getParameter("dor");
out.println(Reqdt);
String Munitcode = request.getParameter("mcode");
out.println(Munitcode);
String Packqty = request.getParameter("packqty");
out.println(Packqty);
String Packuom = request.getParameter("pack");
out.println(Packuom);
String Remark2 = request.getParameter("remark2");
out.println(Remark2);
String BC = request.getParameter("bcc");
out.println(BC);
String CC = request.getParameter("ccc");
out.println(CC);
try{
st=connection.createStatement();
connection.setAutoCommit(false);
String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
out.println(sql);
st.addBatch(sql);
for(int i=0;i<serials.size();i++){
out.println("Inside the Statement");
String query3="test query for u";
out.println(query3);
String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
out.println(queryx);
st.addBatch(queryx);
int[] result=st.executeBatch();
connection.commit();
for(int k=0;k<result.length;k++)
out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
catch(BatchUpdateException bue)
out.println("error1;"+bue+"");
catch(SQLException sql)
out.println("error2;"+sql+"");
catch(Exception l)
out.println("error3;"+l+"");
</html>
Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
I have able to show the data in Header portions of page in this ways
here i am adding the part of code which shows the data from header part of table i.e from Header table
<html>
<h2 align="center"><b>Indent Preparation</b></h2>
<div align="left">
<table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
<tr>
<td ><div align="left"><b>Indent No.</b></div></td>
<td ><label>
<input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
</label></td>
<td ><div align="center"><strong>Indent Date</strong></div></td>
<td ><label>
<div align="center">
<input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
</div>
</label></td>
<td> </td>
<td><div align="right"><strong>Entry No.</strong></div></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
<%}else{%>
<td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
<%}%>
<div align="right"></div>
</tr>
<tr>
<td><b>Division</b></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
<td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
<%}else{%>
<td><input type="text" name="div" id="div" /></td>
<td><input type="hidden" name="div1" id="div1" /> </td>
<%}%>
<td> </td>
<td> </td>
<td><div align="right"><strong>Unit</strong></div></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
<td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
<%}else{%>
<td><input type="text" name="unit" id="unit" /></td>
<td><input type="hidden" name="uni" id="uni" /> </td>
<%}%>
</tr>
<tr>
</html>
Any suggestion on any above works is highly appreciated.
Thanks and regards
harshalToo much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
I will only answer the question in the thread's subject:
How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
To display, make use of JSTL's c:forEach. -
Pulling data from table to a flat file
hi all,
Good day to all,
Is there any script which i can use for pulling data from tables to a flat file and then import that data to other DB's. Usage of db link is restricted. The db version is 10.2.0.4.
thanks,
baskar.lIs there any script which i can use for pulling data from tables to a flat file and then import that data to other DB'sFlat file is adequate only from VARCHAR2, NUMBER, & DATA datatypes.
Other datatypes present a challenge within text file.
A more robust solution is to use export/import to move data between Oracle DBs. -
Can I create a Stored Procedure That access data from tables of another servers?
I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
How can I use more than one connection into an Oracle Stored Procedure?
How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
Can I create a Stored Procedure That access data from tables of another servers?You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
CREATE DATABASE LINK command. Refer Document for further details -
How to populate data from table into datagrid in form
hi there. may i know how to populate data from a table into a datagrid? i have created a datagrid in a form using OLE's microsoft datagrid. i'm having problem to populate data from table into the grid. can i know how to do that? thanks
Not exactly. I want to enter input from form and the user can have all options to choose i.e. HIGH, MEDIUM or so on.
Suppose, you have option to select HIGH, MEDIUM or LOW and you can see all these options together. You select LOW and when you save, it is saves in the table as a value. So when you view the table again, it will show LOW as active and HIGH and MEDIUM are null. -
Read data from Table at XI during Mapping
Hi experts
How we can pick data from one database table during Mapping, the table is at XI system.
when we are picking data from table at R/3, we are using RFC Function Module/ BPM, can we pick data from XI database table during mapping ?
what will be the steps to pick it ?
Please Help.
Regards,
Study SAPhi Study Sap
You may use RFC lookup
kindly follow these links for RFC lookup
RFC Lookup.
Look ups.
/people/francesco.bersani/blog/2007/03/05/data-lookup-optimized
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
Use this crazy piece for any RFC Mapping Lookups!
/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
SAP XI Lookup API
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
Lookups in XI made simpler
/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
regards
Sandeep Sharma
PS if helpful kindly reward points -
Select data from table not in another table
Hi,
I want to select data from table A which is not in table B.
Currently I am doing:
select
snoA,
nameA,
dobA
from A
where snoA not in
(select snoB from A, B
where snoA = snoB
and nameA = nameB)
But above is very slow.
Can I do something like:
select
snoA,
nameA,
dobA
from A, B
where
EXCLUDE ( snoA = snoB and nameA = nameB)
Please note that I need the where condition on both the columns.
any help will be appreciated.
-- HarveyWhat are the approximate data volumes in A and B?
What is "very slow"?
What version of Oracle?
What is the query plan?
Without knowing anything about your system, my first thought would be to see if a NOT EXISTS happened to be faster for your data
SELECT snoA,
nameA,
dobA
FROM a
WHERE NOT EXISTS (
SELECT 1
FROM b
WHERE a.snoA = b.snoB
AND a.nameA = b.nameB )Of course, I'm not sure why you are joining A & B in your NOT IN subquery. It would seem like you would just need a correlated subquery, i.e.
SELECT snoA,
nameA,
dobA
FROM a
WHERE snoA NOT IN (
SELECT snoB
FROM b
WHERE a.snoA = b.snoB
AND a.nameA = b.nameB )That should be more efficient than the original query. The NOT EXISTS version may or may not be more efficient than the NOT IN depending on data volumes.
Justin -
Function module to fetch data from table SETLEAVES
Hi All,
We have a requirement to fetch the data from table SETLEAVES based on the setclass,subclass and group. As the table holds hierarchical data, Please let me know a FM which fetches all the hierarchical data from the table SETLEAVES.
Regards
ShivaTry:
exporting
e_class = '0102'
e_setid = setid
e_kokrs = my_kokrs
e_mandt = sy-mandt
e_master_data = 'XXX'
e_structure = 'X X0200'
e_replace_class = space
e_replace_unit = space
e_suffix = space
e_old_line_level = 1 "l_ol_level
tables
t_nodes = it_ceg_nodes
t_values = it_ceg_values
changing
c_info = c_info
c_overwrite = c_overwrite
exceptions
no_controlling_area = 1
no_chart_of_account = 2
different_controlling_areas = 3
different_chart_of_accounts = 4
set_not_found = 5
illegal_field_replacement = 6
illegal_table_replacement = 7
fm_raise = 8
convert_error = 9
no_overwrite_standard_hier = 10
no_bukrs_for_kokrs = 11
others = 12.
Rob -
Sample pgm for moving data from table control to internal table
Hi Experts,
I am newbi to ABAP. I don't have good material for Table control . Appreciate if you direct me to some good source of knowledge on Table control.
The problem at hand : I am trying to move info/data from table control (in screen painter/ input and output mode ) to ITAB but couldn't . Sample pgm if possible.
<b>Modify ITAB index TC-Current_Line .</b>
The above statement is not inserting new lines to ITAB . Help me!
Thanks for your timehi,
do like this...
<b>PROCESS AFTER INPUT.</b>
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
LOOP AT itab_det.
CHAIN.
FIELD itab_det-comp_code.
FIELD itab_det-bill_no.
FIELD itab_det-bill_date.
FIELD itab_det-vend_cust_code.
FIELD itab_det-bill_amt.
MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
ENDCHAIN.
FIELD itab_det-mark
MODULE tab1_mark ON REQUEST.
ENDLOOP.
<b>MODULE tab1_modify INPUT.</b>
APPEND itab_det.
<b>ENDMODULE. "TAB1_MODIFY INPUT</b> -
Time Out Dump while extracting data from table CKIS
Dear Friends,
I am getting TIme Out dump for the below code, while extracting data from table CKIS.
Table CKIS doesn't have any Indexes. Please guide me to resolve this.
Regards,
Viji.
form get_keko_ckis.
SELECT kalnr kalka kadky tvers bwvar matnr werks kokrs
FROM keko
INTO TABLE i_keko1
FOR ALL ENTRIES IN i_final_modify
WHERE matnr = i_final_modify-main_f
AND werks = p_werks
AND kokrs = p_kokrs
AND kadat = p_kadat
AND bidat = p_bidat
AND bwdat = p_bwdat.
IF sy-subrc = 0.
SORT i_keko1 BY kalnr kalka kadky tvers bwvar.
SELECT kalnr kalka kadky tvers bwvar posnr typps kstar
matnr menge gpreis
FROM ckis
INTO TABLE i_ckis_temp
FOR ALL ENTRIES IN i_keko1
WHERE kalnr = i_keko1-kalnr
AND kalka = i_keko1-kalka
AND kadky = i_keko1-kadky
AND tvers = i_keko1-tvers
AND bwvar = i_keko1-bwvar.
IF sy-subrc = 0.
SORT i_ckis_temp BY kalnr kalka kadky tvers bwvar.
LOOP AT i_ckis_temp INTO wa_ckis_temp.
wa_ckis-kalnr = wa_ckis_temp-kalnr.
wa_ckis-kadky = wa_ckis_temp-kadky.
wa_ckis-posnr = wa_ckis_temp-posnr.
wa_ckis-typps = wa_ckis_temp-typps.
wa_ckis-kstar = wa_ckis_temp-kstar.
wa_ckis-matnr1 = wa_ckis_temp-matnr1.
wa_ckis-menge = wa_ckis_temp-menge.
wa_ckis-gpreis = wa_ckis_temp-gpreis.
CLEAR wa_keko1.
READ TABLE i_keko1 INTO wa_keko1
WITH KEY kalnr = wa_ckis_temp-kalnr
kalka = wa_ckis_temp-kalka
kadky = wa_ckis_temp-kadky
tvers = wa_ckis_temp-tvers
bwvar = wa_ckis_temp-bwvar
BINARY SEARCH.
IF sy-subrc = 0.
wa_ckis-matnr = wa_keko1-matnr.
wa_ckis-werks = wa_keko1-werks.
ENDIF.
APPEND wa_ckis TO i_ckis.
CLEAR: wa_ckis_temp, wa_ckis.
ENDLOOP.
ENDIF.
REFRESH: i_keko1, i_ckis_temp.
ENDIF.
endform. " get_keko_ckisHi Try minimising the conditions in where clause
SELECT fields..... FROM CKIS
WHERE KALNR = KEKO-KALNR AND
KADKY = KEKO-KADKY AND
TVERS = KEKO-TVERS AND
TYPPS = 'M'.
after this, deleting unwanted records from internal table as per pending conditions...
Regds,
Anil
Maybe you are looking for
-
I have installed Photoshop CS5 Extended on my laptop. I know it's outdated but CC does not run well on my laptop. I have a 2Ghz Dual-Core processor with a 3 GB Ram. I have a Intel 965/963 Graphics Media Accelerator. I know it's not good but it meets
-
If photos are deleted from events will they remain in the albums I created. I copied and pasted the pics from events into albums, and now want to delete the events so we don't have duplicates...
-
ICC profiles from iMac to laptop
I use Aperture on a MacBook and an iMac. I print on an Epson R280 connected to the iMac. The ColorSync options for the Epson appear in my dialog box on the iMac, but do not on the laptop. How do I import them to the Aperture running on my laptop?
-
E-Recruitment Search Not working. INDEX Error
Dear experts We found E-Recruitment Search is not working. Later we found in TREX Server, Under Index we see the index crteated by E-Rec System in Red Color Radio Button. What is mean? How it would have happened? How to correct this ?? Please Help R
-
I have a laptop running Windows 7 (professional edition) 64 bit using Outlook 2010 and I get this same daggone message every time I try to synch contacts, calender, or notes (all Outlook 2010)...."iTunes could not synch contacts to the iPhone because