Checling the exception for Java code

Hi,
  I am using SAP EP 6.0 WAS 6.20
    I have a java code which tries to get initial context
  try
      //try{
                 Properties p = new Properties();
               p.put(Context.INITIAL_CONTEXT_FACTORY, "com.inqmy.services.jndi.InitialContextFactoryImpl");
               //p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.InitialContextFactoryImpl");
                 p.put(Context.PROVIDER_URL, "137.72.229.238:50004");
                 p.put(Context.SECURITY_PRINCIPAL, "Administrator");
                 p.put(Context.SECURITY_CREDENTIALS, "password");
                 Context ctx = (Context) new InitialContext(p);
                          Object objRef = ctx.lookup("SAPEPUMEBean");
               UMEEJBHome ejbHome =  (UMEEJBHome)objRef ;
               objUMEBean = ejbHome.create();
}catch(NamingException namingEx)
This code throws a naming exception.
I wanted to know in which file this exception stacktrace will be present .
Regards
Manoj

Hi,
On the filesystem look in folder:
C:\usr\sap\XXX\XXX\j2ee\cluster\server\log
In Visual Administrator:
Open server node, services, Log viewer.
In the right panel open Server node, select path (C:\usr\sap\XXX\XXX\j2ee\cluster\server\log).
Good luck,
Roelof

