TIFF-VIs for reading/writing from/to files
To whom it may concern,
I'm looking for TIFF-VIs for reading/writing from/to files
for Labview 6 without any add-on package.
Unfortunately I can't use TiffRd04 and TiffSv05 from
Koji Ohashi due to the different file format!
Any hints?
Thank you in advance. Best regards from Germany
Udo Weik
Hi Udo,
did you check these TIFF related libraries? .. maybe one of them is working.
Good Luck
Similar Messages
-
Dynamic Internal Table for reading data from external file
Hello All,
The task was to create a internal table with dynamic columns,
Actually this is my first task in the WebAS 6.20, my program is based on input file provided by user with certain effort. this file can have different effort for a one yr to five year frame..
I needed to read the raw data from file, based on months create a internal table to hold the data, after this i need to validate the data...
I have browsed thru dynamic internal table topic, but couldn't find any dynamic appending structure, the dynamic structure would contains 12 month fileds.
can any one help me in getting my task completed..
Thanks
KumarHi,
I see that you posted the same question a couple of days ago at Dynamic Internal Table for reading data from external file Didn't Charles's response address your problem?
Regards -
Permissions to external Jar for reading-writing on a file
hi all,
I explain my situation.
I ' ve made an open source project similar to plpdf using jasper report libraries and others.
My project, which works perfectly in a java jre, have some problems in Oracle Aurora jvm.
I use the Reflection technique to load the classes from their libraries.
For this i use this class :
{color:#993300}<strong>import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
* @author g.veltro
public class Utility {
public final static ClassLoader sysloader = ClassLoader.getSystemClassLoader();
public static Object createIstance (Class classe,Object [] parameters,Class [] parametersClasses) throws InstantiationException, IllegalAccessException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException{
Constructor cons = classe.getConstructor(parametersClasses);
return cons.newInstance(parameters);
public static Object executeMethod(Object obj,Class objClass,String methodName,Object [] parameters,Class [] parametersClasses) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException {
Method method = objClass.getDeclaredMethod(methodName,parametersClasses);
method.setAccessible(true);
return method.invoke(obj, parameters);
public static void addJarLibrary(String s) throws MalformedURLException, IOException{ <br /><br />addJarLibrary(new File(s)); <br /><br />}
public static void addJarLibrary(File f) throws MalformedURLException, IOException{ <br /><br />addJarLibrary(f.toURI().toURL()); <br /><br />}
public static void addJarLibrary(URL url) throws IOException{
URLClassLoader urlsysloader = null;
urlsysloader = (URLClassLoader) sysloader;
try { <br /><br />executeMethod(urlsysloader,URLClassLoader.class,"addURL",new Object[]url,new Class[]{URL.class});
} catch (Throwable t) { <br /><br />t.printStackTrace(); <br /><br />throw new IOException("Error, could not add "+url.getPath()+" to system classloader");<br /><br />}
public static void addJarLibraries(String libDir) throws IOException {
File directory = null;
directory = new File(libDir);
if(directory.isDirectory()){
JarFilter filter = new JarFilter();
File[] jarLibraries = directory.listFiles(filter);
for(int i=0;i<jarLibraries.length;i++){ <br /><br />addJarLibrary(jarLibraries</strong>{color}<em>{color:#993300}<strong>);
} else { <br /><br />throw new IOException(libDir+" is not a Directory !"); <br /><br />}
</strong>{color}
I gave all the permissions as dba to allow java to access files, etc. etc
{color:#993300}<strong>Begin
dbms_java.grant_permission( 'NEOGEO', 'SYS:java.lang.RuntimePermission', 'accessDeclaredMembers', '' );
dbms_java.grant_permission( 'NEOGEO', 'SYS:java.lang.reflect.ReflectPermission', 'suppressAccessChecks', '' );
end;
</strong>{color}
Then when I try to call a class library that attempts to access a file residing in the file-system i recive an exception.
This is an example of code that call a class and execute one methods.
{color:#993300}<strong>public static Object compileJrxml(String path_file_jrxml) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException {
Object jReport = null;
Object jCompileManager = null;
Class jcmClass = null;
Object [] params = {path_file_jrxml};
Class [] paramsClasses = {String.class};
jcmClass = Class.forName("net.sf.jasperreports.engine.JasperCompileManager",true,org.Reflection.Utility.sysloader);
jCompileManager = jcmClass.newInstance();
// compilazione del report
jReport = Utility.executeMethod(jCompileManager,jcmClass,"compileReport",params,paramsClasses);
return jReport;
</strong>{color}
this is the exception :
{color:#993300}<strong>java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
at java.lang.reflect.Method.invoke(Method.java)
at org.Reflection.Utility.executeMethod(Utility.java)
at org.EngineReport.ReportControl.compileJrxml(ReportControl.java:44)
at org.EngineReport.ReportOracle.getReportByte(ReportOracle.java:130)
at org.EngineReport.ReportOracle.ReportAsBlob(ReportOracle.java:69)
at org.EngineReport.ReportOracle.ReportAsBlob(ReportOracle.java:49)
Caused by: java.security.AccessControlException: the Permission (java.io.FilePermission /home/neogeo/Java_Resources.jrxml read) has not been granted to ProtectionDomain (file:/home/neogeo/lib/jasperreports-3.0.0.jar <no signer certificates>)
AppClassLoader: file:/home/neogeo/lib/xml-apis.jar file:/home/neogeo/lib/jpa.jar file:/home/neogeo/lib/jdt-compiler-3.1.1.jar file:/home/neogeo/lib/png-encoder-1.5.jar file:/home/neogeo/lib/ant-1.5.1.jar file:/home/neogeo/lib/jaxen-1.1.1.jar file:/home/neogeo/lib/mondrian-2.3.2.8944.jar file:/home/neogeo/lib/commons-javaflow-20060411.jar file:/home/neogeo/lib/batik-bridge.jar file:/home/neogeo/lib/antlr-2.7.5.jar file:/home/neogeo/lib/batik-parser.jar file:/home/neogeo/lib/hibernate3.jar file:/home/neogeo/lib/batik-ext.jar file:/home/neogeo/lib/commons-logging-1.0.2.jar file:/home/neogeo/lib/jasperreports-3.0.0.jar file:/home/neogeo/lib/batik-svggen.jar file:/home/neogeo/lib/batik-xml.jar file:/home/neogeo/lib/xml-apis-ext.jar file:/home/neogeo/lib/batik-dom.jar file:/home/neogeo/lib/jakarta-bcel-20050813.jar file:/home/neogeo/lib/servlet.jar file:/home/neogeo/lib/hsqldb-1.7.1.jar file:/home/neogeo/lib/batik-gvt.jar file:/home/neogeo/lib/batik-svg-dom.jar file:/home/neogeo/lib/jxl-2.6.jar file:/home/neogeo/lib/groovy-all-1.5.5.jar file:/home/neogeo/lib/xercesImpl.jar file:/home/neogeo/lib/batik-awt-util.jar file:/home/neogeo/lib/bsh-2.0b4.jar file:/home/neogeo/lib/commons-digester-1.7.jar file:/home/neogeo/lib/batik-css.jar file:/home/neogeo/lib/commons-logging-api-1.0.2.jar file:/home/neogeo/lib/jfreechart-1.0.0.jar file:/home/neogeo/lib/itext-1.3.1.jar file:/home/neogeo/lib/poi-3.0.1-FINAL-20070705.jar file:/home/neogeo/lib/batik-util.jar file:/home/neogeo/lib/commons-beanutils-1.7.jar file:/home/neogeo/lib/jcommon-1.0.0.jar file:/home/neogeo/lib/saaj-api-1.3.jar file:/home/neogeo/lib/batik-script.jar file:/home/neogeo/lib/xalan.jar file:/home/neogeo/lib/batik-anim.jar file:/home/neogeo/lib/commons-collections-2.1.jar
<no principals>
java.security.Permissions@1aebb385 (
(java.io.FilePermission /home/neogeo/lib/jasperreports-3.0.0.jar read)
(java.util.PropertyPermission user.language write)
(java.util.PropertyPermission * read)
(java.lang.RuntimePermission modifyThreadGroup)
(java.lang.RuntimePermission createSecurityManager)
(java.lang.RuntimePermission modifyThread)
(java.lang.RuntimePermission preferences)
(java.lang.RuntimePermission exitVM)
(oracle.aurora.security.JServerPermission LoadClassInPackage.*)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java)
at java.security.AccessController.checkPermission(AccessController.java)
at java.lang.SecurityManager.checkPermission(SecurityManager.java)
at oracle.aurora.rdbms.SecurityManagerImpl.checkPermission(SecurityManagerImpl.java)
at java.lang.SecurityManager.checkRead(SecurityManager.java)
at java.io.FileInputStream.<init>(FileInputStream.java)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
... 9 more
</strong>{color}
The problem i think is that i have to give the permission for input and output on files to an external jar-library .
I don't know how i can resolve this problem ....
Do you have any suggestions? </em>Hi,
the problem with grant_permission is, that this can be done for a schema or a role - not for a ProtectionDomain as you need.
Some on this forum claim that it is possible to control the SecurityManager by the java.policy file in OH/javavm/lib/security. You should try to put something like this in this file (create it if it doesn’t exist)
grant codeBase "file:/<your codebase>" {
permission java.security.<your privilege>;
Unfortunately this doesn't worked for me in 11.1.0.6.0.
What you could try if you don't find other solution is to extend or write your own (not recommended) SecurityManager.
see http://download.oracle.com/docs/cd/B28359_01/java.111/b31225/chten.htm#BABJBJGE
To simple see if your application runs without security you can try the NullSecurityManager.
see http://java.sun.com/developer/onlineTraining/Security/Fundamentals/magercises/SecurityManager/help.html
compile and load the class in your schema and activate it with
System.setSecurityManager(new NullSecurityManager());
This is for sure not a solution for a productive system.
HTH
Jaromir D.B. Nemec -
Java API for reading/writing word/excell file
Hello Friends,
Is there any Java API available for Microsoft word and excell product?Hi,
Start your search here
http://jakarta.apache.org/poi -
Reading data from flat file Using TEXT_IO
Dear Gurus
I already posted this question but this time i need some other changes .....Sorry for that ..
I am using 10G forms and using TEXT_IO for reading data from flat file ..
My data is like this :-
0|BP-V1|20100928|01|1|2430962.89|27|2430962.89|MUR|20100928120106
9|2430962.89|000111111111|
1|61304.88|000014104113|
1|41961.73|000022096086|
1|38475.65|000023640081|
1|49749.34|000032133154|
1|35572.46|000033093377|
1|246671.01|000042148111|
Here each column is separated by | . I want to read all the columns and want to do some validation .
How can i do ?
Initially my requirement was to read only 2 or 3 columns so i did like this ...
Procedure Pay_Simulator(lfile_type varchar2,lac_no varchar2,lcur varchar2,lno_item number,ltotal number,ldate date,lpay_purp varchar2,lfile_name varchar2)
IS
v_handle utl_file.file_type;
v_filebuffer varchar2(500);
line_0_date VARCHAR2 (10);
line_0_Purp VARCHAR2 (10);
line_0_count Number;
line_0_sum number(12,2);
line_0_ccy Varchar2(3);
line_9_sum Number(12,2);
line_9_Acc_no Varchar2(12);
Line_1_Sum Number(12,2);
Line_1_tot Number(15,2) := 0;
Line_1_flag Number := 0;
lval number;
lacno varchar2(16);
v_file varchar2(20);
v_path varchar2(50);
Begin
v_file := mcb_simulator_pkg.GET_FILENAME(lfile_name); -- For the file name
v_path :=rtrim(regexp_substr( lfile_name , '.*\\' ),'\'); For the Path
v_path := SUBSTR (lfile_name,0, INSTR (lfile_name, '\', -1));
v_handle := UTL_FILE.fopen (v_path, v_file, 'r');
LOOP
UTL_FILE.get_line (v_handle, v_filebuffer);
IF SUBSTR (v_filebuffer, 0, 1) = '0' THEN
SELECT line_0 INTO line_0_date
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 3;
SELECT line_0 INTO line_0_Purp
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 4;
SELECT line_0 INTO line_0_count
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 7;
SELECT line_0 INTO line_0_sum
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 8;
SELECT line_0 INTO line_0_ccy
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_0, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 9;
ELSIF SUBSTR (v_filebuffer, 0, 1) = '9' THEN
SELECT line_9 INTO line_9_Acc_no
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_9, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 3;
SELECT line_9 INTO line_9_sum
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_9, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 2;
ELSIF SUBSTR (v_filebuffer, 0, 1) = '1' THEN
line_1_flag := line_1_flag+1;
SELECT line_1 INTO line_1_sum
FROM (SELECT LTRIM (REGEXP_SUBSTR (v_filebuffer, '[^|]+{1}', 1, LEVEL)) line_1, ROWNUM rn
FROM DUAL
CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (v_filebuffer, '[^|]*')) + 1)
WHERE rn = 3;
Line_1_tot := Line_1_tot + line_1_sum;
END IF;
END LOOP;
DBMS_OUTPUT.put_line (Line_1_tot);
DBMS_OUTPUT.PUT_LINE (Line_1_flag);
UTL_FILE.fclose (v_handle);
END;
But now how can i do ? Shall i use like this select Statement for all the columns ?Sorry for that ..
As per our requirement ...
I need to read the flat file and it looks like like this .
*0|BP-V1|20100928|01|1|2430962.89|9|2430962.89|MUR|20100928120106*
*9|2430962.89|000111111111|*
*1|61304.88|000014104113|*
*1|41961.73|000022096086|*
*1|38475.65|000023640081|*
*1|49749.34|000032133154|*
*1|35572.46|000033093377|*
*1|246671.01|000042148111|*
*1|120737.25|000053101979|*
*1|151898.79|000082139768|*
*1|84182.34|000082485593|*
I have to check the file :-
Validation are 1st line should start from 0 else it should raise an error and insert that error into one table .
The for 2nd line also same thing ..it should start from 9 else it should raise an error and insert that error into one table .
Then the 3rd line should start from 1 else it should raise an error and insert that error into one table .
After that i have to do a validation like i will read the 1st line 2nd column .. It should be like this BP-V1 else raise an error and insert that error to a table . Then i will check the 3rd column which is 20100928 , it should be YYYYMMDD format else same thing ERROR.
Then like this for all columns i have different validation .......
Then it will check for the 2nd line 3rd column . this is an account no .1st i will check it should be 12 char else ERROR .Then I will check that what user has imputed in the form.Like for example User putted 111111111 then i will check with this 000111111111 which is there in the 2nd line . I have to add 000 before that Account no which user imputed .
Then the lines which is starting from 1 , i have to take all the 2nd column for all the lines which is starting from 1 and i have to do a sum . After that i have to compare that sum with the value in the 1st lines ( Starting from 0) 6th column . It should be same else ERROR ...
Then same way i have to count all the lines which is starting from 1 . Then i have to compare with the 7th column of 1st line . It should be same . Here in this file it should be 9.
MY CODE IS :-
Procedure Pay_Simulator(lfile_type varchar2,lac_no varchar2,lcur varchar2,lno_item number,ltotal number,ldate date,lpay_purp varchar2,lfile_name varchar2)
IS
v_handle TEXT_IO.file_type;
v_filebuffer varchar2(500);
line_0_date VARCHAR2 (10);
line_0_Purp VARCHAR2 (10);
line_0_count Number;
line_0_sum number(12,2);
line_0_ccy Varchar2(3);
line_9_sum Number(12,2);
line_9_Acc_no Varchar2(12);
Line_1_Sum Number(12,2);
Line_1_tot Number(15,2) := 0;
Line_1_flag Number := 0;
lval number;
lacno varchar2(16);
v_file varchar2(20);
v_path varchar2(50);
LC$String VARCHAR2(50) ;--:= 'one|two|three|four|five|six|seven' ;
LC$Token VARCHAR2(100) ;
i PLS_INTEGER := 2 ;
lfirst_char number;
lvalue Varchar2(100) ;
Begin
v_file := mcb_simulator_pkg.GET_FILENAME(lfile_name); For the file name
v_path :=rtrim(regexp_substr( lfile_name , '.*\\' ),'\'); For the Path
--v_path := SUBSTR (lfile_name,0, INSTR (lfile_name, '\', -1));
Message(lfile_name);
v_handle := TEXT_IO.fopen(lfile_name, 'r');
BEGIN
LOOP
TEXT_IO.get_line (v_handle, v_filebuffer);
lfirst_char := Substr(v_filebuffer,0,1);
--Message('First Char '||lfirst_char);
IF lfirst_char = '0' Then
Loop
LC$Token := mcb_simulator_pkg.Split( v_filebuffer, i , '|') ;
Message('VAL - '||LC$Token);
lvalue := LC$Token;
EXIT WHEN LC$Token IS NULL ;
i := i + 1 ;
End Loop;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (9999,'0002','First line should always start with 0');
Forms_DDL('Commit');
raise form_Trigger_failure;
End if ;
TEXT_IO.get_line (v_handle, v_filebuffer);
lfirst_char := Substr(v_filebuffer,0,1);
LC$Token := mcb_simulator_pkg.Split( v_filebuffer, i , '|') ;
--Message('Row '||LC$Token);
IF lfirst_char = '9' Then
Null;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (8888,'0016','Second line should start with 9');
Forms_DDL('Commit');
raise form_Trigger_failure;
End IF;
LOOP
TEXT_IO.get_line (v_handle, v_filebuffer);
lfirst_char := Substr(v_filebuffer,0,1);
LC$Token := mcb_simulator_pkg.Split( v_filebuffer, i , '|') ;
--Message('Row '||LC$Token);
IF lfirst_char = '1' Then
Null;
Else
Insert into MU_SIMULATOR_output_ERR (load_no,ERR_CODE,ERR_DESC) values (7777,'0022','The third line onward should start with 1');
Forms_DDL('Commit');
raise form_Trigger_failure;
End if;
END LOOP;
--END IF;
END LOOP;
EXCEPTION
When No_Data_Found Then
TEXT_IO.fclose (v_handle);
END;
Exception
When Others Then
Message('Other error');
END;
I am calling the FUNCTION which you gave SPLIT as mcb_simulator_pkg.Split. -
READING AND WRITING FROM A FILE(WRITTEN IN ANOTHER LANGUAGE)
# Comment
INTEGER Declares integer type variable
STRING Declares string type variable
LET Assigns a variable
CALCULATE Performs an arithmetic calculation
PRINT Writes data to the console
PRINTLN As print, but followed by a new line
END Terminates the program
Each line of the program must begin with one of these words, and the language should not be case sensitive.
Tim Brailsford, 2007
G64ICP
COMMENT
Any line beginning with the # character is completely ignored.
Example:
# ignore this line!
INTEGER
The INTEGER reserved word declares an Integer variable, and assigns a default value of 0 to it.
Example:
INTEGER myInt
This example is equivalent to the Java statment "int myInt=0;"
STRING
The STRING reserved word declares a String variable, and assigns an empty string to it.
Example:
STRING myString
This is equivalent to the Java statement "String myString;"
LET
This assigns values to variables (either integers, or strings enclosed
in double quotes).
Examples:
LET myInt=42
LET myString="Hello World!"
CALCULATE
This performs numeric calculations upon values or variables, and assigns the result to a variable (which must have
been declared earlier). Four operators are supported: + *
and / (for addition, subtraction multiplication and
integer division respectively).
Examples:
CALCULATE myInt=2*2
CALCULATE myInt=myInt+24
CALCULATE myInt=intA/intB
PRINT and PRINTLN
These words both print to the console the
only difference being that PRINTLN appends a new line (as does
System.out.println in Java). These can print either text provided as an argument, or variables (string or integer).
Examples:
PRINTLN "Hello World!"
PRINT myString
PRINTLN myInt
END
This terminates the program, and prints a message to that effect.
TPL Example
To the left is an example TPL input file , to
calculate the factorial of 5. This should produce
an output similar to that shown overleaf (except
that calculates the factorial of 10).
# A TPL Program to calculate the factorial of 5
INTEGER myInt
INTEGER factorial
STRING myString
LET mystring="Factorial Program"
LET myInt=5
CALCULATE factorial=myInt*4
CALCULATE factorial=factorial*3
CALCULATE factorial=factorial*2
Tim Brailsford, 2007
G64ICP
PRINTLN mystring
PRINTLN
PRINT "The factorial of "
PRINT myInt
PRINT " is "
PRINTLN factorial
END
Documentation
Document your code by writing instructions explaining how to run it, listing all of the files you have submitted,
and specifying any limitations (eg you might want to say what platforms you would expect it to run on, and what
platforms you have tested it on). This document should be written as a plain text file (ie ASCII � MS Word binary
files are not acceptable) � and this file should be called README.TXT. This file should constitute the user
manual of your program, and should explain exactly how to use your program.
The README file should be the user manual for your language as implemented.
NB:
I want it to read values from the file as given above and execute the answer in the command prompt( as intented in the file above)
Thanks
Alam IkennaHai I have one doubt in doing other peoples homework for them. Why bother?
-
Reading & writing from MS Excel files in Webdynpro ABAP
Dear experts,
We have a requirement to read and write from an MS excel file in a Webdynpro ABAP based application. The application would be deployed on WAS (Web Application Server) which is running as part of SAP ECC on UNIX platform.
What is not clear is
1) If we store the MS Excel template on the server which has UNIX, will the file be recognised for reading/writing programmatically in Webdynpro ABAP? If this works, we have a requirement where the end users will download the excel template and upload the same after filling data into the excel file. The data filled into the excel has to be read and updated in the SAP backend (ECC).
2) There is an article on "Modifying Excel using WD ABAP" at the following link
https://wiki.sdn.sap.com/wiki/display/WDABAP/ModifyingexistingexcelsheetusingWDABAP
But again it is not clear whether this approach will work on Unix based SAP server (ECC WAS).
Thanks
SureshI don't know if there is an application in Unix that can read Excel files - if that is what you are asking. However that has nothing to do with this forum. If you are uploading the file to ABAP using Web Dynpro ABAP, then it doesn't matter what Operating System the server is running on. Unix, Linux, Windows - all the processing is done in ABAP and is OS independent. The actual reading of the file in ABAP involves reading either an XML or Text Tab Delimited version of the Excel file however - if you read through the links on manipulating Excel in ABAP.
-
Reading data From XML file and setting into ViewObject to Pouplate ADF UI
Hi,
I have following requirement.
I would like to read data from XML file and populate the data in ViewObject so that the data can be displayed in the ADF UI.
Also when user modifies the data in the ADF UI, it should be modified back into to ViewObject.
Here is an example - XML file contains Book Title and Author. I would like to read Book Title and Author from XML file and set it into ViewObject Attribute and then display Book title and Author in ADF UI page. Also when user modifies Book title and Author, I would like to store it back in View Object.
Please help me with this requirement and let me know if any solution exist in ADF, for populating the ADF UI screen fields with external XML file data.
ThanksRead chapter 42 http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm of the fusion developer guide
Section 42.7, "Reading and Writing XML"
Section 42.8, "Using Programmatic View Objects for Alternative Data Sources"
Timo -
Procedure for read/write an XML-File using UCCX9
Hi Team!
Is there someone who can explain me the procedure of reading/writing an XML-File using Cisco UCCX Rel. 9.0?
In the last couple of days I did a lot of research on the partner community as well as reading the CRS-Editor-PDFs.
But I can’t find a solution.
There are some templates available but they all didn’t seem to work.
I have two xml-files, both uploaded to “Document Management\en_us\”.
The script itself is attached to this posting.
I build that my script according to a sample script I found in the community.
From my point of view I have configured my script exactly like the sample script.
But it still doesn’t work.
I am especially interested in where to store the the appropriate files.
I would be very happy if there is someone who can explain me, what’s wrong there.
Many thanks in advance.
Kind regards
MichaelI'm experiencing the same issue [reading XML causes errors that say things from "no such file" to some odd Java exception.] I'm able to use a template XML file and after authenticating a user, transform the template into a proper XML file and then successfully save it to the en_US Doc Repository with updated values.
However, no matter what I've tried or who I've asked, the READ on the XML file so that I can actually script something that does some routing based on the value of the XML file created in my first script? Ultra fail.
I've even worked with three separate TAC IPCC engineers who were able to reproduce the issue in their test environment, but they were unable to assist. Eventually, whe pressed, I received this response from the last IPCC engineer.:
"Hello Brad,
Yes I know what I provided you with is what you already have achieved and this missing step is precisely what you need: how to setup the script to check the status and value of this XML document and then decide routing according to the state. But unfortunately this is what I found internally. The other resources are the ones you already know: support forums, scripting guides. The other resource with suggest to customer looking for script assistance is the Cisco Account Manager of your company, they know where to get the resources for such issues. Then again as I mentioned before on our phone conversation TAC does not support scripting but certainly if I find something else on my side I will let you know for sure."
I would do ponderous cartwheels of joy if someone who has this working in version 9.x [9.0.2 specifically] could share the deep magic. -
Reading & Writing from/to OCR
Hi,
Is there a way to read and write the Oracle Cluster Registry.
Are there any API's available for the same.
Thankswhatis wrote:
I have a SW application running on all nodes in the RAC Cluster.
The SW needs to write data to a place which is visible to all and can be read by all the other nodes. Also it should be able to gather information (especially about failover), so should be able to read from it.The OCR is not used to as a common data store for CRS applications - that is typically what a cluster file system is used for. This allows the same set of directories and files to be visible to applications on each and every cluster node.
The OCR is specific to CRS and should only be used by CRS software.
I found this link on the internet 'C Application Programming Interface to Oracle Clusterware'
http://download.oracle.com/docs/cd/B28359_01/rac.111/b28255/crsref.htm#CHECGHGI
Yes, if you want to create a cluster application that you want to be managed via CRS. But this requires more thought than simply slapping a few calls together in an application to make it cluster enabled.
Is this the correct way to do it? Can reading/writing from/to OCR lead to fatal errors?Unsure whether it is the correct way for the problem you're trying to solve as that problem is pretty still much unknown to us as you have not described it.
Can one corrupt the OCR? Not if the API calls are used and used correctly.
It is a bit strange to see a posting about using the CRS API itself - usually we write our software in the RAC layer (as PL/SQL and Java stored procedures, using the cluster features of the database instances).
Do you intend to only use CRS? Or CRS with ASM and RAC? And why do you want external C application code to make use of cluster services? -
How to read data from a file in OSB
hi guys,
Recently, I've got a problem with reading file from specific location. I've actually followed this post OSB 11g - Read or Poll File in OSB - Oracle Fusion Middleware Blog, and then
I know how to read a file. However, it does not as expected. Because, I've found no way to read data from the file. Therefore, no chance to manipulate the data like assigning to a variable, or extracting ....
Hence, is there any way to read data from file by using proxy service in OSB ??? No Java code ???
by the way, supposed that there is no way to read data from a file in OSB. So, What purposes will the way in the post above be used for?
Many thanks in advancehttp://jakarta.apache.org/poi/hssf/index.html
HSSF stands for Horrible Spreadsheet Format, but it still works! -
How to read data from a file that was formatted by excel?
Hi everyone, I'm familiar with java.io and the ability to read from files, can anyone tell me how to read data from a file that was formatted by excel? Or at least give me some web references so that I can learn about it?
http://jakarta.apache.org/poi/hssf/index.html
HSSF stands for Horrible Spreadsheet Format, but it still works! -
Read data from Excel file and diaplay in Webdynpro
Hi all,
I need some help. I have a Excel file with set of name, phonenumbers . I want to know how to display the data using Webdynpro. Could some one help me. help is appreciated and I promise to award points for right answer.
Thank you
Maruti<b>Hi
i can explain you to read data from Excel file
First You have to download the jxl.jar file. You can get this file from the Below site
</b><a href="http://www.andykhan.com/jexcelapi/download.html">jexcelapi jar</a>
It will be in Compressed Fromat So Unzip it to get the Contents
After Unzipping The File You will get a Folder (jexcelapi/jxl.jar)
Now in NWDS open web dynpro explorer, Right Click Your Project, a popup menu will appear and in that click Properties
You will get window displaying your Project Properties
On Left Side of the window You Will Find "Java Build Path"
Click That "Java Build Path" and you will get 4 Tabs Showing ( Source,Projects,Libraries,Order and Export)
Click Libraries Tab
You will find options many options buttons
In that click the Button "Add External Jars"
You will get Window in order to fecth the jxl.jar file from the location you had stored
After selecting the jxl.jar i will get displayed and click ok
Now Open Navigator
Open Your Project
You will find Lib folder
Copy the jxl.jar to that lib folder
Note : You cannot Read the Content from the excel file directly
First You Have to copy that file to the Server,
And from the Server you can get the file absolute path
With the absolute path you can read the contents of the Excel file
You have to save the Excel file as .xls Format and Not as xlsx format i will not accept that...
You have Upload the Excel file from the Server Using the File Upload UI Element
This Coding will extract 3 columns from the Xls File
Coding
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import com.sap.fileupload.wdp.IPrivateFileUpload_View;
import com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource;
public void onActionUpload_File(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionUpload_File(ServerEvent)
IPrivateFileUpload_View.IContextElement element1 = wdContext.currentContextElement();
IWDResource resource = element1.getFileResource();
element1.setFileName(resource.getResourceName());
element1.setFileExtension(resource.getResourceType().getFileExtension());
//@@end
public void onActionUpload_File_in_Server(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionUpload_File_in_Server(ServerEvent)
InputStream text=null;
int temp=0;
try
File file = new File(wdContext.currentContextElement().getFileResource().getResourceName().toString());
FileOutputStream op = new FileOutputStream(file);
if(wdContext.currentContextElement().getFileResource()!=null)
text=wdContext.currentContextElement().getFileResource().read(false);
while((temp=text.read())!=-1)
op.write(temp);
op.flush();
op.close();
path = file.getAbsolutePath();
wdComponentAPI.getMessageManager().reportSuccess(path);
catch(Exception e)
e.printStackTrace();
//@@end
public void onActionUpload_Data_into_Table(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionUpload_Data_into_Table(ServerEvent)
try
Workbook wb =Workbook.getWorkbook(new File(path));
Sheet sh = wb.getSheet(0);
//wdComponentAPI.getMessageManager().reportSuccess("Columns = "+sh.getColumns());
//wdComponentAPI.getMessageManager().reportSuccess("Rows = "+sh.getRows());
int columns = sh.getColumns();
int rows = sh.getRows();
int i=0;
for(int j=1;j<=rows;j++)
ele=wdContext.nodeTable_Data().createTable_DataElement();
Cell c1 = sh.getCell(i,j);
ele.setTab_Name(c1.getContents());
Cell c2 = sh.getCell(i+1,j);
ele.setTab_Degree(c2.getContents());
Cell c3 = sh.getCell(i+2,j);
ele.setTab_Percentage(c3.getContents());
wdContext.nodeTable_Data().addElement(ele);
catch(Exception ex)
wdComponentAPI.getMessageManager().reportSuccess(ex.toString());
//@@end
* The following code section can be used for any Java code that is
* not to be visible to other controllers/views or that contains constructs
* currently not supported directly by Web Dynpro (such as inner classes or
* member variables etc.). </p>
* Note: The content of this section is in no way managed/controlled
* by the Web Dynpro Designtime or the Web Dynpro Runtime.
//@@begin others
String path;
IPrivateFileUpload_View.ITable_DataElement ele;
//@@end
Regards
Chandran S -
Failed to read data from report file Reason: The table could not be found.
BO Enterprise XI R2, cannot publish crystal reports using the publishing wizard.
Failed to read data from report file Reason: The table could not be found.
Any ideas to get around this would really help out.
RegardsConnection used Views, ODBC System DSN is setup properly.
Approach for import from business view manager and import wizard. both methods failed to import the Business View and underlying reports.
I figure I may have imported the Business View wrong? From Business View Manager I exported from my dev server then imported to prod server.
Apparently I learned exporting my business view also includes the Data Connections that the Business Views are dependent upon.
So which ever folder you specify it copies it there. Originally the all Data Connections Resides on the root folder. To return it to the original location. I deleted what I had exported. Exported this time to the root folder, then only deleted the business views, foundation, elements. Then exported again to the folder where I intended then only deleted the Data Connection.
Makes any sense? So I then had to re point the business views and all the dependent objects to the data connection that resides in the root folder.
I tested the connection, it works fine. I properly updated my crystal reports to the business view in production. Did a sample extract it works as expected.
However when i try to publish, either from Crystal or Publish wizard i get the same error?
As a work around i am thinking, after updating the business view in the crystal reports, shall i re map the fields?? or reexport the business views again?
Any help will be surely appreciated. -
To read data from exel file into sap
hi all,
How to read data from exel file into the internal table in abap?
Regards,
sugeet.Hi Sugeet,
Use the following code.
DATA : BEGIN OF tbl_asset occurs 0,
anlkl LIKE anla-anlkl, " Asset Class
bukrs LIKE anla-bukrs, " Company Code
ranl1 LIKE ra02s-ranl1, " Asset #
txt50 LIKE anla-txt50, " Description 1
txa50 LIKE anla-txa50, " Description 2
sernr LIKE anla-sernr, " Serial #
invnr LIKE anla-invnr, " Inventory #
menge LIKE anla-menge, " Quantity
meins LIKE anla-meins, " Base UOM
inken LIKE anla-inken, " Inventory
END OF tbl_asset.
DATA : w_filename TYPE IBIPPARMS-path,
w_file TYPE string.
start-of-selection.
*popup for file path from user
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
FILE_NAME = w_filename .
MOVE w_filename TO w_file .
* upload data
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = w_file
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = tbl_asset
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
for HAS_FIELD_SEPARATOR Use
'X': Fields are separated by tabs.
SPACE: Fields are not separated by tabs. In this case, the table must contain only one column or all columns must be contained in the file in their entire length.
Hope it helps...
Lokesh
Pls. reward appropriate points
Maybe you are looking for
-
Hi all I am using the if condition in SAP Script as shown below. Even if it is false it is printing the below lines /: IF &variable& NE '0.00' P1 'total' P1 &variable& /: Endif Please help Thanks & Regards vamshi
-
Not able to post a new topic to Discussions Safari Safari for Mac
Hi, I'm new to Apple Discussions, but not new to posting to forums. Currently I'm not able to post to Discussions>Safari>Safari for Mac. I can login, view all post threads, create and save a draft, preview the draft, but cannot post the draft to Disc
-
Could you explain in simple words what is XML output used for? We don't use it now, but we have to decide whether we need it or not.
-
LPA Reporting iView - Can we configure or change the table display?
Hi all... We are using the Reporting Launchpad in MSS. It is using the LPA reporting application to display an employee selection for headcound reports, etc. The table lists employee, id, and 'P'. It is limited to 5 entries. Is there any configur
-
T61p Nvidia Quadro FX 570M + NEC EA231WMi Display Problem
Hi, I have a T61p running Windows 7 sitting in a docking station with an Eizo monitor connected to the DV-I port and an NEW EA231WMi connected to the RGB port. The NEC has a native resolution of 1920 x 1080 and all the correct drivers are installed b