07-06-2010 1:54 AM
Hi , need advice how can we kill or remove a session after i'm using call transaction (this transaction is calling a program )
Below is the logic of the program
1) Run a program - Generate a report list
2) In the Report List - Event click on the record will invoke CALL TRANSACTION to a program and generate a report list.
3) User will be back at original Report List with updated content.
IF the user keep updating the record on the report list, it will keep opening the program since i'm using Call Transaction.
Need an advice how can i remove or kill previous opened sessions.
Thanks
Appreciate you help and advice.
07-06-2010 3:36 AM
I don't fully understand what exactly you're trying to do, but here are some comments: For traditional reports you can easily see at which list output level you are by looking at [sy-lsind|http://help.sap.com/saphelp_bw/helpdata/en/9f/dba2eb35c111d1829f0000e829fbfe/content.htm]. That way you could create your own program logic based on at which list nesting level you are (e.g. disallow updating on a nested list).
Another option could be to completely avoid creating new internal sessions (should be the correct approach if you don't need to stack the calls). The [submit|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT.htm] statement without the and return addition will do that (or for that matter a [leave to transaction|http://help.sap.com/abapdocu_70/en/ABAPLEAVE_TO_TRANSACTION.htm] though that doesn't allow you to specify new parameters unless you use some export/import technique).
Cheers, harald
07-06-2010 3:36 AM
I don't fully understand what exactly you're trying to do, but here are some comments: For traditional reports you can easily see at which list output level you are by looking at [sy-lsind|http://help.sap.com/saphelp_bw/helpdata/en/9f/dba2eb35c111d1829f0000e829fbfe/content.htm]. That way you could create your own program logic based on at which list nesting level you are (e.g. disallow updating on a nested list).
Another option could be to completely avoid creating new internal sessions (should be the correct approach if you don't need to stack the calls). The [submit|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT.htm] statement without the and return addition will do that (or for that matter a [leave to transaction|http://help.sap.com/abapdocu_70/en/ABAPLEAVE_TO_TRANSACTION.htm] though that doesn't allow you to specify new parameters unless you use some export/import technique).
Cheers, harald
07-06-2010 3:57 AM
Hi Harald, thanks for your suggestion
but when i read the abap docu, it state that we cant used IMPORT and EXPORT when using leave transaction, thats is why i dont used LEAVE TO TRANSACTION since i need to pass the data to the calling program.
At the same time, the ABAP memory is deleted, which means that EXPORT FROM MEMORY or IMPORT TO MEMORY do not transfer data when using LEAVE TO TRANSACTION
07-06-2010 6:41 AM
At the same time, the ABAP memory is deleted, which means that EXPORT FROM MEMORY or IMPORT TO MEMORY do not transfer data when using LEAVE TO TRANSACTION.
Good point, though of course you can export to other [mediums|http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm], e.g. database. Note that my previous statement about avoiding creating new internal sessions was inappropriate, because basically the approach I've given would just avoid stacking/nesting internal sessions...
Anyhow, since your output is a list I kind of expected that you have an executable report with a selection screen and thus thought the submit was an easy way out. On top of that I still think the sy-lsind should provide you the means to prevent a user from endlessly nesting lists. If all this doesn't work, maybe you could describe in more detail what you're actually trying to accomplish.
07-07-2010 9:02 AM
Harald, let me try SUBMIT first, btw is submit support for module or dialog programming?
07-07-2010 10:08 AM
btw is submit support for module or dialog programming
Supports only executable type programs.
07-12-2010 11:21 AM
i had try using Submit and its works, but still the internal session limit error still happen because,
i'm using CALL TRANSACTION to dialog program from a Report.
From the Dialog Program I call the report using SUBMIT.
How can i call a dialog program with out invoke any internal session but i would like to pass a set of value.?
Thanks
07-12-2010 12:36 PM
As SAP clearly says in [Note 34154 - Maximum number of internal sessions reached|http://service.sap.com/sap/support/notes/34154], the maximum is 9 and cannot be changed. SAP also says that sometimes it happens in standard applications and can't be avoided. But that's not your case as I can see.
I repeat what Harald said, more or less.
It means that instead of call transaction, use LEAVE TO TRANSACTION or SUBMIT without AND RETURN. If you use LEAVE TO TRANSACTION, you can pass parameters using SAP memory (SET PARAMETER ID ... or GET PARAMETER ID ...), or shared memory (EXPORT TO SHARED ...), or shared objects (a little bit more complex, refer to documentation and blogs), etc.
If you use SUBMIT without AND RETURN, you can pass parameters directly using WITH.
I recommend to use SUBMIT without AND RETURN in priority as it is more simple to pass parameters.
07-14-2010 1:57 AM
Finally my question had been answered, in order for me to pass value within report (type 1) and dialog program (type m), i need to use LEAVE TO TRANSACTION and SET and GET PARAMETER. This will not invoke maximum internal session errror.
THanks guys for giving me insight and idea on this.