Meet error when extending FileWriter with JDK1.5.0
There is a fragment of Java code as follows:
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
public class FilterFileWriter extends FileWriter
private short _tokenCounter = 0;
private StringBuffer _buffer = new StringBuffer();
private String _pattern = "Bioseq-set";
private String _lastAppend = "";
private boolean _doWrite = true;
public void write(char[] arg0, int arg1, int arg2) throws IOException
super.write(arg0, arg1, arg2);
public void write(int arg0) throws IOException
if( _doWrite )
super.write( arg0 );
if(_lastAppend.equalsIgnoreCase( pattern ) && !doWrite && arg0 == 60 )
_doWrite = true;
super.write( arg0 );
_lastAppend = "";
public void write(String arg0, int arg1, int arg2) throws IOException
super.write(arg0, arg1, arg2);
public void write(char[] arg0) throws IOException
//Launcher.getLoggerInstance().info( "Writing array " + arg0[0] );
super.write(arg0);
public void write(String str) throws IOException
if( str.equalsIgnoreCase( _pattern ) )
if( _lastAppend.equalsIgnoreCase( "</" ) )
_doWrite = false;
_lastAppend = str;
return;
if( str.equalsIgnoreCase( "</" ) )
_lastAppend = str;
return;
if( _lastAppend.equalsIgnoreCase( "</" ) )
super.write( _lastAppend );
if( _doWrite )
super.write( str );
if( str.trim().length() > 0 )
_lastAppend = str;
public void write( String str, boolean force ) throws Exception
if( force )
super.write( str );
public FilterFileWriter(File arg0) throws IOException
super(arg0);
public FilterFileWriter(File arg0, boolean arg1) throws IOException
super(arg0, arg1);
public FilterFileWriter(FileDescriptor arg0)
super(arg0);
public FilterFileWriter(String arg0) throws IOException
super(arg0);
public FilterFileWriter(String arg0, boolean arg1) throws IOException
super(arg0, arg1);
private boolean hasPattern()
return buffer != null && buffer.toString().indexOf( _pattern ) >= 0;
When compiling, meet following error:
The return type is incompatible with Appendable.append(char), Writer.append(char),Writer.append(char)
Why? and How to resolve this error?
Thanks a lot!
Did you ever find a solution to this problem? I just installed jdk 1.5_03 and I get the following error from a class that does not have any of the methods described in the error below.
The return type is incompatible with Appendable.append(char), Writer.append(char), Writer.append(char)
Similar Messages
-
Borland VisiBroker for java meet error when Installed Oracle 8i(V8.1.6)
Oracle modified some register key value of Java Runtime
Evironment which result in Java2IDL.exe's runninng error. I
fixed the value in /software/javasoft/java runtime environment
and reset the currentversion key to 1.3. Oralce use jre1.1.7.
Can oracle meet errors when change it to sun jre1.3.1? May
upgrade oracle jre1.1.7 to high version ? Tell me how to. Please
tell me where to download If Oracle can't use Sun JRE1.3 . How
can I deal with this problem and let VisiBroker for java and
VisiBroker for C++ work well?
Best RegardsHi,
I am not aware of a sqlplus v8 for macosx so the nonexistence of it might be your problem. The way I remember it, there are sqlnet libs that are usable from other apps. What you could do is install the v9.2 developers release. This contains sqlplus and in that case just make sure the directory containing sqlplus is in your PATH (you also need a few other environment variables; they are set in DBENV).
Ronald.
http://ronr.nl/unix-dba -
Error when opening document with ECL control: INVALID_DATA
Hi Gurus,
I've tried to search the net for this problem but could not find anything and I'm stuck now.
Description:
we're using ECL to view attached documents (to POs etc.) which are stored through ArchiveLink on the content repository.
when we try to open this document, time-to-time we get following error:
Error when opening document with ECL control: INVALID_DATA
Message no. SDV004
by time-to-time I mean that when we try to open same attachment again it opens successfully (sometimes we need to re-open it 3-4 times to get it)
what we've tried is to enlarge timeout for HTTP protocol (tx SMICM, from former 30 to actual 60) but only effect we got is that we're waiting for the error longer time
It will be really great if anybody of you guys can give me an advice where the problem can be or where should I look and what to check
Thanks,
DavidHi Christoph,
thanks for tip, unfortunately this was already flagged, currently settings are:
for Display Settings:
yes - include ECL control
use HTML control
empty - maximum viewer wait time
(do you think that setting some value for this could help)
yes - deactivate generic object services in viewer
no - doc display as dialog box
yes - deactivate data provider cache
Storage Settings:
yes - always copy document class from document type
yes - permit multiple assignment
Thanks,
David -
ORA-04062 error when running forms with different users
ORA-04062 error when running forms with different users
I have a form that has a block that should display some data from another users tables. (The other user's name is dynamic, it's selected from a list box)
I wrote a stored procedure to get the data from other user's tables.
When I compile the form and run it with the same user I compiled, it works without any error. But when I run the compiled form with another user I get the ORA-04062 (signature of procedure has been changed) error.
I tried setting REMOTE_DEPENDENCIES_MODE to SIGNATURE in init.ora but it didn't help.
My Forms version is 6i with Patch 15.
Database version is 9.
Here is my stored procedure:
TYPE Scenario_Tab IS TABLE OF NUMBER(34) INDEX BY BINARY INTEGER;
TYPE Open_Curs IS REF CURSOR;
PROCEDURE Get_Scenarios(User_Name IN VARCHAR2, Scen_Table OUT Scenario_Tab) IS
Curs Open_Curs;
i NUMBER;
BEGIN
OPEN Curs FOR
'SELECT Seq_No FROM '|| User_Name ||'.scenario';
i := 1;
LOOP
FETCH Curs INTO Scen_Table(i);
EXIT WHEN Curs%NOTFOUND;
i := i + 1;
END LOOP;
END Get_Senarios;
I would be happy to solve this problem. It's really important.
Maybe somebody can tell me another way to do what I want to do. (getting a list of values from another users tables)I think it should be a better solution to create a package,
and put your own TYPES and procedure into it.
CREATE OR REPLACE PACKAGE PKG_XXX IS
TYPE TYP_TAB_CHAR IS TABLE OF .... ;
PROCEDURE P_XX ( Var1 IN VARCHAR2, var2 IN OUT TYP_TAB_CHAR );
END ;
Then in your Form :
Declare
var PKG_XXX.TYP_TAB_CHAR ;
Begin
PKG_XXX.P_XX( 'user_name', var ) ;
End ; -
Error when extracting data with extractor 2lis_04_matnr - NEED HELP ASAP !!
Hi experts!
Got an error when extracting data with extractor 2lis_04_matnr.
System says (short dump):
DUMP TEXT START----
Runtime error: CONNE_IMPORT_WRONG_COMP_TYPE
Exception: CX_SY_IMPORT_MISMATCH_ERROR
Error when attempting to import object "MC04P_0MAT_TAB".
The current ABAP program "SAPLMCEX" had to be terminated because one of the statements could not be executed. This is probably due to an error in the ABAP program. When attempting to import data, it was discovered that the data type of the stored data was not the same as that specified in the program.
An exception occurred. This exception is dealt with in more detail below. The exception, which is assigned to the class 'CX_SY_IMPORT_MISMATCH_ERROR', was neither caught nor passed along using a RAISING clause, in the procedure "MCEX_BW_LO_API" "(FUNCTION)".
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is: When importing the object "MC04P_0MAT_TAB", the component no. 5 in the dataset has a different type from the corresponding component of the target object in the program "SAPLMCEX". <b>The data type is "D" in the dataset, but "C" in the program.</b>
DUMP TEXT END----
Please, can someone explain me how to solve it?
Really need help ASAP!
Thanks in advance,
Jaume
Message was edited by:
Jaume Saumell
Message was edited by:
Jaume SaumellHi,
Check this note: 328181
So you need to delete entries in SM13/LBWQ for application and also detup table content.
And then refill teh set up table.
If you are in production clear the entries by running collective run no of times for this application 04.
With rgds,
Anil Kumar Sharma .P -
Error when make controller with MVC entity framework
error when make MVC with entity framework, WHY??
Hi Arif Kalbu,
It would be better if you could share us the detailed error message, so I could provide useful informaiton or provide the correct forum for this issue, you know that this forum is to discuss the VS IDE.
But if the real issue is related to the MVC project, maybe the ASP.net forum would be better: http://forums.asp.net. If then, you could get an answer more quickly and professional. Thanks for your cooperation.
Best Regards,
Jack
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
SAP DMS : Error when opening document with ECL control: INVALID_DATA
We are receiving following error while try to view .FAX file through SAP Document viewer
"2D viewer - Unable to opend Document"
"Error when opening document with ECL control: INVALID_DATA"
Appreciate your quick effort.
Thanks,
Sam.Yes, We have checked in both ways, I have also followed other threads on the same issue
But not able to find the solution for the issue. We are facing the issue when we are using files scannned by Kodak Scanner i1420 in tiff format.
But If I will attach any other tiff files from directory then It can viewed through SAP Document Viewer.
I appreaciate your help in this regards.
Thanks,
Sam, -
Stack Overflow Error for JNI program with Jdk1.3
I wrote a JNI wrapper for a third party sofware (written in C) to use some exported functions provided. My program runs fine when using Sun JDK1.2.2, but I got the following error when using Jdk1.3 to run the program (It's a runtime error, only the version of runtime virtual machine matters.)
# An EXCEPTION_STACK_OVERFLOW exception has been detected in native code outside
the VM.
# Program counter=0x9073337
A stack overflow was encountered at address 0x09073337.
I tried IBM jdk 1.2.2, it gave me a similar error complaining about the stack overflow error.
The vendor of the third party software denies any wrong doing in their code and I don't have their source code. A test client (simulate the Java client) I wrote in C works perfectly fine and as I mentioned earlier the same java progarm runs OK with jdk 1.2.2, without any change to my system stack size. Does any body know what this is about and the solution for this?
Thanks!
My email: [email protected]I had the same exception occur in my JNI code and I have some advice on things to look for.
Symptoms: The C++ code runs fine when called in an native executable but when it is wrapped by a JNI call inside a DLL you get the following exception:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_STACK_OVERFLOW occurred at PC=0x100d72e5
Function name=_chkstk
The address will be different of course.
In my tests I isolated the problem to an allocation of a char array like so at the top of one of my wrapped C++ methods:
char buf[650000];
As you see this code is requesting 650000 bytes of stack memory. When run in a native executable there was no problem but when I ran it wrapped in the JNI call it blew up.
Conclusion: There is a much smaller stack space when using JNI OR the added overhead of my JNI wrapper exhausted the available stack space OR this is a stack space issue related to DLLs.
Hope this helps. Anyone with insight on this please put in your 2 cents. -
JDeveloper error when extending VO
I have had problems yesterday and today attempting to create an extending VO with the "mandated" RowImpl class. When I click on the Finish button in the wizard, I get the following error:
Error in updating the java files for component: AbcMyReqsVO
Exception: java.lang.NullPointerException
Exception stack trace:
java.lang.NullPointerException
at oracle.jbo.dt.objects.JboAttribute.getSuperAttr(JboAttribute.java:1147)
at oracle.jbo.dt.objects.JboView.doGenerateAttributeGetCode(JboView.java:2375)
at oracle.jbo.dt.objects.JboView.generateCalculatedAttributeGetBody(JboView.java:2577)
at oracle.jbo.dt.objects.JboView.generateAttributeMethods(JboView.java:2673)
at oracle.jbo.dt.objects.JboView.createViewRowFile(JboView.java:1909)
at oracle.jbo.dt.objects.JboView.saveToJavaFile(JboView.java:1813)
at oracle.jbo.dt.objects.JboBaseObject.saveObject(JboBaseObject.java:2084)
at oracle.jbo.dt.objects.JboView.saveObject(JboView.java:1719)
at oracle.jbo.dt.ui.main.DtuSaveThread.doSaveObject(DtuUtil.java:1538)
at oracle.jbo.dt.ui.main.DtuSaveThread.run(DtuUtil.java:1528)
If I uncheck the "Generate Accessors" checkbox (as the stack talks about doGenerateAttributeGetCode), the error does not occur.
Can anyone explain this and provide an alternative workaround that allows me to generate by accessor methods?The problem is in the AllReqsVO.xml. All of the view attributes have the following:
<DesignTime>
<Attr Name="_OverrideAttr" Value="true" />
</DesignTime>
This VO doesn’t extend another VO, therefore the _OverrideAttr shouldn’t be in the ViewAttribute definitions. If you manually edit the AllReqsVO.xml file and remove each of those references, then you will be able to Generate Accessors without getting the nullpointerexception. This will also fix the problem with the other VOs that extend this one, like MyReqsGlanceVO. You don’t have to change the MyReqsGlanceVO.xml, just fix AllReqsVO.xml and then you will be able to Generate Accessors when extending MyReqsGlanceVO. -
Error when creating index with parallel option on very large table
I am getting a
"7:15:52 AM ORA-00600: internal error code, arguments: [kxfqupp_bad_cvl], [7940], [6], [0], [], [], [], []"
error when creating an index with parallel option. Which is strange because this has not been a problem until now. We just hit 60 million rows in a 45 column table, and I wonder if we've hit a bug.
Version 10.2.0.4
O/S Linux
As a test I removed the parallel option and several of the indexes were created with no problem, but many still threw the same error... Strange. Do I need a patch update of some kind?This is most certainly a bug.
From metalink it looks like bug 4695511 - fixed in 10.2.0.4.1 -
Error when creating BufferedImage with IndexColorModel from a byte array.
Hi, I have a 1-dimentional byte array and an IndexColorTable, and I can't figure out how to combine the 2 into an BufferedImage without unnecessary copying/reallocating of the image buffer.
The color model I have is:
int [] cmap = new int [numColors];
cmap[i++] = 0xffa0f000; /etc.
new IndexColorModel(8, 22, cmap, 0, true, transparentIndex, DataBuffer.TYPE_BYTE );Thanks for your help
-Ben
Ps.
I've was looking at some example code (http://javaalmanac.com/egs/java.awt.image/Mandelbrot2.html?l=rel), and can't figure out how to go from the color model they're using to the one I have (the 8 bit one specified above). When I replace the 4bit colormodel in the code below with the 8bit color model specified above, I get the following error:
[java] java.lang.IllegalArgumentException: Raster ByteInterleavedRaster: width = 5120 height = 3520 #numDataElements 1 dataOff[0] = 0 is incompatible with ColorModel IndexColorModel: #pixelBits = 8 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@c51355 transparency = 2 transIndex = 22 has alpha = true isAlphaPre = false
[java] at java.awt.image.BufferedImage.<init>(BufferedImage.java:613)
Code:
byte[] pixelArray = (byte[]) getData_CHAR();
int width = 5120;
int height = 3520;
int numbytes = width*height;
//create DataBuffer using byte buffer of pixel data.
DataBuffer dataBuffer = new DataBufferByte(pixelArray, numbytes, 0);
//prepare a sample model that specifies a storage 8-bits of pixel data in an 8-bit data element
int bitMasks[] = new int[]{0xf};
SinglePixelPackedSampleModel sampleModel = new SinglePixelPackedSampleModel(DataBuffer.TYPE_BYTE, width, height, bitMasks);
//create a raster using the sample model and data buffer
WritableRaster writableRaster = Raster.createWritableRaster(sampleModel, dataBuffer, new Point(0,0));
//generate 16-color model
byte[] r = new byte[16];
byte[] g = new byte[16];
byte[] b = new byte[16];
r[0] = 0; g[0] = 0; b[0] = 0;
r[1] = 0; g[1] = 0; b[1] = (byte)192;
r[2] = 0; g[2] = 0; b[2] = (byte)255;
r[3] = 0; g[3] = (byte)192; b[3] = 0;
r[4] = 0; g[4] = (byte)255; b[4] = 0;
r[5] = 0; g[5] = (byte)192; b[5] = (byte)192;
r[6] = 0; g[6] = (byte)255; b[6] = (byte)255;
r[7] = (byte)192; g[7] = 0; b[7] = 0;
r[8] = (byte)255; g[8] = 0; b[8] = 0;
r[9] = (byte)192; g[9] = 0; b[9] = (byte)192;
r[10] = (byte)255; g[10] = 0; b[10] = (byte)255;
r[11] = (byte)192; g[11] = (byte)192; b[11] = 0;
r[12] = (byte)255; g[12] = (byte)255; b[12] = 0;
r[13] = (byte)80; g[13] = (byte)80; b[13] = (byte)80;
r[14] = (byte)192; g[14] = (byte)192; b[14] = (byte)192;
r[15] = (byte)255; g[15] = (byte)255; b[15] = (byte)255;
//create buffered image
ColorModel colorModel = new IndexColorModel(4, 16, r, g, b);
BufferedImage image = new BufferedImage(colorModel, writableRaster, false, null);Message was edited by:
ben_weisburd
Message was edited by:
ben_weisburdI had the same problem too.
anyone found the solution for this problem?
thanks
Bruno Rabino
When I try to make a MD-form, where the base-table for the detail contains a column with a BLOB-datatype. I get following error when I finish creation of the form.
Error: Exception from wwv_generate_component.build_procedure (WWV-01821)
Error creating module: ORA-01403: no data found (WWV-16042)
When I use the table with the BLOB as master or in a form, it works fine.
Has anyone else experienced this problem? Or knows a way to fix or work around it. Thanks in advance.
Portal version: 3.0.6.6.5
null -
Error when doing importing with impdp
Hi,
I tried to do export then import the schema from and to same schema. However, when doing export with expdp everything was okay.
Problem begins when I tried to do importing by using impdp. I also tried to drop the current schema and created the new one but it still doesn't work.
If I didn't drop the current schema, it logs looks like this
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
ORA-31684: Object type SEQUENCE:"HSS"."LCM-MIGRATION_ID-SEQ" already exists
ORA-31684: Object type SEQUENCE:"HSS"."WKS_IDENTITY_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HSS"."ESS_FAILOVER_RESOURCE_SEQ" already exists
ORA-31684: Object type SEQUENCE:"HSS"."ESS_FAILOVER_LEASE_OWNER_SEQ" already exists
Processing object type SCHEMA_EXPORT/TABLE/TABLE
ORA-39151: Table "HSS"."HSS_COMPONENT" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."HSS_COMPONENT_LINKS" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."HSS_COMPONENT_PROPERTY_VALUES" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."HSS_COMPONENT_TIERS" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."ESS_CLUSTER_SERVER_MAPPING" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."HSS_COMPONENT_TYPES" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."CSS_IDENTITY" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."CSS_GROUP_MEMBERS" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
ORA-39151: Table "HSS"."CSS_USERS" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
Job "HSS"."SYS_IMPORT_FULL_01" completed with 95 error(s) at 08:47:21
And then this is the log when doing importing, I only highlighted the necessary part which I think related with my problem
Starting "HYPSS"."SYS_IMPORT_FULL_01": HYPSS/******** TRANSFORM=oid:n:type directory=test_dir logfile=imptest.log dumpfile=HYPSS.dmp
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"HYPSS" already exists
. . imported "HYPSS"."CSS_ROLE_LOCALES" 1.630 MB 6358 rows
. . imported "HYPSS"."HSS_COMPONENT_FILES" 601.5 KB 33 rows
. . imported "HYPSS"."HSS_COMPONENT_PROPERTY_VALUES" 130.7 KB 1657 rows
. . imported "HYPSS"."CES_APPS" 10.54 KB 1 rows
etc....
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
ORA-39083: Object type INDEX_STATISTICS failed to create with error:
ORA-01403: no data found
ORA-01403: no data found
Failing sql is:
DECLARE I_N VARCHAR2(60); I_O VARCHAR2(60); c DBMS_METADATA.T_VAR_COLL; df varchar2(21) := 'YYYY-MM-DD:HH24:MI:SS'; BEGIN DELETE FROM "SYS"."IMPDP_STATS"; c(1) := 'TRIGGER_NAME'; c(2) := 'TRIGGER_GROUP'; DBMS_METADATA.GET_STAT_INDNAME('HYPSS','QRTZ_TRIGGERS',c,2,i_o,i_n); INSERT INTO "SYS"."IMPDP_STATS" (type,version,flags,c1,c2,c3,c5,n1,n2,n3,n4,n5,n6,n7,n8,n
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
The source schema is on USERS tablespace (default). The destination schema I tried to put on the same tablespace but it doesn't work. However when I changed the destination tablespace, it also doesn't work.
Anybody got the idea why this occurs? Thanks.got error like this
ORA-39152: Table "HSS"."CSS_GROUP_MEMBERS" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-39152: Table "HSS"."CSS_USERS" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-39152: Table "HSS"."CSS_ROLES" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-39152: Table "HSS"."CSS_DELEGATED_MEMBERS" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-39152: Table "HSS"."CSS_ROLE_MEMBERS" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-39152: Table "HSS"."CSS_ROLE_LOCALES" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-39152: Table "HSS"."CSS_GROUPS" exists. Data will be appended to existing table but all dependent metadata will be skipped due to table_exists_action of append
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-00001: unique constraint (HSS.COMPONENT_LINKS_PK_IND) violated
ORA-31693: Table data object "HSS"."HSS_COMPONENT_TYPES" failed to load/unload and is being skipped due to error:
ORA-00001: unique constraint (HSS.COMPONENT_TYPES_PK_IND) violated
ORA-39111: Dependent object type COMMENT skipped, base object type VIEW:"HSS"."VW_APPLICATIONS" already exists
ORA-39111: Dependent object type COMMENT skipped, base object type VIEW:"HSS"."VW_APPLICATIONS" already exists
ORA-39111: Dependent object type COMMENT skipped, base object type VIEW:"HSS"."VW_APPLICATIONS" already exists -
Runtime Error when Posting Invoice with text added (MIRO)
Hi Gurus,
We are getting a shortdump (runtime error) when we post certain invoices in MIRO. This happens when we input some text in the text field or add some text to the NOTE tab.
We are having exception ERROR_DP raised in the program c_textedit_control.
If the text field is blank and nothing is writing in the NOTE tab, the invoice gets posted with no problem.
Has anyone come accross this issue before and how did you solve it please.
Thanks.are u processing thru BADI, then it is very easy there are interfaces and methods for handling texts. u sud not get any error and plz never write commit work in BADI.
May be i cud provide more help if u share more details but let me tell more but let me share one recent development that i did.
In ME59n when we do PR TO PO then texdts sud be copied to header text in PO and get reflected in PO. the coding is like below may be can give some clues wid ur MIRO stuff.
METHOD if_ex_me_process_po_cust~process_header.
* Author : Prasenjit Bist *
* ID : PRBIST *
* Date : 04.08.2011 *
* Changes : New Devlopment *
* Change Request: *
* Description: To copy LSP information in PO *
TYPES:
BEGIN OF ty_text,
auto_pr_po TYPE zman_auto_pr_po,
plant TYPE zman_plant,
vendor TYPE zman_vendor,
lsp_vendor TYPE zman_lsp_name,
contract_no_text TYPE zman_contract_no_text,
END OF ty_text.
TYPES:
BEGIN OF ty_address,
ort01 TYPE ort01_gp, " city
ort02 TYPE ort02_gp, " district
pfach TYPE pfach, " PO Box
pstlz TYPE pstlz, " Postal code
region TYPE regio, "Region (State, Province, County)
telf1 TYPE telf1, "1st telephone number
telf2 TYPE telf2, "2nd telephone number
telfx TYPE telfx, "Fax number
land1 TYPE land1,
END OF ty_address.
DATA:
get the header level details
ls_mepoheader TYPE mepoheader,
lt_purchase_order_items TYPE purchase_order_items,
ls_purchase_order_items LIKE LINE OF lt_purchase_order_items,
get the line item details
lt_mepoitem TYPE STANDARD TABLE OF mepoitem,
ls_mepoitem TYPE mepoitem,
lt_textlines TYPE mmpur_t_textlines,
ls_textlines LIKE LINE OF lt_textlines,
TEXT TYPES
lt_texttypes TYPE mmpur_t_texttypes,
ls_texttypes LIKE LINE OF lt_texttypes.
DATA: l_name TYPE thead-tdname,
ls_header TYPE thead,
lt_lines TYPE STANDARD TABLE OF tline,
ls_lines TYPE tline,
l_tdobject TYPE thead-tdobject,
l_metafield TYPE mmpur_metafield.
DATA: ls_text TYPE ty_text,
l_text(50).
DATA: l_continue(1).
DATA: l_pass_vendor TYPE lifnr,
l_pass_plant TYPE werks,
l_name1(35).
fetch the address
DATA: ls_address TYPE ty_address,
l_landx TYPE landx.
CONSTANTS: lc_id TYPE thead-tdid VALUE 'F01',
lc_langu TYPE thead-tdspras VALUE 'E',
lc_object TYPE thead-tdobject VALUE 'EKKO'.
CONSTANTS: lc_set(1) VALUE 'X',
lc_vendor(11) VALUE 'Vendor: ',
lc_lsp_vendor(11) VALUE 'LSP Vendor:',
lc_contract_no_text(14) VALUE 'Contract Text:'.
CLEAR: l_continue.
IF sy-uname EQ 'PRBIST'.
Read the header data
ls_mepoheader = im_header->get_data( ).
read teh item level data.
break prbist.
lt_purchase_order_items = im_header->get_items( ).
LOOP AT lt_purchase_order_items INTO ls_purchase_order_items.
The item attribute of the structure is reference to line item
ls_mepoitem = ls_purchase_order_items-item->get_data( ).
APPEND ls_mepoitem TO lt_mepoitem.
ENDLOOP.
CHECK VENDOR IS THE ONE WE WANT.
SELECT SINGLE name1 FROM lfa1 INTO l_name1 WHERE lifnr = ls_mepoheader-lifnr.
First read the vebdor name based on LIFNR.
TRANSLATE l_name1 TO UPPER CASE.
IF ( l_name1 EQ 'LSP1' ) OR ( l_name1 EQ 'LSP2' ).
LOOP AT lt_mepoitem INTO ls_mepoitem.
TRANSLATE ls_mepoitem-werks TO UPPER CASE.
IF ls_mepoitem-werks EQ 'FI01'.
l_continue = lc_set.
l_pass_vendor = ls_mepoheader-lifnr.
l_pass_plant = ls_mepoitem-werks.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
IF l_continue EQ lc_set AND sy-tcode EQ 'ME21N'.
Call the POP UP screen to display LPS information.
CALL FUNCTION 'ZMAN_LSP_POP_UP'
EXPORTING
im_vendor = l_pass_vendor
im_plant = l_pass_plant
IMPORTING
ex_text = l_text.
GET Text Object (TTXOB)
im_header->if_longtexts_mm~get_textobject(
IMPORTING ex_tdobject = l_tdobject
ex_metafield = l_metafield ).
GET TEXT IDS
im_header->if_longtexts_mm~get_types(
IMPORTING ex_texttypes = lt_texttypes ).
CHECK TEXT TYPE 'F01' EXISTS.
READ TABLE lt_texttypes INTO ls_texttypes WITH KEY tdid = lc_id.
IF sy-subrc EQ 0.
UPDATING ITEM TEXT.
MOVE: l_tdobject TO ls_textlines-tdobject,
ls_texttypes-tdid TO ls_textlines-tdid,
'*' TO ls_textlines-tdformat.
break prbist.
ls_text = l_text.
CONCATENATE l_text ls_texttypes-tdtext INTO ls_textlines-tdline.
CONCATENATE ls_text-vendor
ls_text-plant
ls_text-lsp_vendor
ls_text-contract_no_text
INTO ls_textlines-tdline SEPARATED BY space.
APPEND ls_textlines TO lt_textlines.
INSERT VENDOR
CLEAR ls_textlines-tdline.
CONCATENATE lc_vendor ls_text-vendor INTO ls_textlines-tdline SEPARATED BY space.
APPEND ls_textlines TO lt_textlines.
INSERT LSP VENDOR
CLEAR ls_textlines-tdline.
CONCATENATE lc_lsp_vendor ls_text-lsp_vendor INTO ls_textlines-tdline SEPARATED BY space.
APPEND ls_textlines TO lt_textlines.
INSERT CONTRACT TEXT.
CLEAR ls_textlines-tdline.
CONCATENATE lc_contract_no_text ls_text-contract_no_text INTO ls_textlines-tdline SEPARATED BY space.
APPEND ls_textlines TO lt_textlines.
INSERT A BLANK LINE.
CLEAR ls_textlines-tdline.
APPEND ls_textlines TO lt_textlines.
INSERT addreSS CAPTION.
CLEAR ls_textlines-tdline.
MOVE 'Address:' TO ls_textlines-tdline.
APPEND ls_textlines TO lt_textlines.
break prbist.
READ THE ADDRESS
SELECT SINGLE ort01 " city
ort02 " district
pfach " PO Box
pstlz " Postal code
regio "Region (State, Province, County)
telf1 "1st telephone number
telf2 "2nd telephone number
telfx "Fax number
land1 "COUNTRY
FROM lfa1 INTO ls_address WHERE lifnr = ls_mepoheader-lifnr.
GET COUNTRY
SELECT SINGLE landx FROM t005t INTO l_landx WHERE spras = 'E' AND land1 = ls_address-land1.
INSERT ADDRESS DETAILS.
CLEAR ls_textlines-tdline.
CONCATENATE ls_address-ort01 ls_address-ort01 INTO ls_textlines-tdline SEPARATED BY space.
APPEND ls_textlines TO lt_textlines.
INSERT COUNTRY.
CLEAR ls_textlines-tdline.
MOVE l_landx TO ls_textlines-tdline.
APPEND ls_textlines TO lt_textlines.
TELEPHONE DETAILS
CLEAR ls_textlines-tdline.
CONCATENATE 'Tel:' ls_address-telf1 '/' ls_address-telf2 INTO ls_textlines-tdline.
APPEND ls_textlines TO lt_textlines.
FAX DETAILS.
CLEAR ls_textlines-tdline.
CONCATENATE 'Fax:' ls_address-telfx INTO ls_textlines-tdline.
APPEND ls_textlines TO lt_textlines.
SAVE THE HEADER LONG TEXT.
im_header->if_longtexts_mm~set_text(
EXPORTING im_tdid = ls_texttypes-tdid
im_textlines = lt_textlines ).
ENDIF.
ELSEIF l_continue EQ lc_set AND sy-tcode EQ 'ME59N'.
No need to display POPUP simply read the values and show.
if not
ENDIF. "(l_continue = 'X' and transaction code is ME21N or ME59N)
CLEAR l_continue.
ENDIF. "(sy-uname)
ENDMETHOD.
Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:15 AM
Edited by: Prasenjit Singh Bist on Aug 14, 2011 10:21 AM -
Runtime error when syncing P1i with PC
I get a runtime error when syncing my P1i to PC. The error is linked with this file, 'dxp syncml.exe', and the application is said to request the 'Runtime to terminate it in an unusual way'. How do you fix this?
Thanks Joanne. Let me give you feedback on whats happening so far.
After some doing, I discovered that my firewall is controlled by Norton Firewall Provider. (Bear in mind I am a novice in terms of managing these computer protocols). To modify the firewall settings, Norton calls this in their the control panel 'Smart firewall', I go to program control then configure. A list of programs came up with the options to add, modify, remove or rename. I searched the list and found that DXP SyncML.exe and mRouterRuntime.exe were listed and set to 'Auto' in the Access column. I noticed that under access, the options include auto, allow, block and custom. I reasoned that 'allow' is the highest level of access, and to support the sync feature, I changed the status to 'allow' from 'auto' for the DXP SyncML and mRouterRuntime executable files. If you believe it is ok and safer to keep the auto status, advise me.
I did not find in the listing any of these programs; Bearer Abstraction Layer (SCBAL.exe), Generic Device Management Executable (Generic.exe) or Symbian Connect Object Model for Symbian Connect QI (SymbianConnectRuntime.exe).I did a search and located the generic.exe and the other two files under 'common files' in 'teleca shared' folder, and 'symbian' in 'shared' and 'symbianconnectruntime', respectively.
Norton's control panel for Smart Firewall gave me three options when adding programs: allow, block and manual configure internet settings. The last of the three was recommended by Norton. However, I selected 'allow' for the generic.exe, symbianconnectruntim.exe and scba.exe.Please advise if you believe I need to modify the terms I entered to set up this procedure (is there a better setting that allow me to achieve the same level of functionality without compromising my security?)
Now Joanne, whats left is for me to try the sync after making these changes. I feel as if I accomplished a lot by only reaching this far. I will have to do a reinstallation of the SE PC Suite before moving on though. Let me explain.
When the sync failed repatedly because of the unexpected termination linked with the dxp syncml.exe, I uninstalled the SE PC Suite which was done from a disc, and installed a version from the Sony website. That version is 1.6.0, with a copyright date of 2006. With this, the sync worked. By the way I am using Windows 7 Starter. Now what I am going to do later is uninstall this version of the suite, and reinstall the one from the disc that was linked with the problem we are solving. When I do that later, I will give you feedback.
Just in case you are wondering, I have a vested interest in using the PC Suite from the disc. This application works fine for the file manager component where the drive on the phone and removable media card are read. In the 1.6.0 version, I cannot get the file manager to see the phone as connected though when I put the card (is that called M2 disc?) in the phone, it reads. So, I although sync is working with the 1.6.0 version from the website, I want to use the version I have on disc if the sync component gets over the problem we are trying to solve.
Hope I am on the right track so far I thank you profusely for your patience and dealing with my qeurry; the solution will make a world of a difference for me and many other P1i owners. Look foward to the follow up
Rohan Bell -
Fatal error when updating Payload with Java hw Worklist API
Hi all,
I am receiving an error when I want to update some non-String-type fields
of a task payload. I access the fields in the payload with facade-classes, generated by Schemac.
The fact is that I can read all the payload fields, but when I try to set values in non-String typed fields of the payload I'm getting a run-time error:
java.lang.NullPointerException at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.hash(ConcurrentReaderHashMap.java:308) at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.get(ConcurrentReaderHashMap.java:427) at org.collaxa.thirdparty.dom4j.tree.NamespaceCache.get(NamespaceCache.java:82) at org.collaxa.thirdparty.dom4j.Namespace.get(Namespace.java:60) at com.collaxa.cube.xml.dom.DOMUtil.createElement(DOMUtil.java:382) at com.collaxa.cube.xml.dom.DOMUtil.createElement(DOMUtil.java:350) at com.collaxa.cube.xml.BaseFacade.setChildElementValue(BaseFacade.java:323) at nl.nak.www.ns.vocht.Userpayload.setAge(Userpayload.java:327) at nl.nak.gui.action.ProcessTaskAction.execute(ProcessTaskAction.java:107) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at nl.nak.gui.custom.CustomActionServlet.process(CustomActionServlet.java:35) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)
My XSD file for the payload looks like this:
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.comp.nl/ns/vocht"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.comp.nl/ns/vocht">
<element name="userpayload">
<complexType>
<sequence>
<element name="name" type="xsd:string" />
<element name="lastname" type="xsd:string" />
<element name="age" type="xsd:int" />
<element name="amount" type="xsd:decimal"
</complexType>
</element>
</schema>
The code where I make a connection to the
WorkList service and how I retrieve the payload is listed below.
Note that a specific task is set in the Session at in a previous step:
try{
String user="jcooper";
String password="welcome";
//maak een verbinding
RemoteWorklistServiceClient client = new RemoteWorklistServiceClient();
client.init();
out.println("connectie geinitialiseerd");
//authenticatie
IWorklistContext ctx = client.authenticateUser(user, password);
Userpayload ut = (Userpayload) UserpayloadFactory.createFacade(payload);
ut.setName("tom");
ut.setLastname("Cooper");
//EXCEPTION THROWN HERE
ut.setAge(1);
ut.setAmount(new BigDecimal(2));
taak.setPayload(ut.getRootElement());
String action = "DONE";
client.customTaskOperation(ctx, taak.getTaskId(), action);
out.println("taak geapproved :: "+payload.toString())
return null;
catch(Exception e)
//PRINT DEBUG INFORMATIE
e.printStackTrace(new PrintWriter(out));
sp.addActionError(errors,"nl.nak.view.standaard.errors.system",null);
saveErrors(request,errors);
return null; //mapping.findForward("failure");
At run-time the null-pointer exception is thrown when the Age field is set.
Can anynone help me with this problem?
Thanks in advance!
Tom Hofte
Message was edited by:
[email protected]If it is a stored procedure, the action should be EXECUTE and not UPDATE and the structure should be similar to this:
<StatementName5>
<storedProcedureName action=u201D EXECUTEu201D>
<table>realStoredProcedureeName</table>
<param1 [isInput=u201Dtrueu201D] [isOutput=true] type=SQLDatatype>val1</param1>
</storedProcedureName >
</StatementName5>
From help.sap
Regards,
Prateek
Maybe you are looking for
-
Hello All, I have a problem with how my website displays in IE that doesn't occur in any other browser that I've tested it in, either on Mac (my platform) or Windows. I have a header in each of my pages build with a single table with some imbedded im
-
How to generate "named destinations" in PDF
When generating a PDF, how can I get "named destinations" in my PDF so I can created hyptertext links to it? 1. question: I produce several PDFs files, which have links to chapters in the other PDF. To directly jump to such a chapter, one can use nam
-
How to change primary external editor
How do I change the primary external editor to Elements 11? It was an old version of PS which I removed and had hoped that since it was no longer available, LR would look for a new one as primary. I already have my Topaz products for the additional e
-
Mac Pro will boot but won't restart.
When waking up or doing a soft boot my Mac Pro will chime and sound like it's booting but the display will never come on. If I do a cold boot, or even hold down the power button to force it off and then boot it's fine. I've tried turning on and off a
-
Scenario is TS Gateway in a dmz.com domain and RemoteApp server in internal.com both servers joined to respective domians. TS Gateway is exposed to internet. How to I configure this scenario so I can get to the RemoteApps internally ? There is a one-