SAGUI Internal Session ID

Hello,
I need to find a unique identifier for a logon from another on sapgui session level.. i tried function modules or took a glance at the C system functions i couldn't find any..
The requirement is , abap program should contact to active sapgui, find it's "session id" or "thread id" or "internal number" or a key similar to those.. and abap program will let's say, insert this gui-id to a database table as a record.. in another logon, another user will be able to check if this session id still exists and active, if not, record will be deleted...
i hope i could've explained the situation...
Many thanks

Hi,
  Actually the following is the C call inside the fm that Stefan has given you..
call 'ThUsrInfo' id 'OPCODE' field opcode_get_session_id
                 id 'SESSION_ID' field session_id
                 id 'ID_LEN' field id_len.
And the data declaration of opcode_get_session_id is as follows,
DATA: OPCODE_GET_SESSION_ID   LIKE TH_OPCODE VALUE 68.
session_id is of TYPE THFB_SESSION_ID (not there in 46C)
but is of CHAR32 length..
id_len is TYPE i.
you get back session_id and id_len..
Hope this helps..
Sri

Similar Messages

  • In internal sessions sap memory will not use {export to...} statment

    SAP memory does not use "Export tou2026" statement for internal sessions

    hi,
    ABAP memory
    Within the same internal session
    SAP memory
    Across internal sessions
    IN SAP MEMORY
    SET PARAMETER ID <pid> FIELD <f>.-     Writes the contents of the field f to the global SAP memory under the key pid . If the key already contains a value, it is overwritten. 
    GET PARAMETER ID <pid> FIELD <f>.-     Transfers the value stored under the key pid from the global user-related SAP memory to the field f .
    IN ABAP memory
    EXPORT obj1 ... objn TO MEMORY.
    IMPORT f itab FROM MEMORY.
    hope it may help you.
    Thanks
    Sachin

  • PSADELETE process failure due to Internal Session Terminated.

    Hi,
    We have a PSADELETE process in Process chain which failed because of Internal Session Terminated error.
    Now when i am trying to Repeat the process it is giving message Cannot activate job BI_PROCESS_PSADELETE (return code 8)
    and the process is not starting again.
    Please guide me the solution.
    Thanks
    Singh

    Can you check for more details in SM37 for the cancelled job log .
    Do you have authorization to run 'repeat step ' ?
    or display psadelete variant - identify the infopack/psa tables->  u can delete manually psa requests
    Edited by: Srinivas on Jul 18, 2010 5:22 PM

  • Classnotfoundexception weblogic.servlet.internal.session.WebLogicSPIFactory

    hi all, it seems that there is not any error in classpath but while deploying the application it says:classnot found exception:weblogic.servlet.internal.session.WebLogicSPIFactory. i have a shared library for this WebLogicSPIFactory class.moreover i added the jar that contains this class into the classpath but it still says "class not found exception"
    please help.

    Hiya,
    Did you manage to fix this problem. I read somwhere is actually a bug in weblogic 610sp2 but 610sp3 has a fix for it. Please confirm.

  • Delete the internal sessions created in the report program

    Hi,
    I have problem when a user defined transaction is called for many times from a report program. My program uses call transaction method to call a user-defined transaction for many times, i get a error like 'Maximum number of internal sessions reached' when the number of  internal sessions created exceeds 6 . Please let me know whether there is any way to close/delete the previous internal sessions that are created through the program.
    Please help me to solve this problem.
    Thanks in Advance,
    Prabavathi

    Hi prabhavathi,
    1. If a new window is opened then, by default, we can have atmost
        six sessions.
      (This can be increased by basis team)
    2. I just tried, from a program, 
       using call transaction 10 times.
      But the first one is executed, and when we come out of it,
      only then the second one gets executed.
      Its remaining in only one window/session.
    regards,
    amit m.

  • How to pass data from one internal session to another internal session

    hi all sap experts ,
    How to pass data from one internal session to another internal session and from oneExternal session to another external session.
    Except : Import and Export parameters and SPA/GPA parameters.
    Tell me the otherWay to pass data ..
    Plz
    Thanks in advance

    hi,
      abap memory management u will understand about this concept.
    the import /export parameter will help u that passing data between two internal sessions by using abap memory.
      for syntax
    Passing Data Between Programs
    There are two ways of passing data to a called program:
    Passing Data Using Internal Memory Areas
    There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
    SAP Memory
    SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens (see below).
    ABAP Memory
    ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse. For further information, refer to Data Clusters in ABAP Memory.
    Filling Input Fields on an Initial Screen
    Most programs that you call from other programs have their own initial screen that the user must fill with values. For an executable program, this is normally the selection screen. The SUBMIT statement has a series of additions that you can use to fill the input fields of the called program:
    Filling the Selection Screen of a Called Program
    You cannot fill the input fields of a screen using additions in the calling statement. Instead, you can use SPA/GPA parameters. For further information, refer to Filling an Initial Screen Using SPA/GPA Parameters.
    Message was edited by:
            sunil kumar
    Message was edited by:
            sunil kumar

  • How to pass data from one internal session to another

    Hi SAP Experts,
    How to pass data from one internal session to another and from One external session to another external session. I used import and export parmeter and SPA/GPA parameters. What is the other way to pass data?
    Please tel me urgently
    Thank you
    Basu

    Memory Structures of an ABAP Program
    In the Overview of the R/3 Basis System you have seen that each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
    The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
    Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
    The memory area of each session contains an area called ABAP memory. ABAP memory is available to all internal sessions. ABAP programs can use the EXPORT and IMPORT statements to access it. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    All ABAP programs can also access the SAP memory. This is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters are often used to preassign values to input fields. You can set them individually for users, or globally according to the flow of an application program. SAP memory is the only connection between the different sessions within a SAPgui.
    The following diagram shows how an application program accesses the different areas within shared memory:
    In the diagram, an ABAP program is active in the second internal session of the first main session. It can access the memory of its own internal session, ABAP memory and SAP memory. The program in the first internal session has called the program which is currently active, and its own data is currently inactive on the stack. If the program currently active calls another program but will itself carry on once that program has finished running, the new program will be activated in a third internal session.
    Data Clusters in ABAP Memory
    You can store data clusters in ABAP memory. ABAP memory is a memory area within the internal session (roll area) of an ABAP program and any other program called from it using CALL TRANSACTION or SUBMIT.
    ABAP memory is independent of the ABAP program or program module from which it was generated. In other words, an object saved in ABAP memory can be read from any other ABAP program in the same call chain. ABAP memory is not the same as the cross-transaction global SAP memory. For further information, refer to Passing Data Between Programs.
    This allows you to pass data from one module to another over several levels of the program hierarchy. For example, you can pass data
    From an executable program (report) to another executable program called using SUBMIT.
    From a transaction to an executable program (report).
    Between dialog modules.
    From a program to a function module.
    and so on.
    The contents of the memory are released when you leave the transaction.
    To save data objects in ABAP memory, use the statement EXPORT TO MEMORY.
    Saving Data Objects in Memory
    To read data objects from memory, use the statement IMPORT FROM MEMORY.
    Reading Data Objects from Memory
    To delete data clusters from memory, use the statement FREE MEMORY.
    Deleting Data Clusters from Memory
    please read this which provide more idea about memory
    Message was edited by:
            sunil kumar

  • Which abap statements will start new internal session in the same external

    hi
    which abap statements will start new internal session in the same external

    Hi,
    Generally, the statements SUBMIT and CALL TRANSACTION would create internal session within another.
    However, the addition 'AND RETURN' should be specified upon using SUBMIT statement else without the addition, the internal session will be overwritten with the new program called by using SUBMIT.
    LEAVE TO TRANSACTION also will overwrite the current internal session with the new transaction code.
    Cheers,
    Venkat
    P.S: Kindly reward points for useful answers

  • Regarding Internal Session Termination

    Hi Friends,
    I have to end a particular internal session (Planning Area in my case) of the other user  after a specific time,  who is in change mode through a background job.If I use the function module u201CTH_DELETE_USERu201D,it is closing all the sessions of that user.But my requirement is to close only u2018SDPu2019 session without closing others.How can I do this?
    I tried to delete  based on mode number  using function module u201CTH_DELETE_MODEu201D,but each time mode number  is getting changed based on the sessions opened, so I am not  even able to use thatu2026.Please suggest me any function module or bapi which meets the requirementu2026
    Thanks in advance u2026u2026

    Hi,
    check fm : TH_USER_LIST.
    Check this sample code provided in 1 forum.
    DATA: USRTAB LIKE UINFO OCCURS 1 WITH HEADER LINE,
    MODE TYPE I,
    OPCODE TYPE X.
    CALL FUNCTION 'THUSRINFO'
    TABLES
    USR_TABL = USRTAB.
    LOOP AT USRTAB WHERE BNAME = SY-UNAME.
    IF USRTAB-TCODE = 'ME23'.
    OPCODE = 25.
    CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE
    ID 'TID' FIELD USRTAB-TID.
    ENDIF.
    ENDLOOP.
    Hope this helps to solve ur issue.
    Thanks & regards.

  • Error Message-"Maximum number of internal sessions reached"

    Hi,
       In one of the User defined screen , we are getting error as
    "Maximum number of internal sessions reached".
       This error is not coming each & every time.This screen is used to store the values in Z-table.
       This error is coming after entering 6-9 entries.  
       What may be the problem.
       The code is as follows :
       when 'save'.
            INSERT zmmt001_grn_gate FROM wk_zmmt01.
            INSERT zmmt002_grn_item FROM TABLE it_zmmt02.
            IF sy-subrc EQ 0.
              COMMIT WORK.
              MESSAGE I002 WITH wk_sno.
              CLEAR wk_lifnr.
              CLEAR wk_ebeln.
              CLEAR wk_name.
              CLEAR wk_appval.
              CLEAR wk_chal.
              CLEAR wk_form38.
              REFRESH it_temp_tc1 .
              CALL TRANSACTION 'ZMMI001'.
            ELSE.
              ROLLBACK WORK.
              MESSAGE e000 WITH text-006.
            ENDIF.
      Whether CALL TRANSACTION 'ZMMI001' statement having problem..
      Pls give your suggestion on this.
    Thanks in Advance,
    Best Regards,
    Pavan.

    Hi
    I agree on the reason of the problem, too. SAP limits the number of internal sessions. By calling the transaction with <b>"CALL TRANSACTION ..."</b> statement, you keep the current transaction's program data and open a new internal session. To handle things technically, SAP forces an internal session number limit.
    The solution is to use <b>"LEAVE TO TRANSACTION ..."</b> which ends the current transaction session, rolls out the relevant program and then opens the new session.
    *--Serdar
    [email protected]

  • Error at weblogic.servlet.internal.session.SessionData. init

              I am using weblogic server 6.1sp2 , weblogic can start sucessful , and can work for
              a moment , but after some minutes , error occured:
              java.lang.NullPointerException
              at weblogic.servlet.internal.session.SessionData.<init>
              at weblogic.servlet.internal.session.MemorySessionData.<init>
              I have been distressed about this for serval days , need your help much.
              thanks.
              

    Since the line numbers are not there in your stack trace and there is very
              little info
              I am not 100% sure what the problem is. But my guess is that this is the
              same
              problem as reported in a bug#CR064294. Please ask support for a one off
              patch
              for this with this CR# as reference. If that doesn't solve the problem let
              us know.
              The fix for CR064294 will be available with 610 SP3.
              Thanks,
              --Vinod.
              "chun_lin" <[email protected]> wrote in message
              news:3cce1b2f$[email protected]..
              >
              > I am using weblogic server 6.1sp2 , weblogic can start sucessful , and can
              work for
              > a moment , but after some minutes , error occured:
              > java.lang.NullPointerException
              > at weblogic.servlet.internal.session.SessionData.<init>
              > at weblogic.servlet.internal.session.MemorySessionData.<init>
              >
              >
              > I have been distressed about this for serval days , need your help much.
              > thanks.
              >
              

  • Internal Session Creation.

    How can I create an internal session?

    Hi,
    actually u can create upto 9 sessions in sap
    if u type /n and tcode in command field then it will be in  current session if u want ot openn a new session then type /o and tcode then it will open another session.
    in bdc  if u want to open another session then u have call another bdc_open_group fm
    You can not open more than 6 sessions. May be basis people may help you, contact with them.
    Regards

  • Internal Session ID.

    Hi, Is there any System Fields like Sy-(something) that i can call to know the Internal Session ID of the current session?

    see this structure: SYST
    ABAP System Fields
    MODNO     SYMODNO     INT4     10     0     Index of External Session
    BATCH     SYBATCH     CHAR     1     0     Program is running in the background
    BINPT     SYBINPT     CHAR     1     0     Program Running Under Batch Input
    Message was edited by:
            Karthikeyan Pandurangan

  • DTP run Time Error : Dump: Internal session terminated with a runtime error

    Hi Experts,
    I'm facing a problem during loading data from PSA to DSO from DTP. It gives Dump: "Internal session terminated with a runtime error".
    When i went to PSA and see the no. of data packages, it is 1532.
    Could anybody please help me how to load the data.
    Thanks
    Ajay

    Thanks Srini!!
    the load is running for 15 min and then it is throwing dump without a single package extract.
    Ok...the same I'm also thinking to selective upload but can you please explain me how do i do that as it has only request in PSA.
    and it is a pricing data.
    Thanks
    Ajay

  • Internal session terminated with a runtime error(ITAB_DUPLICATE_KEY)

    Hi All,
    Process Chain is failing While loading data from ODS to Cube iam getting error in DTP level internal session terminated with a runtime error(ITAB_DUPLICATE_KEY).Here my source is CRM.
    Can you please suggest me for this issue.
    Thanks,
    Mahes.

    hi Maheesh,
    Runtime Error ITAB_DUPLICATE _KEY is resulted because of Duplicate Transfer Structures from different Logical Systems.
    You can find the corresponding entries in the table RSISOSMAP ..On executing,we have the option to give the InfoSource name(ISOURCE) for wich the data load got failed with Runtime Error ITAB_DUPLICATE_KEY..
    You can coreect this error by running the Program RSAR_RSISOSMAP_REPAIR in repair mode , the program first checks the RSISOSMAP table and corrects any incorrect entries found. A log is then written for the mappings that were corrected.
    This will solve your problem.
    Please refer to link mention in above thread for more detail i have just summarize the things :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a04c82eb-ec7c-2c10-7fae-ca6e764c483a?QuickLink=index&overridelayout=true
    Thanks,
    Deepak

Maybe you are looking for

  • Vendor Ageing Report in SAP B1 8.8 Version

    Hi All,           I am using SAP B1 8.8 Version.          I have generated Vendor Ageing Report for all Vendors. In this report I found few vendors are appearing multiple times with different Ageing values. I wanted to know why this happend??? Please

  • Setting recurring events in calendar

    I have an I phone 4. I am trying to set recurring meetings that occur for example; on the second Wednesday of every month. On the repeat selection, there is no option for that. I find this very odd as many professionals have recurring events and meet

  • Help Required with an OUTER JOIN Query

    Hi, I need a list of records carrying UserID and ALL SectionIDs and SectionTitles he/she is associated with so I created following query: SELECT UsersSections.UserID, Sections.SectionID, Sections.SectionTitle FROM UsersSections, Sections WHERE UsersS

  • Getting Warning while assigning Dimension in to Model in version 10.0

    Hi, Iam getting an warning message "Control definition not valid because new Dimension are added in to Model" & "Control result was reset because new Dimension are added in to Model" while assigning Dimensions to the Model. Please help me on this iss

  • Digital certificate server

    hi, We want to set up the x.509 certificate issuing server on windows 2000. So how to proceed for it? Can anyone help me out? It's urgent please......... thanks in advance.