Closing sap session
Hi all i have got a slight problem when closing an SAP session from an BSP(MVC). I am currently using navigation->goto_page( 'main.do?sap-sessioncmd=close' ), which works when i call my BSP using a GET method form:
<FORM name=form1 action=https://www.not_real_url/main.do method=GET target="_blank"> ... </FORM>
But when i use a POST method form it just does not seem to close the session:
<FORM name=form1 action=https://www.not_real_url/main.do method=POST target="_blank"> ... </FORM>
Has anyone got any ideas?
Regards
Mart
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<script language="JavaScript">
function exitBSPApplication()
<% CLASS cl_bsp_login_application DEFINITION LOAD. %>
var EXIT_URL = "<%= CL_BSP_LOGIN_APPLICATION=>GET_SESSIONEXIT_URL( page = page ) %>";
EXIT_URL += "&bsp_do_not_delete_sso2_cookie=X";
alert(EXIT_URL);
self.location.href=EXIT_URL;
window.open(EXIT_URL);
</script>
<form name="frmmenu" method="post">
<table width="760" border="0" cellspacing="0" cellpadding="0">
<tr><td>
<input type=submit name="pributton" value="exit" alt="Click here to Print" onClick="Javascript:exitBSPApplication()">
</td></tr>
</table>
</form>
It works for me.<b> Create a new BSP Page with the above code and test.
Rgds,
Jothi.
Similar Messages
-
Logoff BSP closing application and closing SAP session.
When I'm closing my BSP appication by closing browser ,SAP session are not ending.I need to implement logoff functionality into my BSP application.
Please send me some sample code for logoff from BSP.Use this..it worked for me.
Restart of BSP test application IT00 use sap-sessioncmd=open:
Example:
http://myServer.sap.corp:1080/sap/bc/bsp/sap/it00?sap-sessioncmd=open
Ending the application externally:
Example:
http://myServer.sap.corp:1080/sap/bc/bsp/sap/it00?sap-sessioncmd=close&sap-exiturl=http%3a%2f%2fwww.sap.com -
Change Mode terminates All SAP sessions
I am having a strange and Irritating Issue.
SAP sessions are getting closed , Whenever I get into change mode of some transaction
It happened in SE38 and SE12.Some times it is not working for display.
I tried to view a report in display mode but it closes all Sap sessions
I am not able to continue with any development work.
Plz advice.....
Thanks,
AJR
Edited by: A J Raj on Sep 17, 2009 6:29 PM
Edited by: A J Raj on Sep 18, 2009 2:16 PMWhat SAP GUI version and patch level are you using? Check for SAP note with this version and there could be a note for this to fix. Otherwise, update GUI patchlevel.
-
Reading a document from application server / opening in SAP session
Hi guys,
we have a requirment has follows , please help me with your inputs.
We have list of documents available in the DMS server....(XLS,DOC,PDF)
1. How to get the list of file names ( available in the DMS server ) into the internal table.
2. i need to open these documents by clicking - into the same sap session itself. (it should not open in windows)
Please Note : Many of our forum friends earlier to open the file in windows.
regards
GiriHi,
You can show any doc that is uploaded in DMS using the URL of the doc . the doc will be shown in a container. You can refer the std prog . SAPRDEMOPIVOTINTERFACE.. or some thg like that ( i dont remember the exact name ) .
You need to pass the Class name . object type and object name to find the URL. Check transaction OAER and enter class as SSOFFICEINTEGRATION , type as OT and name as SSOFFICEINTEGRATION.
Hope this helps. -
Transaction iView(from remote source) does not open a new SAP session
Hi All,
We are on portal 7.4 and are calling a transaction from ECC system. Within the transaction we have a button which displays graphs based on the output of the transaction. Since we are calling this transaction from portal, a new session does not open after clicking on this button.
In order to enable a new session, I have changed the configuration for 'disable new session buttons in SAP GUI' to false yet the new SAP session does not open. I have also verified the webgui setting and ensured that we do not have '~singletransaction' maintained, yet we are unable to enable the new session. Could you kindly suggest on how I can get this button to function?
Additional inputs:
- Referred to note 125814 for changing the new sessions value.
- Tried changing the iview type to 'SAP GUI for window' from SAP HTML type(which was default).
- In case I type '/o' in the command box for SAP, it gives me a 'maximum sessions reached' message, but this message does not come when I click on this button. In fact, nothing happens after I click on the button.
I still think there might be a possibility to enable this, however, I seek your inputs on this.
Awaiting response...
Warm Regards,
VinayHi Harini,
thanks for your answer!
I can tell you that the same command used from the SAP Client open a new session with the same transaction...
Is strange that from the portal it has a different behaviour...
Best Regards -
Introduction of Bebo, a control pad for SAP sessions
Hello community,
Bebo for is a small utility to watch, navigate and control all SAP sessions of the SAP GUI for Windows. Bebo is an acronym, in long description it means Best Boy. A Best Boy is the first assistant of the lighting technician in movie production, he do all the technical work - like Bebo. With Bebo you see all sessions, which supports SAP GUI scripting, clearly arranged in a tree. Also you can direct execute a transaction or a script to one of these sessions. The available transaction codes, scripts or other actions are an easy and individual customizing in a preference file. So you can organize your favorite activities in a tree as you want - one time for all application servers. Also you see in a collection list all other sessions.
With a simple click in the session tree or collection list you can choose the session you want and it is direct on top of all the open windows. If you click the right mouse button, it opens a popup menu and you can close the session or the connection, or you can resize the session window or or or ... And with a simple double click in the transaction tree you send a transaction code or a script to the selected session from the session tree. With the possibilities of the toolbar you can e.g. minimze all sessions with one single click, or restore it. Bebo helps you in the jungle of sessions and connections - it is a point of view.
Bebo is freeware and you find it [here|http://www.stschnell.de/bebo.htm]. Suggestions and comments are welcome.
Cheers
StefanDear Aditya,
You may not be shame of what you seen in the wizard,because that code is not written by a single abaper and the cutomised that you have developed is what may a single abaper can do.SAP has given all flexibility to fulfill the Business Requirements,after all SAP is also a Product.As the technology is growing the amount of work increases .In order to make reduce redudant code throught SAP .It has given all the wizards to help a Abaper to complete the work with less time.
Regards,
Amit Teja -
Load a new SAP session on the same screen without leaving it.
Hi,
I went through demo DEMO_ABAP_OBJECTS_SPLIT_SCREEN and really it is meet my business requirements especially when double clicking one node it is navigate to the proper website. the only thing I need is instead of calling the airline website I want to load an SAP session on the same screen with leaving it.
Please, I appreciate your help on this.
Thanks, Thoram...I am sure this can be done. I am a newbie so I have not performed this type of task before. You can try this in your sandbox environment first. The databse and its connection information for ABAP stack is in the DEFAULT.PFL. ABAP uses windows authentication to connect to SQL Server.
1) Stop the SAP instances running in the server.
2) Make a backup of the databse you want to move to another instance.
3) Restore the backed up database in your new instance.
4) Make changes to the following entries in the default.PFL of the <SID>.Also check these entries in the instance profile (<SID>_DVEBMGS01_<server_name>) to make sure nothing is overwritten from the DEFAULT.PFL
dbs/mss/server = <server_name\instance>
dbs/mss/dbname = <SID>
dbs/mss/schema = <six>
j2ee/dbtype = mss
j2ee/dbhost = <server_name\instance>
j2ee/dbname = <SID>
If you use JAVA AS also then launch the configtool.bat and click on "Secure Store" and change "jdbc/pool/<SID>/Url" to include the instance name i.e. "jdbc:nwmss:sqlserver://<sql_Server_Name>\<instance_name>;databasename=<db_name>".
I hope this helps!
RT
Message was edited by:
R.T. -
Various SAP sessions/windows on one screen
Hi Gurus.
Can anyone help me with the following.
I have been asked to explore the possibility of having various SAP sessions/windows displayed on one screen. This should work out by creating a variant or other utility that can call several transactions and display all the sessions on one screen.
For example, you can have the following transactions SM04, SM66, SM37 & ST02 being called from one variant and display all the 4 sessions in one screen.
Is this possible or can it be achieved.
Points will be awarded.nobody?
-
Hi,
We migrated our ISR services to Integrated ITS. ISR has a main service QISR from which we can call the required services. The new service is opened in a new window. All the services called from QISR are custom services. These custom services have their own HTML templates and Java Script (JS).
Earlier on Standalone ITS if we choose "Quit" from the main QISR, along with the main QISR session all the sessions of the subsequent services gets closed.
This is not happening in Integrated ITS. If I quit the main QISR service, only the main QISR session gets closed. All the sessions of subsequent services still hang around. (I can see them in SM04)
These custom services doesnt have the "Quit" option within them. How to close these sessions on closing their browser window? Can we use the onunload event..?
I saw the thread [Close ITS-Session|Close ITS-Session] but couldnt be able to close it using JS or by different means.
Can somebody post the JS code? or any other ideas on closing the sessions?
Thanks,
Ravikanth
Edited by: Ravikanth Tunuguntla on Jan 25, 2009 3:30 PMAny ideas please?
Regards,
Ravikanth -
Hi,
Is there a way to record SAP sessions other than SAP scripting? With SAP scripting there is a server-enablement needed, is this a one time activity? Is it the same for client-enablement too?
I read an article about SAP Automation suite. But this was for older releases of SAP upto 4.6. Is it a good way to go about instead of SAP scripting?
Any help will be really appreciated!
Regards,
Suma.Hello Suma,
you might want to have a look at the SAP GUI scripting page at service market place :
http://service.sap.com/sapgui , then click on "SAP GUI Scripting" link on the left.
In particular information regarding enabling SAP GUI scripting is availalbe in the document "SAP GUI Scripting Security Guide" available from there as "Security considerations and requirements" or directly at http://service.sap.com/~sapidb/011000358700002462882002E
For information and support status of SAP Automation tools, please have a look at notes on component BC-FES-AIT and its sub components.
Hope this helps
Rolf-Martin -
Any way to share my SAP session with remote co-workers?
Hi,
if I am logged on to SAP BI, e.g. in RSA1 or In BEx Analyzer on my desktop, is there a way to allow other co-workers in different cities to share my desktop?
i.e. to see what I am doing and also take control of the mouse to make modifications all through SAP and not third party tools?
If there is an share SAP session inside SAP itself using SAP Delivered GUI functionality, can you tell me about this tool?
Is it like installing BEx Analyzer on desktop to facilitate this process?.
If one exist and you know of a step by by document to help implement it I will appreciate if could direct me to it.
In my research, I came across this link:
http://help.sap.com/saphelp_ep60sp2patch5/helpdata/en/23/dd90e0e3ee4fe282be9f3387d53394/content.htm
and
http://help.sap.com/saphelp_ep60sp2patch5/helpdata/en/28/641741b393f26fe10000000a1550b0/content.htm
but I am not sure after reviewing whether it is even the solution to my problem.
I can't find "collaboration lunch pad" on the portal.
Thanks
Edited by: AmandaBaah on May 17, 2010 7:21 PMHi,
I am running vista, and can't find Net Meeting on it.
So with Net meeting, can I share my desktop for multiple remote users to see the desktop?
what do I need to do on my end and what do they need on their end?
Is it for free? With Teamviewer it is only free for personal use.
I tried your path:
windows ->run ->conf
but it opned up a diagou box for Backup.
Thanks -
How to change SAP session time?
Hi,
We have 3 shift: 7.00am (2nd shift), 3.00pm (3rd shift) and 11.00pm (1st shift). And whenever we have customize programs which auto determine the shift defination, example when 11.00pm, system will auto default to 1st shift, we have issue on testing the cross shift scenario.
Is there a way to change the SAP session time, lets say from 02.00pm (current time) to 10.55pm for testing the cross shift determination without affected any other process? Then after testing, we change the SAP session time again back to normal.
Kindly please advise. Thank you.hi
you cannot change the system timing. -
Call a new SAP session within a subscreen area.
Hi,
I will really appreciate your help on this.
How could I call a new SAP session (other transaction or whatever) within a sub screen area?
Many thanks.Hi Lezarazo,
http://help.sap.com/saphelp_46c/helpdata/en/73/69eba655bb11d189680000e829fbbd/content.htm
If you need to have functionality where you can kick off a transaction in another window then do the followingu2026.
To call the function:
The Structure: ZSE_ITAB
with FIELD CHAR40 and VALUE CHAR40
DATA: itab_fields type STANDARD TABLE OF ZSE_ITAB,
wa_field type ZSE_ITAB. wa_field-field = 'BELNR'.
wa_field-value = t_invoice.
APPEND wa_field TO itab_fields.
CALL FUNCTION 'Z_CALL_TRANSACTION_SESS'
STARTING NEW TASK 'TA'
EXPORTING
tcode = 'VF03'
skip = 'X'
TABLES
itab_data = itab_fields
EXCEPTIONS
no_transaction = 1
OTHERS = 2.
Function Module Defined: Must be a remotely enabled function module
Its just the same procedure as of ordinary Function module, but in the Attributes Tab, under Processing Type you have to select Remote-Enabled Module instead of Normal Function Module.
Example :
FUNCTION z_call_transaction_sess.
*"*"Local Interface:
*" IMPORTING
*" VALUE(TCODE) TYPE TCODE
*" VALUE(SKIP) TYPE FLAG OPTIONAL
*" TABLES
*" ITAB_DATA STRUCTURE ZSE_ITAB OPTIONAL
*" EXCEPTIONS
*" NO_TRANSACTION
The additional info about calling transactions can be found in the following link
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9da935c111d1829f0000e829fbfe/content.htm
or Lezarazo you can create your own zfunction module call that function module in your program using the CALL TRANSACTION Statement inside a Remote-Enabled Function Module and then using the STARTING NEW TASK addition while calling the Function Module.
Hope this helps,
Revert for further clarification.
Thanks and Regards
Srikanth.P -
All SAP session terminating while accessing RSA1
Hi All,
All sap sessions terminating while accessing RSA1 transaction, i can access other t-codes other than RSA1 if i am entering RSA1 all R3 Session including the BW session is terminating ...
Please help...
ThanksHi Peter,
Even some time back i have faced the issue when ever i click on dislplay infocube or Transfer rulesor DSO
The session used to terminate
After investigation i found it is authorization issue
ask you security team to investigate on this like switching on the trace and find what object is missing
and also try with T-codes like RSA11,RSA12,RSA14,RSA15 instead trying RSA1 Directely
these are individual transactions for each screen in RSA1 like
infoarea,infoobject...
hope this helps you....
thank
kishore -
VB SCript Not recognizing the open SAP session
Friends really need help here
this is the code i have
Sub StartTransaction(SapGuiAuto, Connection, session)
' Dim SapGuiAuto As Object
Dim i As Long
i = 1
' There may be bad entries in the ROT from previous crashes
While i < 10 And SapGuiAuto Is Nothing
i = i + 1
On Error Resume Next
Set SapGuiAuto = GetObject("SAPGUI")
On Error GoTo 0
Wend
If SapGuiAuto Is Nothing Then
MsgBox "Could not connect to SAPlogon process. Did you start it?", vbOKOnly Or vbCritical
End
End If
On Error Resume Next
Set SAPApplication = SapGuiAuto.GetScriptingEngine
Set SapGuiAuto = Nothing
On Error GoTo 0
If SAPApplication Is Nothing Then
MsgBox "Could not access GuiApplication. Maybe Scripting is disabled?", vbOKOnly Or vbCritical
End
End If
Set Connection = SAPApplication.Children(0)
Set session = Connection.Children(0)
End Sub
Even though i have multiple sap sessions open, it fails at
Set session = Connection.Children(0)
Any help is appreciatedHello.
Below code list all available SAP sessions in a messagebox (EXCEL VBA). You Need to reference SAPFEWSE.OCX in VBA Editor. This can be found in your program Folder for SAPGUI.
Sub List_SAP_Sessions()
Dim SapGuiAuto As Object
Dim i As Integer
Dim iSession As Long
Dim SAP_APP As Object
Dim Connection As SAPFEWSELib.GuiConnection
Dim Session As SAPFEWSELib.GuiSession
Dim strMSG As String
Dim strSessions$
i = 1
' There may be bad entries in the ROT from previous crashes
While i < 10 And SapGuiAuto Is Nothing
i = i + 1
On Error Resume Next
Set SapGuiAuto = GetObject("SAPGUI")
On Error GoTo 0
Wend
If SapGuiAuto Is Nothing Then
MsgBox "Could not connect to SAPlogon process. Did you start it?"
Exit Sub
End If
On Error Resume Next
Set SAP_APP = SapGuiAuto.GetScriptingEngine
Set SapGuiAuto = Nothing
On Error GoTo 0
If SAP_APP Is Nothing Then
MsgBox "Could not access GuiApplication. Maybe Scripting is disabled?"
Exit Sub
End If
Set SapGuiAuto = Nothing
iSession = 0
For Each Connection In SAP_APP.Children
If Not Connection.DisabledByServer Then
For Each Session In Connection.Children
If Session.Busy = False Then
iSession = iSession + 1
strMSG = strMSG & (Session.Info.SystemName & " (" & CStr(Session.Info.SessionNumber) & ") (" & Session.Info.Client & ") | User: " & Session.Info.User & " | Transaction: " & Session.Info.Transaction & " | Session ID: " & Session.ID) & vbCrLf & vbCrLf
End If
Next
End If
Next
strMSG = strMSG & vbCrLf & "Sessions counted: " & iSession
MsgBox strMSG, vbInformation + vbOKOnly, "Information"
End Sub
You can use a similar code to connect to a specific session by using Sesssion.ID. I have written an function for my EXCEL VBA template for this requirement:
Public Function objSession(strSessionID As String) As Object
Dim SapGuiAuto As Object
Dim SAP_APP As Object
Dim i As Integer
Dim bConnect As Boolean
Dim Connection As SAPFEWSELib.GuiConnection
Dim Session As SAPFEWSELib.GuiSession
Set objSession = Nothing
i = 1
' There may be bad entries in the ROT from previous crashes
While i < 10 And SapGuiAuto Is Nothing
i = i + 1
On Error Resume Next
Set SapGuiAuto = GetObject("SAPGUI")
On Error GoTo 0
Wend
If SapGuiAuto Is Nothing Then
MsgBox "Please start SAPlogon"
Exit Function
End If
On Error Resume Next
Set SAP_APP = SapGuiAuto.GetScriptingEngine
Set SapGuiAuto = Nothing
On Error GoTo 0
If SAP_APP Is Nothing Then
MsgBox "Scripting disabled"
Exit Function
End If
Set SapGuiAuto = Nothing
For Each Connection In SAP_APP.Children
If Not Connection.DisabledByServer Then
For Each Session In Connection.Children
If Session.Busy = False Then
If Session.ID = strSessionID Then
Set objSession = Session
locSessionHandle = Session.FindById("wnd[0]").Handle
bConnect = True
Exit For
End If
End If
Next
End If
If bConnect = True Then Exit For
Next
End Function
Hope this Support you to find root cause for your issue.
Best regards,
Holger
Maybe you are looking for
-
Centralized purchase organization
Dear All, we have the scenario that one centralized purchase orgnaization is there which is responsible for the negotiation with vendor so after negotiation with vendor they will create the contract and this can be used by other purchase orgnizatio
-
When I upgraded to the latest Firefox on my Windows 7 PC , I get a 7-Zip Error Box stating " The System cannot find the file specified". This happens approximately two thirds into the installation. I have tried turning the Virus checker off and re-in
-
Hi, Do we have a FM to check if current date is in between two dates? rgds Praveen
-
Powerbook had to shut down?! [USB ADSL Modem] .
Hey, My Powerbook just arrived today so I decided to try and surf on the net, so I could update my software and other stuff. But I'm having trouble with the preferences for the USB ADSL programn and after I've tried multiple times to connect to the I
-
What destroys a macbook pro battery
What destroys a macbook pro battery... my macbook only has a 4hr battery life... and i used to get 9hr