Exception related code

Hi.
When i try to compile following code it gives compile time errror:
import java.io.*;
class Parent{
public void method1() throws IOException, ArrayIndexOutOfBoundsException{
     System.out.println(" HI this is parent class method");
class Child extends Parent{
public void method1() {
          System.out.println(" HI this is child class method");
public class TestExtendedexception{
     public static void main(String args[]) {
          Parent a = new Child(); // line (1) **********
          a.method1();
Error: unreported exception java.io.IOException; must be caught or declared to be thrown
          a.method1();
However if i Create a refernce of 'Child' class instead of 'Parent' class its not giving compile time error. i.e. Child a = new Child()
Why so?

Compare both method declarations:
While the method method1() (I would suggest another name ;-)) in Class Parent declares that it could throw an IOException or an ArrayIndexOutOfBoundsException while being executed, the method method1() in Class child doesn't.
IOException is a so called checked exception, which has to be thrown to the calling method or handled in a so called try-catch-block.
ArrayIndexOutOfBoundsException on the other hand is a so called RuntimeException, which in most cases isn't handled and throws itself.
As method1() won't ever throw both an IOException or an ArrayIndexOutOfBoundsException (the are no IO- or array-accesses in you method), you can omit the throws declaration...
class Parent{
    public void method1() throws IOException, ArrayIndexOutOfBoundsException{
        System.out.println(" HI this is parent class method");
}For more information on Exceptions, see:
[http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html]

Similar Messages

  • Why database related code not wriiten in jsp's

    hi all
    what all resons are there for which database related code
    is not written in jsp's
    one thing that i know is
    it's not a j2ee architecture to do so
    so is it the thing that doing so hits the performance issue
    thanx

    Me, I'm still trying to get my head around Java 1.5, J2EE, Tomcat, JBoss, and Oracle RAC (both programming and DBAing)... My head hurts... Badly...
    Back to the topic, though... I also agree with the previous posters...
    I agree there are exceptions to the "no JDBC in JSP rule of thumb"- I have a JSP-based generic table browser as a tool for emergency maintenance from a (presumably) hostile network, it provides read-only access and automatic password rotation. The flexibility of having it in the JSP has saved my bacon in a crisis; when travelling, I had to talk a non-programmer through applying a code fix (damn developers, using reserved words as column name...)( I had the source on my laptop...). To get a class file fixed, I would have had to get a programmer on the phone, and get the server to reload the class which in our environment at the time required an application restart... The project I work on is about 70 man-years of work, mostly Java, and we have maybe 6 or 8 JSPs that access the DB directly...
    Most of the time though, good design says that you access a particular "type" of data (table or group of tables) in the same "chunk" of code, jsp or class file. It's a lot harder to share a jsp among different invokers than it is a class file. It's also better to isolate presentation from data access.
    Imagine that you have a "USER" table, with first name, last name, username, and password. You program a "login" jsp, a user "edit" jsp and an administrator "edit" jsp. Then a security audit declares that saving an unexcrypted password in the database is insecure; you now have to change evey place that can access the password. If the user object was accessed through a single Java class file, then there would be only one place to fix. Of course, it's possible to use jsp includes to simulate class files, but that's just about as much work as creating the class file to begin with, with more problems.
    Another big advantage of keeping your data access out of JSPs is that you can write unit tests much more easily for the Java classes, using something like JUnit. You can have a set of tests for all your persisted data, which can be run anytime your data model changes. This makes it a lot harder for "side effect" bugs to creep into your code.

  • Com.sap.esi.uddi.sr.api.exceptions.SRExceptionerror code: null detail messa

    Dear All,
    When we try to publish a Web Service using Service Registry, following error appears, even though my user has the roles UDDI_Admin and SERVICE_REGISTRY_READ_WRITE
    com.sap.esi.uddi.sr.api.exceptions.SRExceptionerror code: null detail message: com.sap.esi.uddi.sr.impl.uddi.wsdl.validation.UDDIServerRemoteException: <Localization failed: ResourceBundle='com.sap.engine.services.webservices.wscm.validation.accessors.validation', ID='DISPOSITION_REPORT_UDDI_SERVER', Arguments: ['http://host:port/uddi/api/inquiry/', 'http://host:port/uddi/api/publish/', 'Fatal: A serious technical error has occurred while processing the request. ']> : Can't find bundle for base name com.sap.engine.services.webservices.wscm.validation.accessors.validation, locale en->com.sap.esi.uddi.sr.impl.uddi.wsdl.validation.UDDIServerRemoteException: <Localization failed: ResourceBundle='com.sap.engine.services.webservices.wscm.validation.accessors.validation', ID='DISPOSITION_REPORT_UDDI_SERVER', Arguments: ['http://host:port/uddi/api/inquiry/', 'http://host:port/uddi/api/publish/', 'Fatal: A serious technical error has occurred while processing the request. ']> : Can't find bundle for base name com.sap.engine.services.webservices.wscm.validation.accessors.validation, locale en->com.sap.esi.uddi.server.proxy.depl.v3.DispositionReport
    Note: We have also configured the UDDI destination as described in sap help @ http://help.sap.com/saphelp_nwpi71/helpdata/en/45/c1ea61a1194432e10000000a155369/frameset.htm
    Thanks in Advance,
    Immy.

    Hi Rajesh,
    Many thanks for your prompt reply, however this note 1267817 was already applied before posting message.
    B/W I have observed that in spite of the error the service published multiple times in the registry (perhaps each try to publish resulted a entry in SR).
    Really crazy error, any other suggestion??
    Regards, Immy.

  • It takes long time to invoke the Exception handler code

    In our setup there is firewall between the Appserver that is using toplink and the database.The firewall terminates idle connection on any port if the connection is idle for 1 hr.So i have implemented an exception handler to reconnect when the connection is broken.The code works fine but It takes 15 mins for the exception handler code to be invoked.
    The database is Oracle and the driver is thin driver,OS is solaris.No external connection pool
    I had registered the exceptionhandler to the serversession,should i register it with each ClientSession?

    yes ,15 mins is the time taken before the server session's exception handler code is invoked.
    The following is the exception handler code on the sever session.Any thing wrong?
    server.setExceptionHandler(new ExceptionHandler()
    public Object handleException(RuntimeException ex)
    {//This method is executed only after 15 min ,if the connection is broken
    String mess=ex.getMessage();
    System.out.println("In handler excep mess is "+mess);
    if ((ex instanceof DatabaseException) && (mess.equals("connection reset by peer.")||(mess.indexOf("IOException :Broken pipe")!=-1)))
    DatabaseException dbex = (DatabaseException) ex;
    dbex.getAccessor().reestablishConnection (dbex.getSession());
    return dbex.getSession().executeQuery(dbex.getQuery());
    return null;
    What could be wrong ?
    I tried Oracle's connection cache Impl created a connection pool using the same thin driver and on the same env.SQLException is thrown immediately on using the broken connection.so I feel the driver is not causing any problem.
    Is there any way in toplink to keep the connections active?or Is there any way to poll all connections in the connection pool and check If they are connected instead of waiting until the exception gets thrown and handle it?

  • Page Fault Processor Exception (Error code 00000004) GWIA

    About every 24 - 36 hours GWIA aneds and unload GWIA from its address
    space
    Running 8.01 (with patches) on NW65 sp8 (with patches)
    Novell Open Enterprise Server, NetWare 6.5
    PVER: 6.50.08
    Address space GWIA removed Monday, April 12, 2010 11:53:27.355 am
    Abend 0 on P00: Server-5.70.08: Page Fault Processor Exception (Error
    code 00000004)
    Registers:
    CS = 001B DS = 0023 ES = 0023 FS = 0023 GS = 0023 SS = 0023
    EAX = 00000000 EBX = CA56C50C ECX = CA56C50C EDX = CA5CA998
    ESI = CA5CA998 EDI = CA56C1EC EBP = CA56C4C8 ESP = CA56BBF8
    EIP = F530E65E FLAGS = 00010246
    F530E65E 66AD LODSW
    EIP in LIBC.NLM at code start +0009465Eh
    Access Location: 0xCA5CA998
    The violation occurred while processing the following instruction:
    F530E65E 66AD LODSW
    F530E660 84C0 TEST AL, AL
    F530E662 7503 JNZ F530E667
    F530E664 AA STOSB
    F530E665 EB06 JMP F530E66D
    F530E667 66AB STOSW
    F530E669 84E4 TEST AH, AH
    F530E66B 75F1 JNZ F530E65E
    F530E66D 8B44240C MOV EAX, [ESP+0C]
    F530E671 5E POP ESI
    Running process: Server 00:35 Process
    Thread Owned by NLM: SERVER.NLM
    Stack pointer: CA56BBF8
    User Space Stack limit: 0
    Scheduling priority: 67371008
    Wait state: 50500F0 Waiting for work
    Stack: --CA2F5820 ?
    --C0E5BC80 ?
    F44B6290 (GWIA.NLM|ImapEngineCallback+9BC)
    --CA56C1EC ?
    --CA5CA998 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --CA5CA8B0 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --C8FE5EC0 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --CA56C50C ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --C1D45DC0 ?
    --C9BF50C0 ?
    --C9BF50C0 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    Additional Information:
    The CPU encountered a problem executing code in LIBC.NLM. The
    problem may be in that module or in data passed to that module by a
    process owned by SERVER.NLM.

    that's all that's in the ABEND log .... for each of the times that the
    GWIA unlaods
    The system doesn't actually abend - it just unloads the GWIA from the
    protected memeory space
    ataubman wrote:
    >
    > You haven't given us the modules list so we can't see what versions
    > you have. This problem should be fixed in GW 8 SP1 HP1.

  • Page Fault Processor Exception (Error code 00000002)

    We have begun to experieince the following abend on our Netware 6.5 server running GroupWise 8.
    Novell Open Enterprise Server, NetWare 6.5
    PVER: 6.50.08
    Server halted Wednesday, December 8, 2010 8:08:15.459 am
    Abend 1 on P02: Server-5.70.08: Page Fault Processor Exception (Error code 00000002)
    Registers:
    CS = 0008 DS = 0023 ES = 0023 FS = 0023 GS = 0023 SS = 0010
    EAX = 78DBF1DC EBX = 6D86C060 ECX = 00446A97 EDX = FCAEF520
    ESI = 6FF57EE0 EDI = 7B4AB000 EBP = A067C9A0 ESP = A197F668
    EIP = 8038B5D8 FLAGS = 00010202
    8038B5D8 F2A5 **REPNE* MOVSD
    EIP in LIBC.NLM at code start +000945D8h
    Access Location: 0x7B4AB000
    The violation occurred while processing the following instruction:
    8038B5D8 F2A5 **REPNE* MOVSD
    8038B5DA 2403 AND AL, 03
    8038B5DC 8AC8 MOV CL, AL
    8038B5DE F2A4 **REPNE* MOVSB
    8038B5E0 8B44240C MOV EAX, [ESP+0C]
    8038B5E4 5E POP ESI
    8038B5E5 5F POP EDI
    8038B5E6 C3 RET
    LIBC.NLM|memcmp:
    8038B5E7 57 PUSH EDI
    8038B5E8 56 PUSH ESI
    Running process: GWIMAP-BCC_-Handler_2 Process
    Thread Owned by NLM: GWPOA.NLM
    Stack pointer: A197F418
    OS Stack limit: A19711C0
    Scheduling priority: 67371008
    Wait state: 3030070 Yielded CPU
    Stack: --038068DC ?
    --78DBF180 ?
    90246CD4 (THREADS.NLM|realloc+B8)
    --78DBF180 ?
    --6D86C060 ?
    --038068DC ?
    --03806900 ?
    --00000001 (LOADER.NLM|KernelAddressSpace+1)
    --038068DC ?
    --A197F6A8 ?
    --00000100 (LOADER.NLM|KernelAddressSpace+100)
    --475BE354 ?
    A046BF23 (GWENN5.NLM|GWENN5@_WpmemRealloc+13)
    --6D86C060 ?
    --03806900 ?
    --475BE340 ?
    --A197F6C4 ?
    A045F6BA (GWENN5.NLM|GWENN5@?GetHandle%NgwBufIStream%%QAEKP APAX%Z+2BA)
    --03806900 ?
    --475BE354 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    -9AD5EF0C (GWENN5.NLM|GWENN5@??_7NgwBufIStream%%6B%+8)
    --4C60D600 ?
    --A197F6F4 ?
    9FC3E61B ?
    --4E457B00 ?
    --00001FFC (LOADER.NLM|KernelAddressSpace+1FFC)
    --A197F6DC ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00001FFC (LOADER.NLM|KernelAddressSpace+1FFC)
    9FBBAD00 ?
    --44DC2080 ?
    --4C60D600 ?
    --44DC2080 ?
    --A197F980 ?
    --A197F704 ?
    9FC3E425 ?
    --475BE340 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --A197F71C ?
    9FC2EBAD ?
    --475BE340 ?
    -9F31FACD ?
    -9F31F957 ?
    --A197F980 ?
    --A197F73C ?
    9FBBA181 ?
    --44DC2500 ?
    --00000002 (LOADER.NLM|KernelAddressSpace+2)
    --0006F734 ?
    --44DC2500 ?
    -9F31F957 ?
    --A197F980 ?
    --A197F750 ?
    9FBBB830 ?
    --44DC2500 ?
    --A197F980 ?
    -9F31F957 ?
    --A197F764 ?
    9FBBA640 ?
    --44DC2500 ?
    -9F31F957 ?
    --A197F980 ?
    --A197F78C ?
    9FBBA5B5 ?
    --44DC2500 ?
    --A197F78C ?
    --B18F2280 ?
    --B18F2320 ?
    --439CE400 ?
    -9F31FAF9 ?
    -9F31F957 ?
    --A197F980 ?
    --A197F7AC ?
    9FBBA143 ?
    --44DC2400 ?
    --A197F980 ?
    --0008EBC0 ?
    --44DC2840 ?
    -9F31F957 ?
    --A197F980 ?
    --A197F7C4 ?
    9FBBA6EE ?
    --475BEBC0 ?
    --4B23E4C0 ?
    --A197F980 ?
    -9F31F957 ?
    --A197F7D8 ?
    9FBBA024 ?
    --475BEBC0 ?
    -9F31F957 ?
    --4B8595AE ?
    --A197F9DC ?
    9FB85D78 ?
    --44DC2300 ?
    --00000067 (LOADER.NLM|KernelAddressSpace+67)
    --B18F2F60 ?
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --00000000 (LOADER.NLM|KernelAddressSpace+0)
    --4B859F60 ?
    Additional Information:
    The CPU encountered a problem executing code in LIBC.NLM. The problem may be in that module or in data passed to that module by a process owned by GWPOA.NLM.
    Emulated 5000 and found no RET instruction
    Function may never return.
    We are running GW 8 SP 1 on a Netware 6.5 SP 8 OS. I truncated due to character limit.
    Any help would be greatly appreciated.

    Originally Posted by utman
    My guess is that it is a problem in the GWIN code. Is SP 1 the latest? Usually when the code dies in libc it isn't really libc but the function that called libc.
    We just downloaded SP 2 (fairly new support pack) and some subsequent Hotfixes for SP 2. We will be loading those tonight.
    Thanks for your response.

  • What do I do if the Mac App Store won't except my code for the OS X Mountain Lion code?

    What do I do if the Mac App Store won't except my code for the OS X Mountain Lion code?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico my first language is Spanish. I do not speak English, however I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    Contact the folks that sent you the code or AppleCare for assistance.

  • Request for TERMINAL (EXCEPT WHEN) Code

    Hello, I am using Terminal to set up and auto bcc address to my wife on our business account. I am using: defaults write com.apple.mail UserHeaders '{"bcc"="[email protected]";}'
    What is the code in Terminal when I want to add {except when "To"="[email protected]"} so that when I send an email to her directly, that she doesn't get it twice
    Thank you ....

    This forum is not for ordering code.
    Try it yourself. Read the documentation. It is grouped by topic.
    .NET Framework Development Guide
    To your question related these sub topics:
    File and Stream I/O
    SaveFileDialog Component (Windows Forms)
    Button Control (Windows Forms)
    Creating Event Handlers in Windows Forms
    If you have a specific problem, post the code you wrote and which question you have.
    Armin

  • HI it is related to file interface ,any one please send related code to me.

    now am sending total object ...
    1.1.     Related Business Process Information
    Vendor invoices enter DISCO System electronically and then either go through the 2 -way match or 3-way match process. Since DISCO System does not handle the actual payment processing, the invoices with successful match will be ready to transfer to Enterprise SAP to generate payments.
    The purpose of this interface is to detail the requirements of sending vendor open invoices to Enterprise SAP.  Payments are then processed based on the approved invoices that transfer over from DISCO.
    1.2.     General Description of Functionality
    All Disco approved vendor invoices will be mapped into this interfaceIFIC1001 (Interface  Vendor Invoices to Enterprise SAP) (FI001 Incoming AP Invoices to TLand). This outbound file is a flat file and the format is in TXT. The file name will be load_payable_1516.yyymmddhhmmss.txt (replacing yyyymmddhhmmss with date and time).  This is a nightly interface from DISCO to Enterprise SAP via FTP shuttle.
    Business Requirements:
    Enterprise SAP specific fields for interface purposes:
    •     Company Code
    •     Business Area
    •     GL Account
    •     Profit Center
    •     Cost Center
    •     WBS
    •     MPM Issue
    •     Destination Geography
    •     Distribution Channel
    •     COPA customer
    •     Tax Code
    2.     Functional Specification Details
    2.1.     Detailed Functional Requirements
    2.1.1.     Functional Step 1
    •     Read data in table BSIK
    o     If data in table then go to 2.1.3 Functional Step 3
    o     If no data in table then proceed to 2.1.2 Functional Step 2
    2.1.2     Functional Step 2
    Notification message send to IT Support and AP Account when BSIK is empty. Then end the program.
    Error Message
    Empty File no FTP Transfer
    2.1.3    Functional Step 3
    Create Control Header record when BSIK has data.
    •     The Control Header Record is the first record in the interface file. 
    •     Only one Control Record is required in each file. 
    •     Maximum number of 8000 lines per interface file. 
    •     Several interface files will be created if there are more than 8000 lines, however, no document should ever be split between 2 files, only whole document processing.
    2.1.4   Functional Step 4 
    Create Pay Header
    •     Use the following fields from BSIK to map the Pay Header data in the interface file.
                        Company code               BSIK-BUKRS
                        Vendor                     BSIK-LIFNR
                        Fiscal year                            BSIK-GJAHR
                        Document #               BSIK-BELNR
                        Document Date               BSIK-BLDAT
                        Currency                            BSIK-WAERS
                        Amount in LC (local currency)     BSIK-DMBTR
                        Payment Terms               BSIK-ZTERM
                        Reference                                         BSIK-XBLNR
                Debit/Credit Indicator                  BSIK-SHKZG
                Business Area               BSIK-GSBER
    •     No more than 950 lines per header, if lines exceed 950 then need to create a new header, ensuring that the document is fully balanced (Debits = Credits)
    o     If the value of BSIK- SHKZG = ‘H’ then
    &#61607;     Map ‘-’ to the subfield SIGN of the Amount_ Document _T field
    &#61607;     Assign ‘C’ to the subfield DRCR of the Amount_ Document _T field
    o     If the value of BSIK- SHKZG = ‘S’ then
    &#61607;     Map ‘+’ to the subfield SIGN of the Amount_ Document _T field
    &#61607;     Assign ‘D’ to the subfield DRCR of the Amount_ Document _T field
    o     Save the total amount of each invoice in credit and debit separately.  This data will need to map into the Control Trailer Record (see 5.5)
    Create Pay Line Record
    •     Read following fields from BSIK and use as input fields for table BSEG
    Company code               BSIK-BUKRS
    Document #               BSIK-BELNR
    Fiscal year                       BSIK-GJAHR
    •     When BSEG-LIFNR &#8800; BSIK-LIFNR; Group details by  Document number (BSEG-BELNR), Company code (BSEG-BUKRS), Business Area (BSEG-GSBER), Profit Center (BSEG-PRCTR), Cost Center(BSEG-KOSTL), G/L Account (BSEG-HKONT), Destination Geography (BSEG-ZZDESTGEO), Distribution Channel(BSEG-ZZDIST), MPM (BSEG-ZZISSUE), and COPA Customer (ZZSOLDTO), WBS Element BSEG-PROJK***, Internal Order BSEG-AUFNR, Dr Cr Indicator BSEG- SHKZG
    WBS Element logic – In BSEG-PROJK the WBS Element is stored as 8 digit #, we need to take this number and convert it to the 24 char # (PRPS_POSID), as follows:-
    BSEG-PROJK = PRPS-PSPNR = PRPS-POSID
    e.g.
    BSEG-PROJK = 00000124
    PRPS-PSPNR = 00000124 = PRPS-POSID = HE-000001.04.00001
    In DISCO we are using WBS Elements starting with an Alpha char (HE = Home Entertainment, DI = DIS, AS = ASAP), and in TLand they are using all numeric id’s.
    For the summarization:-
    o     If the WBS element is an Alpha (i.e. DISCO) then get the cost center (PRPS-FKSTL) from the wbs element and summarize by the cost center.
    o     If the WBS element is numeric (TLand) then summarize by the WBS Element.
    •     The fields in BSEG are mapped in the interface as follows:
              MPM Issue                                                 BSEG-ZZISSUE
             Distribution Channel                                     BSEG-ZZDIST
             Sold To Customer (COPA Customer)        BSEG-ZZSOLDTO
              Destination Geography                               BSEG-ZZDEST
              Cost Center                                                 BSEG-KOSTL
              Profit Center                                                BSEG- PRCTR
              Business Area                                             BSEG-GSBER
              G/L Account                                                BSEG-HKONT
              Amount in Local Currency (Summarized)   BSEG-DMBTR     
              Dr/Cr indicator                      BSEG-SHKZG
    o      If the value of BSEG-SHKZG = ‘S’ then
    &#61607;     Map ‘+‘ to the subfield SIGN of the Amount_Extended_T field
    &#61607;     Assign ‘D’ to the subfield DRCR of the Amount_Extended_T field
    o     If the value of BSEG- SHKZG = ‘H’ then
    &#61607;     Map ‘-‘ to the subfield SIGN of the Amount_Extended_T field
    &#61607;     Assign ‘C’ to the subfield DRCR of the Amount_Extended_T field
    •     Process all documents from table BSIK
    2.1.5      Functional Step 5
    Create the Control Trailer Record that contains the total credit, total debit, and total line processed as the last record of the interface.
    2.1.6    Functional Step 6
    Send acknowledgment message to IT Support and AP Accountant for successful transmission and save the interface file on the UNIX server.
    Successful FTP Transfer for FI001
    Remote file is load_payable_1516.yyyymmddhhss.txt
    2.1.7   Functional Step 7
    Clearing Transaction – this is to clear table BSIK, document by document. One transaction will be created by each Document number by Vendor. We must only clear the documents which are included in the interface.
    So, in BSIK take the first document (BSIK-BELNR) and use transaction code F-44 in order to clear this document from table BSIK and transfer it to table BSAK. Process all the documents in BSIK, until BSIK is empty.
    SAP Transaction code     F-44 – Clear Vendor
    Screen     Clear Vendor: Header Data
    Sample document(s)     
    SAP system/Client for sample docs     DR1 (030)
    Step 1 – using document # (BSIK_BELNR) as the key, find the following date for the selection screen
    Input Field description     Map from field     Default value (if applicable)     Sample value
    Account     BSIK-LIFNR          100000
    Clearing date     SY_DATUM          10/06/07
    Period          Default from date     1
    Company Code     BSIK-BUKRS          1119
    Currency     BSIK-WAERS          USD
    Under ‘Additional Selection’ select the ‘radio’ button for the Document number.
    Press Enter.
    Step 2 – input following data
    Input Field description     Map from field     Default value (if applicable)     Sample value
    Document Number From     BSIK-BELNR          400000010
    On menu bar select ‘Go to’ and select ‘G/L Item Fast Entry’
    Step 3 – input following data
    Input Field description     Map from field     Default value (if applicable)     Sample value
    PK (Posting key)     BSIK-SHKZG          50
    Account          APCLEARING     APCLEARING
    Amount     BSIK-DMBTR          500.00
    Business Area     BSIK-GSBER          135
    Company Code     BSIK-BUKRS          1119
    Rules for Posting Key
    If BSIK-SHKZG = H then value to enter = 50
    If BSIK-SHKZG = S then value to enter = 40
    Then click ‘Process Open Items’
    Clear any value in field DF05B-PSSKT (Cash Discnt) = make blank
    Amount Entered (RF05A-BETRG) = Assigned (RF05A-NETT)
    SAVE document and new ‘cleared document’ will be assigned.
    Step 4 – This transaction should be repeated until all entries in the interface file are cleared.
    4.1.5.     Interface File Layout mapping
    The interface file contains four types of records:
    •     Control Record: This is the first record on every transmission file.
    o     Only one Control Record is required in each file. 
    o     Maximum number of 8000 lines per interface file. 
    o     Several interface files will be created if there are more than 8000 lines
    •     Pay Header: This equates to BSIK-BUZEI line 001 of each document.
    o     A new header line should be created whenever 950 lines of Pay Line are written
    o     The records of file are broken into several headers if lines are exceeded 950.
    •     Pay Line: Detailed line containing the summarized data (see 2.1.4).
    •     Control Trailer: This contains totals of the whole file. Add this record at the end of file.
    Message was edited by:
            Naveesh surapureddy

    Hi,
    You can use this FM to get the list of all files
    TMP_GUI_DIRECTORY_LIST_FILES
      DATA: TBL_FILES LIKE SDOKPATH OCCURS 10 WITH HEADER LINE,
            TBL_DIRS LIKE SDOKPATH OCCURS 10 WITH HEADER LINE.
      CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
           EXPORTING
                DIRECTORY  = P_DIRECTORY
                FILTER         = 'Test*.Txt'   "<< restricts to only TEXT files begining with Test
           TABLES
                FILE_TABLE = TBL_FILES
                DIR_TABLE  = TBL_DIRS.
    After getting the files in the TBL_FILES... loop the table and read the files with GUI_UPLOAD FM
    Thanks,
    Sankar M

  • Unhandled exception when code runs for the first time,but works fine the second

    Hi All,
    I have the following code snippet
    private void RGL_Click(object sender, RibbonControlEventArgs e)
    Word._Document oDoc;
               oDoc = Globals.ThisAddIn.Application.ActiveDocument;
                object start = oDoc.Content.Start;
                object end = oDoc.Content.End;
                oDoc.Range(ref start, ref end).LanguageID = WdLanguageID.wdEnglishCanadian;
                oDoc.Range(ref start, ref end).NoProofing = 0;
    Microsoft.Office.Interop.Word.ReadabilityStatistic DocStats;
                    DocStats = oDoc.ReadabilityStatistics[10];------>exception occurs here when code runs first time
                    MessageBox.Show(DocStats.Name + " " + DocStats.Value);
    When I copy paste a document and click on the button it raises a COM exception but if I click continue and click on the button again, the correct grade level score is displayed.Cant figure out why this is happening.

    Thanks for the answer Eugene, this exception never shows up if I type something and click on the rgl button , but if i open a huge document that is already in Canadian english and click on this ribbon it gives me the following exception
    System.Runtime.InteropServices.COMException was unhandled by user code
      HelpLink=wdmain11.chm#36966
      HResult=-2146824090
      Message=Command failed
      Source=Microsoft Word
      ErrorCode=-2146824090
      StackTrace:
           at Microsoft.Office.Interop.Word.ReadabilityStatistics.get_Item(Object& Index)
           at UsabilityMapping_V01.Ribbon1.RGL_Click(Object sender, RibbonControlEventArgs e) in <my path> 1211
           at Microsoft.Office.Tools.Ribbon.RibbonPropertyStorage.ControlActionRaise(IRibbonControl control)
           at Microsoft.Office.Tools.Ribbon.RibbonPropertyStorage.ButtonClickCallback(RibbonComponentImpl component, Object[] args)
           at Microsoft.Office.Tools.Ribbon.RibbonManagerImpl.Invoke(RibbonComponentCallback callback, Object[] args)
           at Microsoft.Office.Tools.Ribbon.RibbonMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
           at Microsoft.Office.Tools.Ribbon.RibbonManagerImpl.System.Reflection.IReflect.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[]
    namedParameters)
      InnerException: 

  • Exception, Fault code or Error Object

    For most cases I find it quite easy to decide whether to return a special value (most times null) or throw an exception.
    But this time i have doubts. Imaging a graphical client invokes a server side service. The service delegates the task to a Class which has to create a special entity using given criterias (used for db access) and store the entity in database.
    Except for error reporting there is no reason to give a value back to the client.
    For some cases the criterias given by the client can be chosen so tight, that it is impossible to create the entity (similar to a database query, which results in an empty set). That means the criterias were not chosen too clever, but regognizing this happens only after invoking the server.
    Now the client shall receive a message, what went wrong. But how should you do that?
    1. Thowing an exception seems a little rough because no programatical error occurend and the user did not do a predictable mistake. But this would enable a chaining which would be translated into an error description for the client.
    2. Using an "Error Object" in cases of a failure and null oder a "Success Object" for success smells like a bad style, but would not interrupt the program flow like a real error
    3. return codes ... same like 2, but more stone age .. =)

    I say throw an exception. An exceptional case has occurred. You can't say it's unpredictable, because you've just predicted it might happen. Or would it be possible for the UI to simply not allow that state to be reached? I don't know how your users are interacting with the UI so that's your call

  • Exception related to user defined module in sap xi ????

    I developed one userdefined module after configuring that i am getting the below exception, can any body tell where exactly the problem
          com.sap.aii.af.ra.ms.api.RecoverableException,
    Thanks,
    Madhusudhan.

    Madhusudana,
    Well...I would in that case suggest you to put debug statements in your code. For this you would need to carry out certain steps which are :
    1. In NWDS , create a new file in the META-INF folder of Enterprise Project. The name of the file should be log-configuration.xml.Paste the following content in this file
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
    <log-configuration>
    <log-formatters>
    <!-- This formatter produces human readable messages. -->
    <log-formatter
    name="trc"
    pattern="%26d %150l [%t] %10s: %m"
    type="TraceFormatter"/>
    </log-formatters>
    <log-destinations>
    <!-- Destination for Trace Information of this sample -->
    <log-destination
    count="5"
    effective-severity="DEBUG"
    limit="2000000"
    name="sample.trc"
    pattern="./log/applications/sample/default.trc"
    type="FileLog">
    <formatter-ref
    name="trc"/>
    </log-destination>
    </log-destinations>
    <log-controllers>
    <!-- Trace Location sample -->
    <log-controller
    effective-severity="DEBUG"
    name="sample">
    <associated-destinations>
    <destination-ref
    association-type="LOG"
    name="sample.trc"/>
    </associated-destinations>
    </log-controller>
    <!-- Logging Category: none, use the default XILog -->
    </log-controllers>
    </log-configuration>
    2. In your process method, add following statement
    AuditMessageKey auditMKey =
                   new AuditMessageKey(message.getMessageId(), AuditDirection.INBOUND);
              Audit.addAuditLogEntry(
                   auditMKey,
                   AuditLogStatus.SUCCESS,
                   "CustomModule :: process method started");
    This would send the statement "CustomModule :: process method started" to the Audit Log of XI server and you would be in a position to see upto which step your code is executing sucessfully. Audit log can be viewed at
    http://<host>:<port>/MessagingSystem/monitor/monitor.jsp. you need to know the message ID for your transaction in this case.
    Hope this helps.
    Nilesh

  • When parsing a large size xml file , OutOfMemorry exception(attach code)

    Dear all ,
    I met a OutOfMemorry exception when I parse a xml file (20M) in my application(I extract data in xml file for building my application data), but I found that it take long time(for 2 more minutes) even just searching the xml file , because my application is viewed by web page , so it's too bad for waiting.
    what I used is org.jdom.input.SAXBuilder(jdom1.0beta8-dev) , and my xml file structure is like :
    <errors>
    <item1>content</item1>
    <item2>content</item2>
    </errors>
    and this is my source code of parsing xml file :
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.output.*;
    public class XMLProperties {
        private File file;
        private Document doc;
        private Map propertyCache = new HashMap();
        public XMLProperties(String filename) {
                SAXBuilder builder = new SAXBuilder();
                // Strip formatting
                DataUnformatFilter format = new DataUnformatFilter();
                builder.setXMLFilter(format);
                long time_start = System.currentTimeMillis();
                Runtime run = Runtime.getRuntime();
                doc = builder.build(new File(filename));
                System.out.println("Build doc memory ="+(run.totalMemory()-
                         run.freeMemory())/1024+"K");
                System.out.println("Build doc used time :"+(
                         System.currentTimeMillis()-time_start)/1000+" s");
            catch (Exception e) {
                System.err.println("Error creating XML parser in "
                    + "PropertyManager.java");
                e.printStackTrace();
         public String [] getChildrenProperties(String parent) {
            // Search for this property by traversing down the XML heirarchy.
            Element element = doc.getRootElement();
            element = element.getChild(parent);
            if (element == null) {
                // This node doesn't match this part of the property name which
                // indicates this property doesn't exist so return empty array.
                return new String [] { };
            // We found matching property, return names of children.
            List children = element.getChildren();
            int childCount = children.size();
            String [] childrenNames = new String[childCount];
            for (int i=0; i<childCount; i++) {
                childrenNames[i] = ((Element)children.get(i)).getName();
            return childrenNames;
        }the test main class:
    import java.util.Map;
    import java.util.HashMap;
    import org.jdom.*;
    import org.jdom.input.*;
    public class MyTest {
      public static void main(String[] args) {
        long time_start = System.currentTimeMillis();
        Runtime run = Runtime.getRuntime();
        Map childs = new HashMap();
        System.out.println("Used memory before="+(run.totalMemory()-run.freeMemory())/1024 + "K");
        XMLProperties parser = new XMLProperties("D:\\projects\\edr\\jsp\\status-data\\edr-status-2003-09-01.xml");
        String[] child = parser.getChildrenProperties("errors");
        for(int i=0;i<child.length;i++) {
    //      childs.put(new Integer(i), child);
    if(i%1000 == 0) {
    System.out.println("Used memory while="+(run.totalMemory()-run.freeMemory()/1024+"K"));
    System.out.println("child.length="+child.length);
    System.out.println("Used memory after="+(run.totalMemory()-run.freeMemory())/1024+"K");
    System.out.println("Time used: "+(System.currentTimeMillis()-time_start)/1000+"s");
    The result is : Used memory before=139K
    Used memory while=56963K
    Used memory after=51442K
    child.length=27343
    Time used: 146s
    is that some way to solve this problem ?
    Thanks for your help

    I met a OutOfMemorry exception when I parse a xml
    l file (20M) in my application(I extract data in xml
    file for building my application data)...Rule of thumb for parsing XML: the memory you need is about 10 times the size of the XML file. So in your case you need 200 MB of free memory.
    , but I found
    that it take long time(for 2 more minutes) even just
    searching the xml file , because my application is
    viewed by web page...Then you need to redesign your application. Parsing 20 megabytes of XML for every request is -- as you can see -- impractical. Sorry I can't suggest how, since I have no idea what your application is.

  • Validation Exception-Error Code 7001

    I get this error when I am accessing a method which uses a toplink API:
    "LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLONK-7001] (Toplink - 4.0.2 (Build 348)):
    com.webgain.integrator.exceptions.ValidationException
    EXCEPTION DESCRIPTION DESCRIPTION: You must login to the ServerSession before acquiring ClientSessions"
    I am trying to use some code that has been used and therefore tested before. Basically...I just want to familiarize myself with Toplink....bt for the past 2 days...I cannot figure out what is wrong.

    If your login configuration in your sessions.xml has the user name and password provided then it should be used in the properties when acquiring the connection.
    Doug

  • CORBA System Exception handling code mapping for Weblogic

    Hi,
    I am in the process of porting some older code that was hosted in an Inprise AppServer
    4.1 environment to Weblogic 8.1. The existing code is catching several CORBA system
    exceptions that include the following :
    org.omg.CORBA.NO_RESPONSE
    org.omg.CORBA.UNKNOWN
    org.omg.CORBA.NO_MEMORY
    org.omg.CORBA.NO_RESOURCES
    org.omg.CORBA.OBJECT_NOT_EXIST
    As far as i understand, these exceptions will never be thrown by the Weblogic
    8.1 Server. I wanted to see if someone can guide me as to which RMI exceptions
    will be thrown by Weblogic server instead of the above mentioned CORBA exceptions
    Thanks in advance
    Muhammad

    "Muhammad Choonara" <[email protected]> writes:
    I am in the process of porting some older code that was hosted in an Inprise AppServer
    4.1 environment to Weblogic 8.1. The existing code is catching several CORBA system
    exceptions that include the following :
    org.omg.CORBA.NO_RESPONSEUnmarshallException (probably)
    org.omg.CORBA.UNKNOWNNo idea
    org.omg.CORBA.NO_MEMORYOutOfMemoryException
    org.omg.CORBA.NO_RESOURCESNo idea
    org.omg.CORBA.OBJECT_NOT_EXISTNoSuchObjectException
    >
    As far as i understand, these exceptions will never be thrown by the Weblogic
    8.1 Server. I wanted to see if someone can guide me as to which RMI exceptions
    will be thrown by Weblogic server instead of the above mentioned CORBA exceptions
    ? andy

Maybe you are looking for

  • I keep getting the blue start up screen. Am I low on ram?

    I keep getting the blue start up screen. Am I low on ram?

  • Link directly to document?

    Is there standrad portal solution to allow an external application and/or browser to go directly to a Document Info Record? For example, I have an external appliation that knows the pertinent DIR information and would like to direct a user directly t

  • Safari content width (NOT window width!)

    Okay, so that none of you are confused: I know how to make my Safari browser window as wide as my screen, and I do it for my own reasons. I like it that way. This is not a philosophical question: How do I make the content match the width of the windo

  • Tab controls

    I have a program with 3 tabs using tab control. The first tab is a login screen (because this will be used for remote fron panel use), the next is a configuration tab and the last is the execution. The login tab is an event structure waiting for a va

  • Can't open WMV movies

    Hi all, I've read the posts on this subject, but they either didn't relate to my problem or didn't work. I have QuickTIme Pro and had no problem playing WMV movies with Flip4Mac until a recent crash made me replace the boot drive and reinstall all th