Multiple session open in SAP on JCO function call with setSAPGUI(2)

Dear all
I have a standalone java program, which is internally calling an SAP function using JCO 2.0.
This SAP function is internally calling a tCode using ABAP4_CALL_TRANSACTION.
I have set SAPGUI to 2.
            mConnection =
                    JCO.createClient("XXX", "user", "password", "lang", "host", "num", "", "");
            System.out.println("SAPGUI set to 2");
            mConnection.setSapGui(2);
            mConnection.setProperty("jco.destination.name", "SAPGUI");
            mConnection.connect();
SAP GUI is launched with the desired tCode on execution of this java program.
But the issue is there are three sessions on SAP, when checked from SM04.
550     USERNAME     HOSTNAME          13.09.00     1     RFC     0
550     USERNAME     HOSTNAME     TCODE     13.09.00     1     RFC     4
550     USERNAME     HOSTNAME          13.09.00     1     GUI     0
The sessions are active even after JCO connection is disconnected and java program terminates.
Can anybody help in this.
Thanks a lot
Regards
Ruhi Hira

Hi Peter,
Thanks for the prompt response.
I would surely check with the ABAPer's on your observation. However there is one more observation that is worrying me.
If I use the given code with just one record in JCO.Table, the first push to SAP works with data getting inserted into the SAP table. However subsequent to this no records get inserted into SAP even though i populate JCO.Table with just one record.
Also just a small correction to what I had stated earlier - If I use the code with multiple records in JCO.Table no records got inserted into SAP.
Thanks
Mohid