Similar Messages

  • JDEV 11G TP3: exception when setting preferences for java code style

    I got this exception when calling the panel in the preferences settings for java code style.
    How to restore it ?
    java.lang.NullPointerException
         at oracle.jdevimpl.style.profile.ProfileModel$ProfileComparator.compare(ProfileModel.java:409)
         at java.util.Arrays.mergeSort(Arrays.java:1284)
         at java.util.Arrays.sort(Arrays.java:1223)
         at java.util.Collections.sort(Collections.java:159)
         at oracle.jdevimpl.style.profile.ProfileModel.<init>(ProfileModel.java:72)
         at oracle.jdevimpl.style.preferences.CodingStylePreferencesPanel.<init>(CodingStylePreferencesPanel.java:144)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at oracle.ide.panels.MetaTraversable.newTraversable(MetaTraversable.java:315)
         at oracle.ide.panels.MetaTraversable.newTraversable(MetaTraversable.java:219)
         at oracle.ide.panels.MDDPanel.getTraversable(MDDPanel.java:1243)
         at oracle.ide.panels.MDDPanel.mav$getTraversable(MDDPanel.java:116)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1506)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1414)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1408)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:525)
         at java.awt.Dialog$2.run(Dialog.java:553)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:551)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:225)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:808)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:593)
         at oracle.ide.cmd.IdeSettingsCommand.doit(IdeSettingsCommand.java:45)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.jdevimpl.vcs.cvs.CVSPreferencesCommand.doit(CVSPreferencesCommand.java:46)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:531)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:784)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:481)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5501)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5266)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3968)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    I got this exception for menu tools\preference\extensions.
    I erased folder C:\JDeveloper\myDirectory\system11.1.1.0.22.49.49 and the error appeared.
    Jun 12, 2008 11:20:55 PM oracle.ide.panels.MDDPanel exitTraversable
    SEVERE: Exception exiting traversable oracle.ideimpl.extension.preference.ExtensionOptionsPanel[,0,0,485x391,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
    java.lang.NullPointerException
         at oracle.ideimpl.extension.preference.ExtensionOptionsPanel.disabledIdsHaveChanged(ExtensionOptionsPanel.java:191)
         at oracle.ideimpl.extension.preference.ExtensionOptionsPanel.onExit(ExtensionOptionsPanel.java:182)
         at oracle.ide.panels.MDDPanel.exitTraversable(MDDPanel.java:1160)
         at oracle.ide.panels.MDDPanel.mav$exitTraversable(MDDPanel.java:116)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1470)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1414)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1408)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
         at java.awt.Dialog$1.run(Dialog.java:525)
         at java.awt.Dialog$2.run(Dialog.java:553)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:551)
         at java.awt.Component.show(Component.java:1300)
         at java.awt.Component.setVisible(Component.java:1253)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.ide.dialogs.WizardLauncher.runDialog(WizardLauncher.java:55)
         at oracle.ide.panels.TDialogLauncher.showDialog(TDialogLauncher.java:225)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:808)
         at oracle.ide.config.IdeSettings.showDialog(IdeSettings.java:593)
         at oracle.ide.cmd.IdeSettingsCommand.doit(IdeSettingsCommand.java:45)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.jdevimpl.vcs.cvs.CVSPreferencesCommand.doit(CVSPreferencesCommand.java:46)
         at oracle.ide.controller.CommandProcessor.invoke(CommandProcessor.java:309)
         at oracle.ide.controller.IdeAction.performAction(IdeAction.java:536)
         at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:843)
         at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:486)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5501)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5266)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3968)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Message was edited by:
    ericardezp

  • NameNotFound exception for java:comp/WorkContextMap

    Hi,
    we need to write a context propagation code. I tried the same using the example from - http://e-docs.bea.com/wls/docs90/programming/context.html#1058673. I have written the web service and it is getting the jndi for java:comp/WorkContextMap OK from it's own initial context. However, when I am writing a standalone java client to use WorkContextMap from the client side by getting a initial context to the weblogic 9.2 server by setting the initial context factory and the provider url, it does not work. I also tried by using only "WorkContextMap" in place of "java:comp/WorkContextMap". but that does not work either. How can this be fixed?
    Just to test, I also tried to doa look up of "java:comp/UserTransaction" from the standalone client and it did not work either. I tried with different types of the jndi string - like with and without java:comp.
    Here is the client code snippet -
                   Hashtable env = new Hashtable() ;
                   env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
                   env.put(Context.PROVIDER_URL, "t3://172.20.8.211:7001");
                   InitialContext ctx = new InitialContext(env) ;
                   logger.info("in testEchoService...InitialContext=" + ctx) ;
                   WorkContextMap map = (WorkContextMap) ctx.lookup("java:comp/WorkContextMap") ;
                   logger.info("in testEchoService...map=" + map) ;
    Appreciate your help,
    Thanks.

    Goutam Mukherjee <> writes:
    The issue you are seeing has to do with client initialization - which is a big and hairy topic I won't bore you with. The simplest way to get this working is to use the J2EE appliction client which will ensure proper initialization - including the comp entries.
    weblogic.j2eeclient.Main
    You will need a generated client jar as well I believe.
    andy
    Hi,
    we need to write a context propagation code. I tried the same using the example from - http://e-docs.bea.com/wls/docs90/programming/context.html#1058673. I have written the web service and it is getting the jndi for java:comp/WorkContextMap OK from it's own initial context. However, when I am writing a standalone java client to use WorkContextMap from the client side by getting a initial context to the weblogic 9.2 server by setting the initial context factory and the provider url, it does not work. I also tried by using only "WorkContextMap" in place of "java:comp/WorkContextMap". but that does not work either. How can this be fixed?
    Just to test, I also tried to doa look up of "java:comp/UserTransaction" from the standalone client and it did not work either. I tried with different types of the jndi string - like with and without java:comp.
    Here is the client code snippet -
                   Hashtable env = new Hashtable() ;
                   env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
                   env.put(Context.PROVIDER_URL, "t3://172.20.8.211:7001");
                   InitialContext ctx = new InitialContext(env) ;
                   logger.info("in testEchoService...InitialContext=" + ctx) ;
                   WorkContextMap map = (WorkContextMap) ctx.lookup("java:comp/WorkContextMap") ;
                   logger.info("in testEchoService...map=" + map) ;
    Appreciate your help,
    Thanks.

  • Why do i get classcast exception for this code

    import java.util.*;
    public class Test1{
    public static void main(String a[]){
    Set s = new TreeSet();
    s.add(new Person(20));
    s.add(new Person(10));
    System.out.println(s);
    class Person{
    Person(int i){}
    }

    basically classcast exception is thrown when the class can not be casted with the proper form that is demanded.
    1> in case of set the value should be mutually comparable. but unfortunately in you code you have not implemented comparable interface. you should implement that interface.
    2> after using the comparable interface you should implement the method <class object 1>.compateTo(<class object 2>)
    the above two process should exclude the exception from you code hopefully.
    check out!

  • How to download the Javadoc for Java 7

    I can't find the download for the Javadoc for Java 7. This is needed for the NetBeans auto help function. Where is it please?

    This might help - http://download.oracle.com/javase/7/docs/technotes/guides/javadoc/index.html
    HTH
    Srini

  • What is the exception for finding more than one row?

    What is the exception if you do a select and get more than one row? no_data_found is the exception for not finding any, what is the exception for finding "too much". Thx

    Funnily enough there is a complete list of predefined exceptions in the documentation .
    Cheers, APC

  • I ordered mac OS and I got the email for License and I didnt get the attachement for content code. Please help me getting the content code.

    I ordered mac OS and I got the email for License and I didnt get the attachement for content code. Please help me getting the content code.

    It's a two email process, one email has a locked pdf with the redemption code. The second email has the password to unlock the pdf. They come separetly, so you may have to wait for the 2nd to arrive.

  • How to find the Execution Time for Java Code?

    * Hi everyone , i want to calculate the execution time for my process in java
    * The following was the ouput for my coding,
    O/P:-
    This run took 0 Hours ;1.31 Minutes ;78.36 Seconds
    *** In the above output , the output should come exactly what hours , minutes and seconds for my process,
    but in my code the minutes are converted into seconds(It should not)...
    * Here is my coding,
        static long start_time;
        public static void startTime()
            start_time = System.currentTimeMillis();
        public static void endTime()
            DecimalFormat df = new DecimalFormat("##.##");
            long end_time = System.currentTimeMillis();
            float t = end_time - start_time;
            float sec = t / 1000;
            float min = 0, hr = 0;
            if (sec > 60) {
                min = sec / 60;
            if (min > 60) {
                hr = min / 60;
            System.out.println("This run took " + df.format(hr) + " Hours ;"+ df.format(min) + " Minutes ;" + df.format(sec) + " Seconds");
        }* How to Calcualte exact timing for my process....
    * Thanks

    * Hi flounder, Is following code will wotk perfectly?
         public static void endTime()
              DecimalFormat df = new DecimalFormat("##.##");
              long end_time = System.currentTimeMillis();
              float t = end_time - start_time;
              float sec = t / 1000;
              float min = 0, hr = 0;
              while(sec >= 60){
         min++;
         sec = sec -60;
         if (min >= 60){
         min = 0; //or min = min -60;
         hr++;
              System.out.println("This run took " + df.format(hr) + " Hours ;"+ df.format(min) + " Minutes ;" + df.format(sec) + " Seconds");
         }

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • What are the values for operation code in order import open interface

    Hi,
    I am trying to create the sales order by populating the interface table and run the request import order i.e. open interace without standard OE APIs.
    I am also populating the actions interface table i.e. OE_ACTIONS_IFACE_ALL along with header, line, & price adjustment tables to hold the order. The sales order creates successfully but it fails at holding action due to invalid operation code. It has been tried with ‘CREATE’, ‘UPDATE, ‘INSERT’ for operation code in action interface table but no use.
    So my concern is what value needs to pass for operation code in action interface table.
    Any help would appreciate.
    Thanks,
    Sai Krishna

    If you are planning to apply holds, For holds the action is OE_Globals.G_APPLY_HOLD or APPLY_HOLD.
    Thanks
    Nagamohan

  • Capturing electronic signature in the Webdynpro for java applicaiton.

    Hi! All,
    Can you please tell me the way to capture the electronic signature in my Webdynpo for Java application.?
    Thanks and Regards,
    M.D.Sahu

    Hi,
    I did it with IFrame control that generates a script (javascript) with Smart Card.
    The user has a smart card with electronic id, when the user wants to sign the form the script generate a smrt card logon.
    The user has to identify with finger print and the electioc signiture is added to the form (Adobe).
    the main issue  in this project was where to activate  script (server side or client side).
    enjoy,,,,
    AmitY

  • Request for java code

    can any one tell me how to execute unix command in windows platform using java code? (please also send code or related websitename)

    when you have that feature OOTB in OIM, why you want it to write java code for that.,??

  • How to configure the work manager java code to eclipse?

    Hello all,
                   I am working with the syclo work manager app. I have successfully installed all components required.
                   I imported the work manager mobile application and I want to import the standard work manager java code, what is the process to import java code into work space.
                   Guide me with some screen shots.
                   When I try to start the WM server it is giving me the following error:
    How to resolve the error.
    Please anyone provide me complete setup needed to run the work manager app smoothly.
    Please guide me.
    Thanks & Regards,
    Swaroopa.

    Swaroopa,
    That error is telling you the SAP JCo library cannot find one of the needed DLLs on the system.  The sapjco.jar loads two additional DLL files (sapjcorfc.dll and librfc32.dll).  Both should be installed by default into your ServerDev directory (assuming you are running Agentry 6.0.x).
    I would guess it is having trouble loading the librfc32.dll based on the message but confirm both are in the correct location.
    --Bill

  • Want to Incerese the performence for below code.

    Hi everyone.
    Please can anyone help me in improving the perfoemence for this below code.
      LOOP AT IT_EBAN INTO WA_EBAN.
    MOVE WA_EBAN-TXZ01 TO WA_ZTOBI_PUR_RQ_LD-TXZ01.
                    MOVE WA_EBAN-MATKL TO WA_ZTOBI_PUR_RQ_LD-MATKL.
                    IF WA_EBAN-BADAT > WA_EBAN-ERDAT.
                      MOVE WA_EBAN-BADAT TO WA_ZTOBI_PUR_RQ_LD-CHANGED_DATE.
                      WA_ZTOBI_PUR_RQ_LD-CHNGIND = LC_I.
                    ELSEIF WA_EBAN-BADAT <= WA_EBAN-ERDAT.
                      MOVE WA_EBAN-ERDAT TO WA_ZTOBI_PUR_RQ_LD-CHANGED_DATE.
                      IF WA_EBAN-LOEKZ = SPACE.
                        WA_ZTOBI_PUR_RQ_LD-CHNGIND = LC_U.
                      ELSEIF WA_EBAN-LOEKZ = LC_X.
                        WA_ZTOBI_PUR_RQ_LD-CHNGIND = LC_D.
                      ENDIF.
                    ENDIF.
            IF WA_EBAN-BSMNG NE 0.
            SELECT EBELN LOEKZ EBELP FROM EKPO INTO TABLE IT_EKPO WHERE BANFN = WA_EBAN-BANFN AND BNFPO = WA_EBAN-BNFPO.
    *If Purchase Orders found
            IF NOT IT_EKPO[] IS INITIAL.
              LOOP AT IT_EKPO INTO WA_EKPO.
                SELECT BEDAT FRGRL PROCSTAT FROM EKKO INTO TABLE IT_EKKO WHERE EBELN = WA_EKPO-EBELN.
                READ TABLE IT_EKKO INTO WA_EKKO INDEX 1.
                IF WA_EKPO-LOEKZ = ''                                 
                    ENDloop.
    Edited by: kumar.p.D on Jan 15, 2010 6:02 AM
    Edited by: kumar.p.D on Jan 15, 2010 6:05 AM
    Moderator message - You have violated at least two forum rules. Please see Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and Please Read before Posting in the Performance and Tuning Forum before posting - post locked
    Edited by: Rob Burbank on Jan 15, 2010 9:15 AM

    In pseudocode:
    1.-  Declare it_ekpo as sorted table with key banfn bnfpo, and add the others fields you need.
          Declare it_ekko as sorted table with key ebeln, and add the others fields you need.
          Declare an internal table like it_eban, ie: it_eban2.
          Declare field-symbol like line of it_eban.
          Declare field-symbol like line ot it_ekpo and other like line it_ekko.
      2.-   it_eban2[]= it_eban[].
            delete it_eban2 where bsmng = 0.
            use it_eban2 in select for all entries to ekpo filling it_ekpo.
            use it_ekpo in select for all entries to ekko.
            free it_eban2.
       3.-  sort it_eban by banfn and bnfpo.
             loop at it_eban assigning the field-symbol instead of into.
             if bsmng <> 0.
              loop it_ekpo assigning field symbol where banfn and bnfpo.
                 at new ebeln.
                      read table it_ekko assigning field symbol with key ebeln.
                 endat
              endloop.
             endif.
             endloop.
      I hope it works  ...
    Edited by: Diego Alvarez on Jan 15, 2010 10:21 AM
    Edited by: Diego Alvarez on Jan 15, 2010 10:27 AM
    Edited by: Diego Alvarez on Jan 15, 2010 10:30 AM

  • The contract for java.io.OutputStream.flush()

    The Javadoc for method java.io.OutputStream.flush() is
    public void flush()
               throws IOException
        Flushes this output stream and forces any buffered output bytes to be written out. The
    general contract of flush is that calling it is an indication that, if any bytes previously
    written have been buffered by the implementation of the output stream, such bytes
    should immediately be written to their intended destination.Thread http://forums.sun.com/thread.jspa?threadID=5318876&tstart=0 highlighted a problem with this contract in that there are some OutputStream such as CipherOutputStream (when using PKCS5Padding) where it does not make sense to implement to the flush() contract. In meeting this contract one would have to close the stream so that nothing else could be written after a flush. The reason for the problem is that only complete blocks of data can be written. Until one has a complete block, the bytes of an incomplete block have to be stored in the CipherOutputStream. Only when one closes a CipherOutputStream can the bytes of the incomplete block be padded to create a complete block, encrypted and then written.
    I have a similar problem with my Base64OutputStream where I can only write a multiple of 3 input bytes until I close() when I can provide appropriate padding.
    So, should one do as ghstark proposed in http://forums.sun.com/thread.jspa?threadID=5318876&tstart=0 and close() the stream when one flushes it or should one do as I currently do and only write out as much as possible without closing the stream. It would seem that one either has to break the flush() contract or break the encryption (or in my case Base64) contract.
    I would appreciate comments.

    DrClap wrote:
    Well, if it were me I would probably redefine the flush() method to only write the bytes that I was ready to write. So in your Base64 case I might be holding back one or two bytes.That is exactly what my Base64OutputStream and Sun's CipherOutputStream do.
    If challenged on that I would just say that my flush() method conformed to the contract because those bytes weren't "buffered" yet.I like the concept but any wording would have to be carefully written. I suppose that I could argue that I have not buffered any bytes that could be written so I have not buffered any bytes.

Maybe you are looking for