Result set Problem...URGENT
I have doubt about my getObject method, my database attribute got varchar and number, can i use getObject method to retrieve???
Because i encounter null error when i use getObject for my database.....
I f any sample to elobrate will be better.
It will work just fine.
The VARCHAR will be retrieved as a String
The NUMERIC will be retrieved as a BigDecimal
See here for the rest of the default conversions:
http://java.sun.com/j2se/1.3/docs/guide/jdbc/spec/jdbc-spec.frame14.html
If the column in the row has a NULL value, however, you will get a null reference back; presumably that's what is happening here. If not, post the code in question and we'll take a look at it.
Dave.
Similar Messages
-
Result Set problem!!!Plz urgent
Hi,
I am using jsp page with database connection.In jsp page i have two button called move next and move previous.
In database 2 records are there.If i open the jsp page first record will be displayed.If i click next record it showing 2nd record.If i click previous record it showing 1st record.Once again if i click next record it is showing that record not found...........What may be the problem????.
Note:For each time button click i will pass the result set object in session variable.Whether it is a correct one..
Plzz help me ya...........this is for move next:::
ResultSet result=null;
Connection connection=null;
String candyid="";
result = (ResultSet)session.getAttribute("resget");
result.next();
if(!result.next())
%>
<Script>
alert("Record Not Found");
</Script>
<%
result.previous();
candyid=result.getString(1);
session.setAttribute("resget",result);
%>
<input type=hidden name="hide" value="yes">
<input type=hidden name="nextid" value=<%= candyid %>>
<Script>
document.AddCandetails2.action="modifyCandidate1.jsp";
document.AddCandetails2.submit();
</Script>
<%
else
candyid=result.getString(1);
System.out.println("candi next id"+candyid);
session.setAttribute("prevresget1",result);
System.out.println("resultset for set attar in next"+result);
%>
<input type=hidden name="hide" value="yes">
<input type=hidden name="nextid" value=<%= candyid %>>
<Script>
document.AddCandetails2.action="modifyCandidate1.jsp";
document.AddCandetails2.submit();
</Script>
<%
this is for move previous:::
ResultSet result=null;
Connection connection=null;
String candyid="";
if(session.getAttribute("prevresget1")==null)
result = (ResultSet)session.getAttribute("resget");
else
result = (ResultSet)session.getAttribute("prevresget1");
if(!result.previous())
%>
<Script>
alert("Record Not Found");
</Script>
<%
result.next();
candyid=result.getString(1);
session.setAttribute("resget",result);
%>
<input type=hidden name="hide" value="yes">
<input type=hidden name="nextid" value=<%= candyid %>>
<Script>
document.AddCandetails2.action="modifyCandidate1.jsp";
document.AddCandetails2.submit();
</Script>
<%
else
candyid=result.getString(1);
session.setAttribute("prevresget1",result);
%>
<input type=hidden name="hide" value="yes">
<input type=hidden name="nextid" value=<%= candyid %>>
<Script>
document.AddCandetails2.action="modifyCandidate1.jsp";
document.AddCandetails2.submit();
</Script>
<%
this is the code............... can u give me the solution -
Consider the Following Code with j2sdk1.4.0_01/jakarta-tomcat-4.0.1
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("Jdbc:Odbc:IMSMC","sa","");
String sql="select * from <Table Name> ";
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
*************Some Code ******************
catch (Exception ex) {
ex.printStackTrace();
}//End of catch
}//End of Try
The Tomcat automatically shuts down If I'm using Scrollable
Result Set and the following Error Occurs.
Error
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D366658
Function=[Unknown.]
Library=c:\j2sdk1.4.0_01\jre\bin\client\jvm.dll
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.setStmtAttrPtr(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttrPtr(JdbcOdbc.java:4676)
at sun.jdbc.odbc.JdbcOdbcResultSet.setRowStatusPtr(JdbcOdbcResultSet.java:4473)
at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:171)
at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:423)
- locked <02A1FE80> (a sun.jdbc.odbc.JdbcOdbcStatement)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
at org.apache.jsp.DocumentsPendingReport$jsp._jspService(DocumentsPendingReport$jsp.java:127)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
at java.lang.Thread.run(Thread.java:536)
Dynamic libraries:
0x00400000 - 0x00406000 c:\j2sdk1.4.0_01\bin\java.exe
0x77F80000 - 0x77FFB000 C:\WINNT\system32\ntdll.dll
0x7C2D0000 - 0x7C332000 C:\WINNT\system32\ADVAPI32.dll
0x7C570000 - 0x7C623000 C:\WINNT\system32\KERNEL32.DLL
0x77D30000 - 0x77D9E000 C:\WINNT\system32\RPCRT4.DLL
0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll
0x6D330000 - 0x6D445000 c:\j2sdk1.4.0_01\jre\bin\client\jvm.dll
0x77E10000 - 0x77E6F000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F79000 C:\WINNT\system32\GDI32.dll
0x77570000 - 0x775A0000 C:\WINNT\system32\WINMM.dll
0x75E60000 - 0x75E7A000 C:\WINNT\system32\IMM32.DLL
0x6CA60000 - 0x6CA68000 C:\WINNT\system32\LPK.DLL
0x66650000 - 0x666A4000 C:\WINNT\system32\USP10.dll
0x6D1D0000 - 0x6D1D7000 c:\j2sdk1.4.0_01\jre\bin\hpi.dll
0x6D300000 - 0x6D30D000 c:\j2sdk1.4.0_01\jre\bin\verify.dll
0x6D210000 - 0x6D228000 c:\j2sdk1.4.0_01\jre\bin\java.dll
0x6D320000 - 0x6D32D000 c:\j2sdk1.4.0_01\jre\bin\zip.dll
0x6D2D0000 - 0x6D2DD000 C:\j2sdk1.4.0_01\jre\bin\net.dll
0x75050000 - 0x75058000 C:\WINNT\system32\WSOCK32.dll
0x75030000 - 0x75044000 C:\WINNT\system32\WS2_32.DLL
0x75020000 - 0x75028000 C:\WINNT\system32\WS2HELP.DLL
0x74FD0000 - 0x74FEE000 C:\WINNT\system32\msafd.dll
0x75010000 - 0x75017000 C:\WINNT\System32\wshtcpip.dll
0x6D250000 - 0x6D25A000 C:\j2sdk1.4.0_01\jre\bin\JdbcOdbc.dll
0x0BDC0000 - 0x0BDF2000 C:\WINNT\system32\ODBC32.dll
0x71780000 - 0x7180A000 C:\WINNT\system32\COMCTL32.dll
0x782F0000 - 0x78538000 C:\WINNT\system32\SHELL32.dll
0x70BD0000 - 0x70C34000 C:\WINNT\system32\SHLWAPI.DLL
0x76B30000 - 0x76B6E000 C:\WINNT\system32\comdlg32.dll
0x1F850000 - 0x1F866000 C:\WINNT\system32\odbcint.dll
0x0BF00000 - 0x0BF5E000 C:\WINNT\System32\SQLSRV32.dll
0x41090000 - 0x410BD000 C:\WINNT\System32\SQLUNIRL.dll
0x77800000 - 0x7781E000 C:\WINNT\System32\WINSPOOL.DRV
0x76620000 - 0x76631000 C:\WINNT\system32\MPR.DLL
0x77820000 - 0x77827000 C:\WINNT\system32\VERSION.dll
0x759B0000 - 0x759B6000 C:\WINNT\system32\LZ32.DLL
0x779B0000 - 0x77A4B000 C:\WINNT\system32\OLEAUT32.dll
0x77A50000 - 0x77B3C000 C:\WINNT\system32\ole32.dll
0x75170000 - 0x751BF000 C:\WINNT\System32\NETAPI32.dll
0x7C340000 - 0x7C34F000 C:\WINNT\System32\SECUR32.DLL
0x751C0000 - 0x751C6000 C:\WINNT\System32\NETRAP.DLL
0x75150000 - 0x7515F000 C:\WINNT\System32\SAMLIB.DLL
0x77950000 - 0x7797A000 C:\WINNT\system32\WLDAP32.DLL
0x77980000 - 0x779A4000 C:\WINNT\System32\DNSAPI.DLL
0x769A0000 - 0x769A7000 C:\WINNT\system32\NDDEAPI.DLL
0x1FA20000 - 0x1FA36000 C:\WINNT\System32\sqlsrv32.rll
0x0C390000 - 0x0C3A9000 C:\WINNT\system32\odbccp32.dll
0x0C3B0000 - 0x0C3BF000 C:\WINNT\system32\DBNETLIB.DLL
0x75500000 - 0x75504000 C:\WINNT\system32\security.dll
0x782D0000 - 0x782EF000 C:\WINNT\system32\msv1_0.dll
0x77440000 - 0x774B8000 C:\WINNT\system32\CRYPT32.DLL
0x77430000 - 0x77440000 C:\WINNT\system32\MSASN1.DLL
0x77BF0000 - 0x77C01000 C:\WINNT\system32\ntdsapi.dll
0x782C0000 - 0x782CC000 C:\WINNT\System32\rnr20.dll
0x77340000 - 0x77353000 C:\WINNT\system32\iphlpapi.dll
0x77520000 - 0x77525000 C:\WINNT\system32\ICMP.DLL
0x77320000 - 0x77337000 C:\WINNT\system32\MPRAPI.DLL
0x773B0000 - 0x773DF000 C:\WINNT\system32\ACTIVEDS.DLL
0x77380000 - 0x773A3000 C:\WINNT\system32\ADSLDPC.DLL
0x77830000 - 0x7783E000 C:\WINNT\system32\RTUTILS.DLL
0x77880000 - 0x7790E000 C:\WINNT\system32\SETUPAPI.DLL
0x7C0F0000 - 0x7C151000 C:\WINNT\system32\USERENV.DLL
0x774E0000 - 0x77513000 C:\WINNT\system32\RASAPI32.DLL
0x774C0000 - 0x774D1000 C:\WINNT\system32\RASMAN.DLL
0x77530000 - 0x77552000 C:\WINNT\system32\TAPI32.DLL
0x77360000 - 0x77379000 C:\WINNT\system32\DHCPCSVC.DLL
0x777E0000 - 0x777E8000 C:\WINNT\System32\winrnr.dll
0x777F0000 - 0x777F5000 C:\WINNT\system32\rasadhlp.dll
0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
0x690A0000 - 0x690AB000 C:\WINNT\system32\PSAPI.DLL
Local Time = Sat May 01 11:30:40 2004
Elapsed Time = 5
# HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
# Error ID : 4F530E43505002D5
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
# Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
Also No Error is Thrown with j2sdk1.4.0
If I'm using Not using Scrollable Result Set, No Error is Thrown.
Error is Thrown only with Scrollable Result set and with j2sdk1.4.0_01Did you forget to put the SQL statement in when you used createStatement? I added it below:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("Jdbc:Odbc:IMSMC","sa","");
String sql="select * from <Table Name> ";
Statement stmt=conn.createStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
Does the JDBC-ODBC bridge driver accomodate any of these settings you're trying?
The problem shouldn't have anything to do with Tomcat. Sounds like a JDBC driver issue to me. Try to reproduce the error without Tomcat, and then see if adding the SQL corrects things at all.
I'd read the docs to see if the bridge driver has these features. I don't think it's up to the full standard. -
Result set problem with GROUP BY
hi there, this should be the simplest of queries but.........
when run, the list size is 13, this is the number of letting units in the table. it appears not to be grouping by the property id.if it was doing this there should only be 8 rows. having said this, the while loop should output the count of each row, it does this 8 times with the correct counts. it then crashes with a invalid curser error. it appears the query is workig correctly but the resultset thinks its got 13 rows when it only has 8.
accessing ms access db
using jdbc:odbc
heres the code
searchResults = stmt.executeQuery(
"SELECT Count(*) AS FreeUnits " +
"FROM letting_units " +
"GROUP BY letting_units.property_id");
searchResults.last();
listSize = searchResults.getRow();
searchResults.beforeFirst();
System.out.println(listSize);
while (searchResults.next())
System.out.println(searchResults.getString(1));
hope someone can help me
cheers
andyIt's not the problem with GROUP BY. You should use scrollable result set to move in both directions (forward and backward).
In your code
searchResults.beforeFirst(); line may return false. So you will get the searchResults.next() false. Once you move forward in non-scrollable cursor cannot come back. So when you create the statement object use TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE constants provided in the ResultSet. -
I am trying to comparing two tables(assuming they both have the same columns) records by records in two differnet schemas and print out their discrepancy.
I am using jdbc oracle connection to my database. In main, I'm creating two new tables object and call getTableRecords(schema, tableName)
and then do the comparsion: table1.compare(table2)
public Table getTableRecordss(DatabaseInfo dbInfo, Table table)
String sql = ("Select * from " + table.getName() ");
try
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery(sql);
rs.setFetchSize(1000);
String tempString;
while (rs.next())
Record record = new Record();
tempString = rs.getString(i+1);
if(tempString == null)
tempString = "";
record.addValue(tempString);
table.addRecord(record);
stmt.close();
}catch (Exception e)
e.printStackTrace();
System.exit(1);
closeConnection();
This proram ran okay if the row sizes of a table is less than 200,000, but it will get heap space size Outof Memory error if it is more than that.
I did try to increase the heap size by -Xmx1024m and still didn't work. Is there any other ways to get this to work? Thanks in advance.simcha wrote:
I need this because I wanted to make sure the table from db1 get streams over to db2What are you doing? Specifically? Are you trying replicate or implement your own RAID? Java is not the way to go for that.
Is there a way i can get result set by batches?Sure, but nobody can tell you how to do that. You need to figure that out for yourself because we have no idea what your data looks like. But for example, if your data contained a bunch of cars, you could do it in batches like Toyota first, then Ford, then Yugo (probably a small batch) -
I am using jdk1.3 and i am having a problem using methods such first() ,last(), previuos update,delete()...
and how to upgrade jdbc1.0 to jdbc2.0
ThanksI am using jdk1.3 and i am having a problem using
methods such first() ,last(), previuos
update,delete()...And those problems are?
and how to upgrade jdbc1.0 to jdbc2.0You don't.
1.3 comes with 2.0 (or perhaps 2.1.)
If your driver (which is not part of JDBC) does not support those features then you get a newer driver or a different driver, presuming that is even possible. -
Hi
I am Fetching a Huge Number of records(50,000) from the database and Displaying them on the screen in a JSP page.. But its taking a very long time..Is there any Process that can speed up the fetching of records from the database and display it on the screen..And that too I dont want to use any Entity Bean.. I want the solution only in JSP using a ResultSet.. can any one help in finding the Solution...
bye
sanjuWhen displaying such a number of records in a HTML table, it might be IE's table rendering process that takes most of the time (the "pre" tag is even worse ...). Usually I can't imagine that it makes sense to display 50000 records on one page, so I agree with bluegreenvn: break the resultset into several pages of e.g. 50 records each and add some navigation functionality.
Regards -
Result set looping and arrays??????????
Hey i have a result set problem in using an applet connected to a database.
After i have accessed a database, i am using a result set to store these values, then put them into arrays to out put to screen. im using:
count = 0;
while(rs.next())
lecturer[count] = rs.getString("FirstName") + " " + rs.getString("Surname");
room[count] = rs.getString("Room_No");
sentence = rs.getString("Subjects");
if(sentence.length()>12)
space = sentence.indexOf(" ");
subject[count] = sentence.substring(0,(space));
subject2[count] = sentence.substring((space+1),sentence.length());
else
subject[count] = sentence;
subject2[count] = " ";
timeslot[count] = rs.getInt("Time_slot");
count++;
resCount++;
rs.close();
stm.close();
The while is there untill there are no more values in the result set. This should work(in theory). But for some reason the while loop goes around and around until 'size' (which is the size for all the arrays) is reached. This is a set value at the start of the applet. But whenever i change it the while loop goes around that many times without fail. this results in duplicate outputs to screen, that i dont want.
Anyone got any ideas????????????This flow doesn't make too much sense to me. Why are you setting an absolute limit on the length of the array, if it should really be determined by the number of rows in your resultset. It sounds like you would be better off using a Collection class, like:
List names = new ArrayList();
while(rs.next()) {
names.add(rs.getString("name"));
} -
Problem in Retrive values from result set
I have a class where i do all database operation .First i fire select query and take values from result set and based on that value i fire update query.
Problem is that i am not getting all values from result set . i get only last value and when i fire update query i get error as :Resultset is closed.
I am using acess and java.You probably are using the same Statement object for both queries? Try creating separate Statement objects for each query. (My guess is this a problem with the way you're using JDBC, not a Servlet issue.)
-
Problem with scrollable result set
hi
can u please tell me how i can get no of rows from a result set..
i am using thin drivers and connecting to remote database,every thing is working fine if i use fwd only type ,but if u use sensitive type it is giving error
code:
stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
i am geting error at this line
error :
java.lang.AbstractMethodError:oracle/jdbc/driver/oracleconnection.createStatement
please help medoes your jdk include jdbc 2.0? Is your driver updated to support jdbc 2.0 features? have you recently updated either(and forgot to change the classpath)?
I am running jdk 1.3 and oracle thin(classes12.zip) have not had problems creating/using scrollable resultsets??
Jamie -
Hi we are having problems with leaking database connections. We are using the jdbc debug features of oc4j (9.0.2).
Basically we connect to database 1, do a query and open a result set, then create a connection to database 2 and try to execute a query on it. The problem is that if the first's resultset is open, the debugging complains that there are multiple open result sets. This is leading to database connections not getting release when they should be.
Here's an example of the code we are using (which is in a stateless session bean):
public void test(){
try {
Connection connection;
DataSource dataSource;
Context context = new InitialContext();
dataSource = (DataSource) context.lookup(Constants.NHHDC_DATABASE);
connection = dataSource.getConnection();
PreparedStatement statement = null;
ResultSet resultSet = null;
statement = connection.prepareStatement(" SELECT 'X' FROM DUAL");
resultSet = statement.executeQuery();
resultSet.next();
DataSource reamsDataSource;
Context reamsContext = new InitialContext();
reamsDataSource = (DataSource) reamsContext.lookup(Constants.REAMS_DATABASE);
Connection reamsConnection = reamsDataSource.getConnection();
PreparedStatement reamsStatement = null;
ResultSet reamsResultSet = null;
reamsStatement = reamsConnection.prepareStatement("SELECT 'X' FROM DUAL");
System.out.println("LAST STATEMENT");
reamsResultSet = reamsStatement.executeQuery();
System.out.println("FINISHED");
reamsResultSet.close();
reamsStatement.close();
reamsConnection.close();
resultSet.close();
statement.close();
connection.close();
} catch (NamingException e) {
System.out.println("naming error " + e.getMessage());
} catch (SQLException e) {
System.out.println("sql error " + e.getMessage());
The error coming from the debug is:
*********** OPEN SETS: ************
java.lang.Exception: com.evermind.sql.DebugPreparedResultSet@5e9f1
Is it not possible to have 1 resultset open on one database and a separate one on a different database? I know the example above could be written to close the result set first, but this is a simplified example of something we are doing just to hightlight the problem.
Any ideas appricated on why this complains.
Thanks
Andrew Moorehi Andrew,
Just a hint: we are using more than 1 database connections at the same time. but in this case all datasources have to be non-emulated.
check this, maybe its the prob @ yours.
4 non-emulated datasources check the server guide of oc4j ..
http://technet.oracle.com/tech/java/oc4j/doc_library/902/servicesjun02/ds3.htm#1005742
cu
ed -
Problem in creating Saved Result Set (SRS) in OBIEE 10.1.3.4
Hi,
We have migrated Siebel Analytincs 7.8.5 to OBIEE 10.1.3.4, and we are now unable to create any SRS from OBIEE though we can create Segment and marketing cache for the segment.
We did the following steps -
1. Unisntall Siebel Analytincs 7.8.5
2. Install OBIEE 10.1.3.4
3. Use MIGRATE tool (sawmigrate) to migrate RPD & WEBCAT
4. We have ALTERed the SRS tables - M_SR_HEADER, M_SR_ACCOUNT (as in OBIEE version there are many new columns have been added)
5. We passed GLOBAL CONSISTENCY in the RPD
6. We followed the steps in the document *"Oracle®Marketing Segmentation Guide Version 10.1.3.4 July 2008"*
7. We created a Saved Result Set Format as instructed in the document - here we are very confused to select the list of columns - we don't know what should be the excat source / format
8. Then we click the SRS create button
9. We got the below error -
Error Codes: QS2QOLYY:GDL67CY9:IHVF6OM7:OPR4ONWY:U9IM8TAC
Error in getting cursor for WorkNode (Id:0)
Authentication Failure.
Odbc driver returned an error (SQLDriverConnectW).
*State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused. [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)*
Can anyone help us to resolve the issue ?
A quick response is much much appreciated.
Many Thanks,
PrasantaHi,
It seems like you didnt setup the Administrator user for Saved Result Sets as it mentioned in the Marketing Segmentation Guide.
Here is an extract from the guide:
Setting Up the Web Administrator for Managing Cache and Saved Result Sets
Some queries issued by the segmentation engine require the use of the Execute Physical stored
procedure. These queries include delete statements on the cache, delete statements on the saved
result sets, and insert statements for the cache and saved result set. The Execute Physical stored
procedure must be run by a user with administrator privileges. The administrator user is set up in
the instanceconfig.xml file.
NOTE: The BI Administrator password and login parameters are case sensitive.
To set up the administrative user in the instanceconfig.xml file
1 Open a command shell and navigate to the <OracleBI>/web/bin, where <OracleBI> represents
the root directory of the installation.
2 Execute the following command:
cryptotools credstore -add -infile <OracleBIData>/web/config/credentialstore.xml
3 When prompted, enter the following values:
Credential Alias: admin
Username: Administrator
Password: <enter Admin password here>
Do you want to encrypt the password? y
Passphrase for encryption: <password >
Do you want to write the passphrase to the xml? n
File "<OracleBIData>/web/config/credentialstore.xml" exists. Do you want to overwrite it? y
4 Open the credentialstore.xml file and verify that the following section has been created:
<sawcs:credential type="usernamePassword" alias=“admin">
<sawcs:username> Administrator </sawcs:username>
<sawcs:password>
<xenc:EncryptedData> -
More time in Extracting result set ( performence) VERY URGENT
Hi all,
This program is taking much more time in Extracting the the result set.........(How to increase the performence of this program)
How to decrease the Execuition of the time.......???
***INCLUDE Z00_BCI010 .
TABLES: z00_bc_cpt_sess, " Stockage des compteurs associés aux
" progs de traitement.
z00_bc_erreur, " Table des anomalies des programmes
" spécifiques.
*début ajout FAE 30463
z00_bc_err_log. "Table de stockage et retention des
"erreurs
*fin ajout FAE 30463
t100. " Messages.
Déclaration des données internes *
Table interne des anomalies.
DATA: BEGIN OF itb_erreur OCCURS 0.
INCLUDE STRUCTURE z00_bc_erreur.
DATA: END OF itb_erreur.
Nombre de jour pour la suppression des données dans la table des
anomalies
DATA: i_nb_jour(3) TYPE n.
*début ajout FAE 30463
DATA: w_dl_delai LIKE z00_bc_err_log-z_delai,
w_in_stockage LIKE z00_bc_err_log-z_stockage VALUE 'X'.
*fin ajout FAE 30463
Date et heure d'éxécution.
DATA: i_dt_date_execution LIKE sy-datum,
i_hr_heure_execution LIKE sy-uzeit.
Date de suppression.
DATA: z_date LIKE sy-datum.
Compteur de session.
DATA: o_ct_session LIKE z00_bc_cpt_sess-z_ct_session.
Compteur pour le numéro de ligne de la table d'anomalie.
DATA: l_ct_num_ligne LIKE z00_bc_erreur-z_no_num_ligne VALUE '00'.
Données utile au remplissage de la table interne des anomalies.
Nom du programme ABAP.
DATA: i_repid LIKE z00_bc_erreur-z_repid.
Libellé du traitement.
DATA: w_lb_traitement LIKE itb_erreur-z_lb_lib_trait.
Clé identifiant l'objet traité.
DATA: i_ds_clef_objet LIKE z00_bc_erreur-z_ds_clef_objet.
Code anomalie.
DATA: i_cd_message LIKE sy-msgno.
Type de message d'anomalie.
DATA: i_ty_message LIKE sy-msgty.
Classe de message.
DATA: i_classe_message LIKE sy-msgid.
Variable de message.
DATA: i_msgv1 LIKE sy-msgv1,
i_msgv2 LIKE sy-msgv2,
i_msgv3 LIKE sy-msgv3,
i_msgv4 LIKE sy-msgv4.
Phase d'éxécution du programme.
DATA: i_in_phase_exec LIKE z00_bc_erreur-z_in_phase_exec.
Libellé de la clé.
DATA: i_clef_objet(30).
Constante.
CONSTANTS: k_heure(8) VALUE 'Heure', "#EC NOTEXT
k_code(4) VALUE 'Code', "#EC NOTEXT
k_lb_message(80) VALUE 'Désignation', "#EC NOTEXT
k_ligne LIKE sy-linsz VALUE '127',
k_societe LIKE sy-title VALUE 'SCHNEIDER ELECTRIC INDUSTRIES S.A.S.',
k_projet LIKE sy-title VALUE 'LOGOS'.
TRAITEMENT *
Nettoyage de la table interne et des données.
FREE itb_erreur.
CLEAR: i_msgv1,
i_msgv2,
i_msgv3,
i_msgv4.
Form F930_INIT *
Fonction : *
- Renseigne la table transparente des anomalies. *
Donnée globale : *
- ITB_ERREUR Tables internes des erreurs. *
Entrées : *
- I_REPID Nom du programme en erreur. *
- I_NB_JOUR Nombre de jour avant la suppression des *
enrgistrement de la lable Z00_BC_ERREUR. *
Sortie : *
- O_CT_SESSION Compteur de session. *
FORM f930_init USING i_repid
i_nb_jour.
Appel de la routine de suppression des vieux enregistrement.
PERFORM f911_suppression_anomalie USING i_repid
i_nb_jour.
Mise à jour des compteur de session.
PERFORM f912_maj_z00_bc_cpt_sess USING i_repid
CHANGING o_ct_session.
ENDFORM.
Form F930_INIT_BLOCAGE *
Fonction : *
- Suppression des vieux enregistrements
- mise à jour table session
Donnée globale : *
- ITB_ERREUR Tables internes des erreurs. *
Entrées : *
- I_REPID Nom du programme en erreur. *
- I_NB_JOUR Nombre de jour avant la suppression des *
enrgistrement de la lable Z00_BC_ERREUR. *
Sortie : *
- O_CT_SESSION Compteur de session. *
FORM f930_init_blocage USING i_repid
i_nb_jour.
Appel de la routine de suppression des vieux enregistrement.
avec contrôle entrée de blocage
PERFORM f911_suppression_anomalie_bloc USING i_repid
i_nb_jour.
Mise à jour des compteur de session.
PERFORM f912_maj_z00_bc_cpt_sess USING i_repid
CHANGING o_ct_session.
ENDFORM.
Form F900_ERREUR *
Fonction : *
- Renseigne la table transparente des anomalies. *
Donnée globale : *
- ITB_ERREUR Tables internes des erreurs. *
Donnée locale : *
- l_CT_NUM_LIGNE Compteur de ligne *
- O_CT_SESSION Numéro du compteur de session *
Entrées : *
- I_REPID Nom du programme en erreur. *
- I_IN_PHASE_EXEC Phase d'éxécution du programme *
- I_DS_CLEF_OBJET Clé identifiant l'objet traité. *
- I_DT_DATE_EXECUTION Date d'éxécution. *
- I_HR_HEURE_EXECUTION Heure d'éxécution. *
- I_TY_MESSAGE Type de message. *
- I_CD_MESSAGE code anomalie. *
- I_CLASSE_MESSAGE Classe de message. *
- I_MSGV1 Variable de message. *
- I_MSGV2 Variable de message. *
- I_MSGV3 Variable de message. *
- I_MSGV4 Variable de message. *
FORM f900_erreur USING i_repid
i_in_phase_exec
i_ds_clef_objet
i_dt_date_execution
i_hr_heure_execution
i_ty_message
i_cd_message
i_classe_message
value(i_msgv1)
value(i_msgv2)
value(i_msgv3)
value(i_msgv4). "#EC CALLED
DE3K913901 début ajout
On récupère l'incrément qui sera inclu au n°de session :
IF o_ct_session IS INITIAL
AND i_repid = 'Z06_MMR001'.
PERFORM f912_maj_z00_bc_cpt_sess USING 'Z06_MMR001'
CHANGING o_ct_session.
ENDIF.
DE3K913901 fin ajout
Nettoyage de la zone de l'en tete de la table interne.
CLEAR itb_erreur.
Incrementation du compteur du numéro de ligne de la table d'anomalie.
l_ct_num_ligne = l_ct_num_ligne + 1.
Remplissage de la table interne.
MOVE: i_repid TO itb_erreur-z_repid,
l_ct_num_ligne TO itb_erreur-z_no_num_ligne,
i_dt_date_execution TO itb_erreur-z_dt_date_exec,
i_hr_heure_execution TO itb_erreur-z_hr_heure_exec,
w_lb_traitement TO itb_erreur-z_lb_lib_trait,
i_in_phase_exec TO itb_erreur-z_in_phase_exec,
i_ds_clef_objet TO itb_erreur-z_ds_clef_objet.
CONCATENATE i_ty_message
i_cd_message
INTO itb_erreur-z_cd_message.
Récupération du libellé du message.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid = i_classe_message
msgnr = i_cd_message
msgv1 = i_msgv1
msgv2 = i_msgv2
msgv3 = i_msgv3
msgv4 = i_msgv4
IMPORTING
message_text_output = itb_erreur-z_lb_message.
*début modification FAE 30463
*Si le flag est pas coché, on met à jour la table des erreurs
*Z00_BC_ERREUR
*s'il n'y a pas d'entrée dans la table on met aussi à jour
*Z00_BC_ERREUR
IF NOT w_in_stockage IS INITIAL.
Mise à jour de la table.
PERFORM f910_mise_a_jour.
ENDIF.
Mise à jour de la table interne.
APPEND itb_erreur.
Nettoyage des variables.
CLEAR: i_msgv1,
i_msgv2,
i_msgv3,
i_msgv4.
*fin modification FAE 30463
ENDFORM.
Form F910_MISE_A_JOUR *
Fonction : *
- Mets à jour les tables Z00_BC_CPT_SESS et Z00_BC_ERREUR. *
Donnée globale : *
- ITB_ERREUR Tables internes des erreurs. *
FORM f910_mise_a_jour.
Mise à jour des anomalies.
MOVE-CORRESPONDING itb_erreur TO z00_bc_erreur.
CONCATENATE itb_erreur-z_dt_date_exec
itb_erreur-z_hr_heure_exec
o_ct_session
INTO z00_bc_erreur-z_no_num_session.
MODIFY z00_bc_erreur.
ENDFORM.
Form F911_SUPPRESSION_VIEILLE_ANOMALIE *
Fonction : *
- Supprime les villes anomalies. *
Donnée globale : *
- Z00_BC_ERREUR Table des anomalies des programmes spécifiques.*
Entrée : *
- I_REPID Nom du programme en erreur. *
- I_NB_JOUR Nombre de jour avant la suppression des *
enrgistrement de la lable Z00_BC_ERREUR. *
FORM f911_suppression_anomalie USING i_repid
i_nb_jour.
début ajout FAE 30463
SELECT SINGLE z_stockage z_delai
INTO (w_in_stockage, w_dl_delai)
FROM z00_bc_err_log
WHERE z_repid = i_repid.
*si le programme est dans la table z00_bc_err_log, on récupère la zone
Z_DELAI (délai de rétention des erreurs)
*sinon le délai est celui passé en paramètre de cette fonction
IF sy-subrc = 0.
z_date = sy-datum - w_dl_delai.
ELSE.
z_date = sy-datum - i_nb_jour.
Pas d'enreg. ds table param, alors on stockera ds Z00_BC_ERREUR
w_in_stockage = 'X'.
ENDIF.
fin ajout FAE 30463
Suppression des enregistrements trop vieux.
DELETE FROM z00_bc_erreur WHERE z_repid EQ i_repid
AND z_dt_date_exec LE z_date.
ENDFORM.
Form F911_SUPPRESSION_ANOMALIE_BLOC *
Fonction : *
- Supprime les villes anomalies en tenant compte des objets de bloc *
Donnée globale : *
- Z00_BC_ERREUR Table des anomalies des programmes spécifiques.*
Entrée : *
- I_REPID Nom du programme en erreur. *
- I_NB_JOUR Nombre de jour avant la suppression des *
enrgistrement de la lable Z00_BC_ERREUR. *
FORM f911_suppression_anomalie_bloc USING i_repid
i_nb_jour.
Blocage de la table
CALL FUNCTION 'ENQUEUE_EZ00_BC_ERREUR'
EXPORTING
mode_z00_bc_erreur = 'E'
z_mandt = sy-mandt
z_repid = i_repid
X_Z_REPID = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
Suppression des enr que si la table pour ce pg n'est pas bloquée
Si bloquée => ne rien faire car suppression aura déjà eu lieu
IF sy-subrc EQ 0.
début ajout FAE 30463
SELECT SINGLE z_stockage z_delai
INTO (w_in_stockage, w_dl_delai)
FROM z00_bc_err_log
WHERE z_repid = i_repid.
*si le programme est dans la table z00_bc_err_log, on récupère la zone
Z_DELAI (délai de rétention des erreurs)
*sinon le délai est celui passé en paramètre de cette fonction
IF sy-subrc = 0.
z_date = sy-datum - w_dl_delai.
ELSE.
z_date = sy-datum - i_nb_jour.
Pas d'enreg. ds table param, alors on stockera ds Z00_BC_ERREUR
w_in_stockage = 'X'.
ENDIF.
fin ajout FAE 30463
Suppression des enregistrements trop vieux.
DELETE FROM z00_bc_erreur WHERE z_repid EQ i_repid
AND z_dt_date_exec LE z_date.
Déblocage de la table.
CALL FUNCTION 'DEQUEUE_EZ00_BC_ERREUR'
EXPORTING
MODE_Z00_BC_ERREUR = 'E'
z_mandt = sy-mandt
z_repid = i_repid.
ENDIF.
ENDFORM.
Form F912_MAJ_Z00_BC_CPT_SESS *
Fonction : *
- Renseigne la table transparente des sessions. *
Données globales : *
- z00_BC_CPT_SESS Stockage des compteurs associés aux progs de *
traitement. *
- Z00_BC_ERREUR Table des anomalies des programmes spécifiques*
Entrée : *
- I_REPID Nom du programme en erreur. *
Sortie : *
- O_CT_SESSION Numéro de session. *
FORM f912_maj_z00_bc_cpt_sess USING i_repid
CHANGING o_ct_session.
Blocage de la table
CALL FUNCTION 'ENQUEUE_EZ00_BC_CPT_SESS'
EXPORTING
mode_z00_bc_cpt_sess = 'E'
z_mandt = sy-mandt
z_repid = i_repid
X_Z_REPID = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
Si la table est déjà vérouillée.
IF sy-subrc NE 0.
DO.
Si c'est la 99eme fois que l'on reboucle alors on sort du programme.
IF sy-index EQ 99.
STOP.
ENDIF.
sinon attendre 1 seconde.
WAIT UP TO 1 SECONDS.
Blocage de la table
CALL FUNCTION 'ENQUEUE_EZ00_BC_CPT_SESS'
EXPORTING
mode_z00_bc_cpt_sess = 'E'
z_mandt = sy-mandt
z_repid = i_repid
X_Z_REPID = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
Si table bloquée.
IF sy-subrc EQ 0.
EXIT.
ENDIF.
ENDDO.
ENDIF.
Lecture dans la table des sessions.
SELECT SINGLE * FROM z00_bc_cpt_sess WHERE z_repid EQ i_repid.
Contrôle si un enregistrement avec le même nom de programme existe et
si le compteur de session est différent de '99'.
IF sy-subrc EQ 0 AND z00_bc_cpt_sess-z_ct_session NE 99.
z00_bc_cpt_sess-z_ct_session = z00_bc_cpt_sess-z_ct_session + 1.
o_ct_session = z00_bc_cpt_sess-z_ct_session.
MODIFY z00_bc_cpt_sess.
Si un enregistrement avec le même nom de programme existe et
si le compteur de session est égal à '99'.
ELSEIF sy-subrc EQ 0 AND z00_bc_cpt_sess-z_ct_session EQ 99.
o_ct_session = z00_bc_cpt_sess-z_ct_session.
MODIFY z00_bc_cpt_sess.
Sinon.
ELSEIF sy-subrc NE 0.
z00_bc_cpt_sess-z_ct_session = '00'.
z00_bc_cpt_sess-z_repid = i_repid.
o_ct_session = z00_bc_cpt_sess-z_ct_session.
MODIFY z00_bc_cpt_sess.
ENDIF.
COMMIT WORK.
Déblocage de la table.
CALL FUNCTION 'DEQUEUE_EZ00_BC_CPT_SESS'
EXPORTING
mode_z00_bc_cpt_sess = 'E'
z_mandt = sy-mandt
z_repid = i_repid.
X_Z_REPID = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
ENDFORM.
Form F920_TOP_OF_PAGE *
Fonction : *
- Entête Schneider *
Entrée : *
- I_REPID Nom du programme en erreur. *
FORM f920_top_of_page USING i_repid. "#EC CALLED
En-tete de page.
CALL FUNCTION 'Z_00_BC_TOP_OF_PAGE'
EXPORTING
p_linsz = k_ligne
p_pagno = sy-pagno
p_prog = i_repid
p_projet = k_projet
p_societe = k_societe
p_sujet = sy-title.
IF sy-subrc = 0.
ENDIF.
ENDFORM.
Form F920_EDITION *
Fonction : *
- Edition des erreurs. *
Données globales : *
- ITB_ERREUR Table interne des anomalies. *
Entrée : *
- I_REPID Nom du programme en erreur. *
- I_CLEF_OBJET, Désignation de la clé de l'objet. *
FORM f920_edition USING i_repid
i_clef_objet. "#EC CALLED
En-tete de tableau.
WRITE AT (sy-linsz) sy-uline.
WRITE: sy-vline,
k_heure(8),
sy-vline,
k_code(4),
sy-vline,
k_lb_message(80),
sy-vline,
i_clef_objet.
WRITE AT sy-linsz sy-vline.
LOOP AT itb_erreur.
Edition de la table interne des anomalies.
Controle des couleurs.
IF itb_erreur-z_cd_message(1) NE 'S'.
IF itb_erreur-z_cd_message(1) EQ 'W'.
FORMAT COLOR = 7 INTENSIFIED OFF.
ELSEIF itb_erreur-z_cd_message(1) EQ 'I'.
FORMAT COLOR = 3 INTENSIFIED OFF.
ELSE.
FORMAT COLOR = 6 INTENSIFIED OFF.
ENDIF.
ELSE.
FORMAT COLOR = 5 INTENSIFIED ON.
ENDIF.
WRITE AT (sy-linsz) sy-uline.
WRITE: sy-vline,
itb_erreur-z_hr_heure_exec,
sy-vline,
itb_erreur-z_cd_message(4),
sy-vline,
itb_erreur-z_lb_message(80),
sy-vline,
*Begin change PIT DE3K936510
itb_erreur-z_ds_clef_objet(27).
itb_erreur-z_ds_clef_objet(59).
*End change PIT DE3K936510
WRITE AT sy-linsz sy-vline.
ENDLOOP.
WRITE AT (sy-linsz) sy-uline.
ENDFORM.
INCLUDE: z00_bci010. " Gestion des anomalies.
Déclaration des données *
Tables de la bases de données *
TABLES:
ekpo, " Poste document d'achat.
lfa1, " Base fournisseurs (généralités).
marc, " Données division de l'article.
z03_bw_cmp1,
eord, "Répertoire des sources appro. Achats
eina, "Fiche infos-achats - données générales
t024, "Groupes d'acheteurs
tvarv. "FAE17345+
Déclaration des données internes *
Déclaration de la table interne qui permet de recuperer les mois.
DATA: BEGIN OF itb_months OCCURS 12.
INCLUDE STRUCTURE t247.
DATA: END OF itb_months.
Table pour récupération d'infos sur les divisions
DATA: BEGIN OF itb_t001w OCCURS 0,
werks LIKE t001w-werks,
fabkl LIKE t001w-fabkl," Clé du calendrier d'entreprise
END OF itb_t001w.
Déclaration de la table interne contenant les infos sur l'adresse du
fournisseur.
DATA: BEGIN OF itb_adresse OCCURS 0,
lifnr LIKE lfa1-lifnr, " Numéro de compte fournisseur.
name1 LIKE lfa1-name1, " Nom 1.
name2 LIKE lfa1-name2, " Nom 2.
name3 LIKE lfa1-name3, " Nom 3.
name4 LIKE lfa1-name4, " Nom 4.
stras LIKE lfa1-stras, " N° de rue et nom de la rue.
pstlz LIKE lfa1-pstlz, " Code postal.
ort01 LIKE lfa1-ort01, " Localité.
pfach LIKE lfa1-pfach, " Boîte postale.
pstl2 LIKE lfa1-pstl2, " Code de la boîte postale.
land1 LIKE lfa1-land1, " Clé de pays.
landx LIKE t005t-landx, " Pays.
spras LIKE lfa1-spras, " Code langue
END OF itb_adresse.
Déclaration d'une table interne pour les informations sur les
prévisions de commande.
DATA: BEGIN OF itb_prev_cde OCCURS 0,
werks LIKE marc-werks, " Division
idnlf LIKE eina-idnlf, " ADDsde ref article frn
lifnr LIKE eord-lifnr, " N° fournisseur.
ekgrp LIKE marc-ekgrp, " Groupe d'acheteurs
dispo LIKE marc-dispo, " Code gestionnaire MRP
matnr LIKE eord-matnr, " Article.
maktx LIKE makt-maktx, " Désignation article.
bstmi LIKE marc-bstmi, " Quantité de commande.
men00 LIKE plaf-gsmng, " Quantité du mois en cours M.
men01 LIKE plaf-gsmng, " Quantité pour le mois M+1.
men02 LIKE plaf-gsmng, " Quantité pour le mois M+2.
men03 LIKE plaf-gsmng, " Quantité pour le mois M+3.
men04 LIKE plaf-gsmng, " Quantité pour le mois M+4.
men05 LIKE plaf-gsmng, " Quantité pour le mois M+5.
men06 LIKE plaf-gsmng. " Quantité pour le mois M+6.
DATA: END OF itb_prev_cde.
Structure de travail pour les commandes convernant les PFC
DATA str_pca_pfc LIKE itb_prev_cde.
*add sde
DATA str_eord_pfc LIKE itb_prev_cde.
Structure de travail pour les prévisons PFC
DATA str_prev_pfc LIKE itb_prev_cde.
Déclaration d'une table interne pour les informations sur le
portefeuille des commandes d'achat.
DATA: BEGIN OF itb_pca OCCURS 0,
werks LIKE ekpo-werks, " Division
idnlf LIKE eina-idnlf, " ADDsde ref article frn
lifnr LIKE eord-lifnr, " N° fournisseur.
ekgrp LIKE marc-ekgrp, " Groupe d'acheteurs
dispo LIKE marc-dispo, " Code gestionnaire MRP
matnr LIKE eord-matnr, " Article.
maktx LIKE makt-maktx, " Désignation article.
ebeln LIKE ekes-ebeln, " Numéro du document d'achat.
ebelp LIKE ekes-ebelp, " Numéro de poste du document d'achat.
slfdt LIKE eket-slfdt, " Date de livraison statistique
eindt LIKE ekes-eindt, " Date de livraison indiquée dans la
" confirmation de la cde.
menge LIKE ekes-menge, " Quantité indiquée dans la confirma-
" tion de la commande.
attdu LIKE eket-wemng, " Portefeuille fournisseur.
netpr LIKE ekpo-brtwr, " Prix net du document d'achat dans
" la devise du document.
rtard TYPE i, " Retard en jours ouvres.
wemng LIKE eket-wemng, " Quantité de l'entrée de marchandise.
bldat LIKE mkpf-bldat, " Date inscrite sur la pièce/sur le
" document.
qtran LIKE ekes-menge, " Quantité en transit.
dtran LIKE ekes-eindt. " Date du dernier avis de transit.
DATA: END OF itb_pca.
DATA: w_i TYPE i, "Compteur
w_i_char(1) TYPE c, "Texte pour récupérer compteur
w_nm_zone(20) TYPE c, "Nom zone pour assign au field-symbols
w_nb_j TYPE i, "Nb de jours ouvrés jusqu'à fin mois
w_nb_j_tot TYPE i. "Nb de jours ouvrés du mois
FIELD-SYMBOLS: TYPE ANY.
Déclaration d'une table contenant les fiches info achat.
DATA: BEGIN OF itb_eina OCCURS 0,
matnr LIKE eina-matnr,
lifnr LIKE eina-lifnr,
idfnl LIKE eina-idnlf.
DATA: END OF itb_eina.
Déclaration d'une table contenant les infos groupe acheteur.
*DATA: BEGIN OF itb_t024 OCCURS 0,
ekgrp LIKE t024-ekgrp,
eknam LIKE t024-eknam,
ektel LIKE t024-ektel,
telfx LIKE t024-telfx.
*DATA: END OF itb_t024.
Déclaration d'une table pour le transfert du fichier.
DATA: BEGIN OF itb_transfert OCCURS 0,
col00(8), "division
col00bis(20), "Reference article
col01(18), "No article
col02(45), "libelle article
col021(17), "Groupe acheteur
col022(13), "gestionnaire
col03(17), "qte commandée ou No de commande
col04(13), "Mois 1 ou No poste cde
col05(20), "Mois 2 ou délai initial
col06(33), "Mois 3 ou délai négocié
col07(13), "Mois 4 ou qté cdée
col08(13), "Mois 5 ou qté attendue
col09(13), "Mois 6 ou Montant attendu
col10(13), "Mois 7 ou retard
col11(13), "qte partielle livree
col12(13), "date livraison partielle
col13(13), "qté en transit
col14(13). "date
DATA: END OF itb_transfert.
Déclaration d'une table contenant la liste des fournisseurs.
DATA: BEGIN OF itb_lifnr OCCURS 0,
werks LIKE marc-werks,
idfnl LIKE eina-idnlf,
lifnr LIKE eord-lifnr,
ekgrp LIKE marc-ekgrp,
spras LIKE lfa1-spras,
eknam LIKE t024-eknam,
ektel LIKE t024-ektel,
telfx LIKE t024-telfx.
DATA: END OF itb_lifnr.
Déclaration d'une structure pour la selection dans la table MSEG.
DATA : BEGIN OF itb_mseg OCCURS 0,
mblnr LIKE mseg-mblnr,
mjahr LIKE mseg-mjahr,
ebeln LIKE mseg-ebeln,
ebelp LIKE mseg-ebelp,
END OF itb_mseg.
déclaration d'une structure pour la selection dans EKPO.
DATA : BEGIN OF itb_ekpo OCCURS 0,
ebeln LIKE ekpo-ebeln,
lifnr LIKE ekko-lifnr,
ekgrp LIKE ekko-ekgrp,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
werks LIKE ekpo-werks,
menge LIKE ekpo-menge,
bpumz LIKE ekpo-bpumz,
netpr LIKE ekpo-netpr,
peinh LIKE ekpo-peinh, "Base de prix FAE17345+
"AFT++
bpumn LIKE ekpo-bpumn,
dispo LIKE marc-dispo, "AFT++
END OF itb_ekpo.
déclaration d'une structure pour la selection dans EKPO.
DATA : BEGIN OF itb_ekko OCCURS 0,
ebeln LIKE ekko-ebeln,
lifnr LIKE ekko-lifnr,
spras LIKE ekko-spras,
END OF itb_ekko.
déclaration d'une structure pour la selection dans EKES.
DATA : BEGIN OF itb_ekes OCCURS 0,
ebeln LIKE eket-ebeln,
ebelp LIKE eket-ebelp,
etens LIKE ekes-etens,
ebtyp LIKE ekes-ebtyp,
eindt LIKE ekes-eindt,
menge LIKE ekes-menge,
dabmg LIKE ekes-dabmg,
END OFhai ,
use code inspector to find the performance issue sorce code and also it gives some tips to tune the peformance.
Go to program in display mode or editable mode and in menu bar you
have program menu in first......chose it and go to cheak....select it we have list including code inspector do it and tune it............
plzz reward if useful
regards,
jai.m -
Oracle 8i us7ascii character set problem - help required urgent.
Hi frnds,
I have a oracle 8i database server installed on sun solaris os. The database character set is us7ascii. In one of the tables TIFF images are stored in a long column. I m trying to fetch these images using oracle 9i client and visual basic(oracle ODBC drivers). But i m unable to do so. I can not fetch special characters.
Is it because of the character set problem? but when i run my code on the server itself, i m able to fetch the images. I tried to fetch the images using oracle 8 i client on windows XP machine but could not do so. Are there any special settings that i have to do on the client side?Indeed, it's an ODBC issue. Read this statement from Oracle:
From ODBC 8.1.7.2.0 drivers onwards it's NOT possible any more to
"disable" Characterset conversion by specifying for the NLS_LANG
the same characterset as the database characterset. There is now
ALWAYS a check to see if a codepoint is valid for that characterset.
Typically you will encounter problems if you upgrade an environment
that has NO NLS_LANG set on the client (or US7ASCII) and the database
was also US7ASCII. This incorrect setup allowed you to store characters
like èçàé in an US7ASCII database, with the new 8i drivers this is not possible
any more.
Basic problem is the 'wrong' characterset US7ASCII in the database. As long as no characterset conversion happens (that's the case on the unix server), special characters are no problem.
Werner -
How urgent:how can we know the size of a record from result set
hi proffesionals i attend on problum with arrangment,for that what i am doing is i am fetching datas from database and printing in a row vertically.it is not looking good.i want to print it horizontaly like
ae00023 as3333 a6556 a457864 a6576
ae00025 as3336 a6556 a457866 a6578
i wrote the coding like
<%while(resultsetdisplay.next())
{%>
// try to print the datas in horizontal way
<tr>
for (int i=index;i<resultsetdisplay.getFetchSize()-10;i--)
<td class=display><%=resultsetdisplay.getObject(4)%></td>
int i=index;
</tr>
<%}%>
is it prints horizontaly.
help me soonHi
You can the Meta Data for the result set and then get the getColumnCount() from the MataData to get the number of columns in the resultset.
Bye
Maybe you are looking for
-
Extremely Slow Startup, Blue Screen, and Poor Performance
Hello, A couple of weeks ago my MBP 15" (late 2009 model) started performing really poorly. The colour wheel would spin for about 2 minutes if a launched any applications and everything was really slow. It also took about 10 minutes on the grey apple
-
Firefox keeps coming up with a site as my homepage no matter what I do
I have been using Firefox for years, but I am at a point where I am going to go to IE. Whenever I bring up Firefox, it is a crap shoot as to whether I am going to get the Firefox start page or a site that I installed on the web. I have reset the home
-
Exporting to Excel not functioning properly
Dear SAP gurus, We have an issue with regards to the Excel export from the Issue Management transaction (SOLMAN_ISSUE_MGMT). We are able to click on Export and select the Exel export. But when the Excel-file opens in Excel we see XML code instead of
-
Account Details page transaction link do not display anything
Hi, I extended the TransactionTableVO to include new columns. Initially, whenever I click on the transaction link, I get an exception error. But I fixed it by commenting out functions that seem to overrride the original one (like setIrSalesOrder, set
-
Bob, I can't find my previous thread, I don't even remember its name. So I am opening a new one, hope I'm not close to spamming by doing this. I had some problems with the objects on the master page, they didn't come out when exporting to PDF. Well,