Similar Messages

  • Having multiple sessions open

    I find myself working in many clients at the same time, Development, QA, PRD, Staging and so on. With multiple sessions open in each cleint (upto 6 at a time) it can get difficult trying to figure out what window belongs to what client. In the task bar I have set Windows XP to group similar taskbar buttons, so I only have one button. Now I can always see the client from the lower strip in the SAP window, but as you can imagine it can be quite cumbersome to figure out what client I am working in. Do you guys have a way to make this easier? Wondering what other Abappers out there do. Thank you.

    Hi Megan,
    I do sometimes maintain several sessions in different client like you...
    I am not sure about XP but in VISTA:
    1. On your right side of the toolbar near the clock... there's a SAP logon pad icon (when you login)...right click on it to see all your session. The list of session will be describe in a popuplist...
    2. Another method, try to close session temporarily, until you want to use them again (even though you will be using it shortly)
    Normally, i will still close those session, even though i know i need to use them shortly... its for the sake of sanity, I keep it simple so i don't get confuse... ahahhahahaha....
    thanks,
    William Wilstroth

  • Setup for Discoverer to have multiple sessions opening in different browser

    What is the setup for Discoverer or Windows 6 browser to have multiple discoverer sessions opening in different browser windows at the same time in Discoverer 10g Plus?
    We have implemented Discoverer 10g Plus just to be used as an extract tool. We have some workbooks retrieving 200,000 or more rows from an Oracle database. It is taking 30 to 45 minutes to download. Some users are able to open multiple sessions in different browsers to download more then one worksheet at the time, but we have other users who get an error message that they can only open one session at the time. What is the setup to allow users to open more than one Discoverer session?

    Additional research in Metalink found the following:
    Hdr: 7261918 10.2 USER_JAV 10.1.2.54.25 PRODID-964 PORTID-46
    Abstract: ALLOW ABILITY TO LAUNCH TWO DISCOPLUS SESSIONS FROM SAME BROWSER CONNECTION PAGE
    *** 07/17/08 07:31 am REQUEST TEXT ***
    Please refer to bug 6656139. Need to get Discoverer Plus certified to
    support launching two plus sessions from same browser connections page when
    using SUN JRE 1.5/1.6 or higher.
    As per bug 6656139 it appears to be JVM 1.5.x limitation, because same
    actions work fine when using SUN JRE 1.4.2_xx.
    *** 07/17/08 07:31 am BUSINESS NEED ***
    Impossible to run reports against two different databases simultaniously
    using same Discoverer instace, or just several reports at the same time,
    which would save much time instead of running reports one by one.
    *** 07/19/09 11:57 pm *** (CHG: Sta->97)
    *** 07/19/09 11:57 pm RESPONSE ***
    ALSO SEE THIS FROM SUPPORT
    Error 'Unable To Connect Discoverer Server: Null' When Opening A Second Plus Session From The Same Browser [ID 790187.1]
    Cause
    Bug 6656139, JVM 1.5 : RUNNING TWO PLUS SESSIONS ERRORS WITH UNABLE TO CONNECT: NULL
    The Java Console reports the following error:
    Error: java.lang.StackOverflowError
    java.lang.StackOverflowError
    at java.awt.DefaultFocusTraversalPolicy.accept(Unknown Source)
    at java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(Unknown Source)
    at java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(Unknown Source)
    at javax.swing.DefaultFocusManager.getFirstComponent(Unknown Source)
    Per Bug 6656139 this problem is a limitation/bug with current Sun JRE 1.5
    and higher and needs to be addressed by Sun.
    Solution
    Currently launching two Discoverer Plus sessions from the same browser connection page is not supported/certified.
    Enhancement Request :
    Bug 7261918, ALLOW ABILITY TO LAUNCH TWO DISCOPLUS SESSIONS FROM SAME BROWSER CONNECTION PAGE
    has been logged for this issue but is still waiting on a Sun Java fix.
    Use the following workaround:
    Use JRE 1.4.2_xx until the ER is implemented and the SUN JRE bug is fixed.

  • Multiple session open

    Hi ,
    Application facing problem of multiple session pending for more that 2-3 days using JDBC Thin Client.
    I can see these all querying v$session.
    database is Oracle.
    What could be reason?
    How to find problem as this is due to issue in Oracle or JDBC end.
    Can you please gudie.
    Thanks in Advance.

    Hello,
    Most likely an applicaiton issue so you need to investigate if java application closing connection appropriately. When you query v$session, it shows you status of session , machine name, username and program used to create this session and whole lot.
    Do you have connection pooling at java level or at oracle or not at all? Also looked into following parameter to support increased number of sessions. (processes, sessions, transactions)
    Regards

  • Getting Return values from RFC function call with visual basic

    Hi,
    I am creating a sample app to connect to a SAP system which call its RFC functions created with ABAP. It was known that the function will return more than 1 return values.
       SAP Function name ==> "ZFMTP_RFC_GET_RESULT"
            Export parameters (to SAP):
                    - Student Name [char 10]         ==> "STUNAME"
                    - Student ID         [char 20]        ==> "STUID"
           Return values (From SAP):
                    - Results [char 10]        ==> "RESULT"
                    - Remarks [char 200]        ==> "REMARKS"
    i have managed to get sample codes for connecting and call a RFC function with vb but they only get a return value. How do i retrieve multiple return values like the above function "RESULT" and "REMARKS"?
    Here's my vb code to accessing the function
            Dim R3 As Object
            Dim FBFunc As Object
            Dim returnFunc As Boolean
            Dim connected As Boolean
            R3 = CreateObject("SAP.Functions")
            R3.Connection.Client = "000"
            R3.Connection.User = "BCUSER"
            R3.Connection.Password = "minisap"
            R3.Connection.Language = "DE"
            R3.Connection.System = "dtsystem"
            R3.Connection.Applicationserver = "xxx.xxx.xxx.xxx" 
            connected = R3.Connection.Logon(0, True)
            If connected <> True Then
                MsgBox("Unable to connect to SAP")
            End If
            FBFunc = R3.add("ZFMTP_RFC_GET_RESULT")
            FBFunc.exports("STUNAME") = "Jonny"
            FBFunc.exports("STUID") = "12345"
            returnFunc = FBFunc.Call() <<== How do i get the return value? or RESULT and REMARKS of the RFC Function?
    thanks alot.
    Edited by: Eugene Tan on Mar 4, 2008 7:17 AM

    Hi Gregor,
    Thanks for the link....i am having some doubts with the codes, hope you can clarify them for me if you know the codes..
    Below is the code snippet.
    Set impReturn = CHPASS_FN.Imports("RETURN")  <<=== is RETURN the standard keyword to get a                                                                                return object?
      expPassword.Value = currpass
      expNewPass.Value = newpass
      expFillRet.Value = "1"
    ''' Call change password function
      If CHPASS_FN.Call = True Then
        outFile.Write (", Called Function")
        Message = impReturn("MESSAGE") <<==== So if i have 3 return values..i just replace with the return                                                               value variable names?
        outFile.WriteLine " : " & Message
      Else
        outFile.Write (", Call to function failed")
      End If
    thanks alot...all your help is very appreciated.

  • How to speed up JCO function call

    Hello,
    i have some function module in r/3 which returns a huge amount of data. When i am testing this fm in r/3 this function takes few seconds for executing. But when i run this function with jco from java it takes about ten times more :(.
    Is there - eg in jco - some possibilities of speeding up connection - or another technologies i can use? (i would like to try make xml in abap and pack it..is it good idea or the result will be only my waste time?)
    thanks for each answer...
    JJ

    Hi,
    I can't see how you can significantly increase the jco speed, but you can using caching if possible(particularly at the java side) and your other suggestion make sense. I expect you don't present all that data you are fetching, so perhaps you should move the heaviest business logic to the ABAP side and only transfer the results ?
    Dagfinn

  • Sql developer will not close after having multiple database sessions open

    when ever I have multiple session open, I can't close the application. I have to perform a cntl-alt-del and kill the application.

    I can't seem to reproduce this with 10 connections. Can you start from a console and post a stace trace?
    run from a console.
    <sdev>/jdev/bin/sqldeveloper
    -kris

  • Multiple session handling in the Web UI

    Hi all,
    According to the SAP help documentation, a user can have multiple sessions open in the Web UI. However after a certain period, inactive sessions are terminated. This is certainly the behaviour that we witness on our system, the second inactive session times out after about 25 minutes.
    Does anyone know how to adjust the time out of this second session, this appears to be independent of the general timeout for htttp which is set at 2hours according to the transaction SMICM.
    Thanks in advance
    Paul

    Follow the steps mentioned  by Pankaj.
    Even after this the debugger did not start, do the steps below so that HTTP debugger is on
    1) Run the T-code SICF
    2) Search for the service name CRM_UI_FRAME in the service name. click on F8
    3) Select CRM_UI_FRAME and click on the Edit Menu. Select the option Debugging --> Activate Debugging
    4) This opens a pop up, give your user name and click on OK.
    Now start running the application. The debugger should start.
    Hope this helps.
    Regards,
    Vinay

  • RFC calls with SAP table insert - lock tables

    Hi,
    I have an external server program, which is calling a rfc function many times the same time with different transaction types. There are transaction types, which are downloading information from SAP (only send data back to the caller), and there are transaction types which are uploading data to SAP (inserting/updating data on SAP).
    The function calls are synchronous as the server needs to get feedback directly. The parallel work processes for RFC calls are limited, so a system overload can´t happen.
    The problem now is, if the server is down for while and going to be restarted, it´s opening parallel threads and calls the function in SAP at nearly the same time. That means, it will call the function with upload requests (table must be locked), and download requests the same time.
    In the upload requests, the table has to be locked, that it can´t occur that we get wrong entries...
    I can only enqueue the table with just two fields... I know, that is almost like locking the whole table, but it´s not possible to lock it in a different way.
    I tried to use the enqueue function with the parameter WAIT, but it didn´t help, as there where too many parallel calls and after some seconds, they were ending up with an error (Because the table has been locked by another call).
    It seems that it´s trying to lock the table again for all parallel calls at exactly the same time....
    The calls has to be synchronous, as the server needs to get the feedback directly. Any ideas how top solve this, that it handles all incoming calls parallel and waits for the table is unlocked again?
    Thank you for your help!

    Hi,
    thank you for your answer!
    I have investigated something new yesterday:
    I thought at the beginning, that the problem just occurs, when the system work processes are reached. The system has for example set up 15 dialog processes and the external server is calling the function 20 times in parallel. Then we normally need 5 dialog processes more. The system is taking then all 15 dialog processes and the locks got stucked.
    That means, that I´ll maybe only get 4 or 5 uploads, which have really been updated the tables. All the others couldn´t get the table locked for their process.
    But if I now let the server call the function just about 13 times in parallel, nearly all uploads have been updated the table!
    From my point of view, the lock from SAP gets stucked, when the limit of dialog processes is reached. It´s not working in the right way anymore...
    The same is happening, when you set up in the system, that only 10 work proecesses can be used by RFC. If I have more than 10, it´s going to be critical with the locks....
    WEIRD!
    Can anybody help me out of trouble?
    Thank you!

  • Error "pure virtual function call"

    Hi,
    Windows7, PCI-GPIB, NI-488.2 Version 3.1.1, Visual Studio 2010 C++ Application.
    Randomly between 10 minuntes and 4 hours I get the error "pure virtual function call"
    With the debbuger attached to the process in error I identified NI4882.dll as the source of the error.
    Then I deinstalled NI-488.2 Version 3.1.1 and installed NI488.2 July 2000. Then my application runs without any error!
    I tried to attach the source files which represents the interface between my application and the NI-4882 driver but it did not work for the C++ file.
    Any help appreciated.
    Best Regards
    Walter
    Attachments:
    _GPIB.h ‏4 KB

    Part 2:
    Int TGpib::Open (UShort adr, ULong timeoutMs)
    if (mDevices.empty ())
    Reset ();
    Int ud = ibdev (mBoardID, adr, 0, TimeoutCode (timeoutMs), 1, 0);
    if (ud < 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("open device '%d' failed"), adr);
    GPIBError (-1, FCTX, true);
    return -1;
    SDevInfo devInf;
    devInf.mGpibAdr = adr;
    mDevices[ud] = devInf;
    if (!DeviceClear (ud))
    MCTraceLib (this, eTraceError, TFCTX, _T("no device on address '%d'"), adr);
    GPIBError (ud, FCTX, true);
    Close (ud);
    return -1;
    if (Send (ud, "*IDN?"))
    Tstring s = String2Tstring (Enter (ud));
    StringList l = Split (s, _T(','));
    if (l.size () == 4)
    mDevices[ud].mVendorName = l[0];
    mDevices[ud].mModelName = l[1];
    else
    MCTraceLib (this, eTraceError, TFCTX, _T("no device on address '%d'"), adr);
    GPIBError (ud, FCTX, true);
    Close (ud);
    return -1;
    Local (ud);
    return ud;
    bool TGpib::Close (Int ud)
    GPIBDevMap::iterator it = mDevices.find (ud);
    if (it != mDevices.end ())
    Local (ud);
    Int stat = ibonl (ud, 0);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("close device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    mDevices.erase (it);
    return true;
    return false;
    bool TGpib::SetTimeout (Int ud, ULong timeoutMs)
    Int stat = ibtmo (ud, TimeoutCode (timeoutMs));
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("set timeout device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    ULong TGpib::Timeout ()
    return mTimeout;
    bool TGpib::EnableSRQ (Int ud, HANDLE srqEvent)
    if (srqEvent != INVALID_HANDLE_VALUE)
    GPIBDevMap::iterator it = mDevices.find (ud);
    if (it != mDevices.end ())
    (it->second).mSRQEvent = srqEvent;
    Int stat = ibnotify (mBoardID, SRQI, GpibSRQ, (void*)this);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    MCTraceLib (this, eTraceDebug, TFCTX, _T("(SRQ)on device ud = '%d' success"), ud);
    return true;
    else
    MCTraceLib (this, eTraceError, TFCTX, _T("srqEvent == INVALID_HANDLE_VALUE"));
    return false;
    bool TGpib::DisableSRQ (Int /*ud*/)
    return true;
    bool TGpib::Remote (Int ud)
    Int adr;
    ibask (ud, IbaPAD, &adr);
    adr += 32; // Talk Address = Listen Address + 32
    char cmdbuf[] = {MTA0, 0, LLO, UNT, UNL};
    cmdbuf[1] = char(adr);
    Int stat = ibcmd (mBoardID, &cmdbuf, 5);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    mDevices[ud].mRemote = true;
    return true;
    bool TGpib::Local (Int ud)
    mDevices[ud].mRemote = false;
    Int stat = ibloc (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    char TGpib::SerialPoll (Int ud)
    char pollChr;
    Int stat = ibrsp (ud, &pollChr);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    return static_cast<char> (pollChr & 0x9F); // VM QueryError eliminieren
    bool TGpib::DeviceClear (Int ud)
    Int stat = ibclr (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    bool TGpib::Trigger (Int ud)
    Int stat = ibtrg (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    return true;
    bool TGpib::Send (Int ud, const std::string& str)
    Int stat = ibeot (ud, 1);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("'EOI on' on ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    stat = ibwrt (ud, (void*)str.c_str (), str.length ());
    Long sent = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    if (sent != static_cast<Long> (str.length ()))
    MCTraceLib (this, eTraceError, TFCTX, _T("only %d of %d characters sent"), sent, str.length ());
    return false;
    return true;
    bool TGpib::SendNoEOI (Int ud, const std::string& str)
    Int stat = ibeot (ud, 0);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("'EOI off' on ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    stat = ibwrt (ud, (void*)str.c_str (), str.length ());
    Long sent = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    if (sent != static_cast<Long> (str.length ()))
    MCTraceLib (this, eTraceError, TFCTX, _T("only %d of %d characters sent"), sent, str.length ());
    return false;
    return true;
    std::string TGpib::Enter (Int ud)
    std::string str = "";
    char* buf = new char[2048];
    Int stat = ibrd (ud, (void*)buf, 2047);
    Long got = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    else
    buf[got] = '\0';
    str = buf;
    // eventuelle LF und CR vom Ende entfernen!
    string::size_type idx = str.find_last_of (k_CR);
    str = str.substr (0, idx);
    idx = str.find_last_of (k_LF);
    str = str.substr (0, idx);
    delete[] buf;
    return str;

  • Package/procedure/function calls done with in a package

    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..
    Thanks
    Manju

    manjukn wrote:
    Hi Experts,
    Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
    It would be great if we can provide a tree like structure of the objects being called/used.
    btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
    Appreciate your time..What database version do you have?
    11g I think provides some sort of fine grained dependency information which can detail packages, but prior to 11g you can only get dependencies on the database objects themselves of which functions/procedures within a package are not, as the package itself is the object.
    I don't think there's any easy way to find out from any tables or views and I think third party tools would have to parse the code to determine such things themselves, so that may be one of your only options.

  • How to open multiple Sessions in Solution Manager

    Good Day Gurus,
    I am currently working on Solman 7.1 Sp12.My question is :Is it possible to open multiple sessions in Solution Manager? Here is the scenario: The client is working on multiple incidents and instead of logging on to the system again to access the 2nd incident he would like to open another session within the current call he is working on.
    Is this functionality possible in Solman? I have seen the functionality working before  in CRM interaction center not sure if it applies in Solman.
    Your help is highly appreciated.
    Thanks
    Maria

    Hi Maria,
    Options to Call a Function in an SAP System, by entering transaction codes in the command field, the transaction in bold is the one your want for opening multiple sessions.
    You can use the F1 key on the command field to display the following possible entries:
    /N to cancel the current transaction
    /NXXXX to call transaction XXXX directly from another transaction. Without the prefix, you can only call XXXX from the SAP Easy Access screen.
    /O to display the overview of the SAP GUI sessions on your computer
    /OXXXX to call transaction XXXX in a new window directly from another transaction
    /NEND to end the log on session with a confirmation dialog box
    /NEX to end the log on session without a confirmation dialog box
    /I to delete the window you are currently using
    Regards,
    Ruth

  • Multiple session are open thought Users log out.

    Hello Gurus,
    I do see at CMC that many sessions are being open for many days even though users are logged out.
    We are using SAP 4.0 (14.0.4)  SP4. It's causing license issues and users are not able to log in.
    We have restarted our VM's and clear the IE browsers as well but issue still remains.
    Can you please help me on this.
    Best Regards,
    Sai

    Hi Sai,
    Could you give more information about BOE products you use and for which datasource type (UNV, UNX ?).
    I know SP04 still had different issues where multiple sessions were created when working on UNX Universes (see https://support.wdf.sap.corp/sap/support/notes/1764372), and it could lead to "lost sessions". There are other similar problems fixed in more recent versions of BOE, so you may think about upgrading your platform at some point to benefit from all these corrections.
    Regards,
    Loic

  • RFC Assign Link As XML Multiple Input Error SAP JRA Function Call

    I am using SAP MII 12.1.0 (Build 201)
    I have a problem with SAP JRA Function Call Action in Link Assignment as assign XML.
    I need to assign multiple input but from local xml property to my RFC table as assign XML
    but when i am going to execute my transaction i am getting following errors.
    [WARN] Data buffer filter for this action does not exist or the interface is incorrect.
    [ERROR] Unable to make RFC call Exception: [com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE:      Transferred IDoc data records are empty (internal error)            ]
    [WARN] [SAP_JRA_Function_Upload_Material_Consumption] Skipping execution of output links due to action failure.
    [ERROR] [UserEvent] : com.sap.conn.jco.JCoException: (104) RFC_ERROR_SYSTEM_FAILURE:      Transferred IDoc data records are empty (internal error)
    Please help me out in this issue.
    Regards,
    Manoj Bilthare

    Dear Jeremy
    Thanks for reply
    My Problem is got solved that problem is due to version problem now the MII version is Version 12.1.4 Build(46).
    Regards,
    Manoj Bilthare

  • How to open multiple sessions for one user?

    Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
    When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 1
    update my_table set col1 = 0 where row_id = 1
    select col1 from my_table where row_id = 1
    -- shows result is 0and then enter into the second worksheet:
    select col1 from my_table where row_id = 1
    -- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
    I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
    Re: Help with Procedure
    Edited by: tem on Apr 18, 2012 6:44 AM

    Thanks Jim,
    Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
    This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
    I don't see an option for "Worksheet".
    UPDATE:
    OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
    select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
    Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
    Edited by: tem on Apr 18, 2012 8:00 AM

Maybe you are looking for