2010 Mar 30 6:47 PM
Hi folks,
I have a problem with clearing global sap memory.
I have a global internal table in a function group, when the function module of this function group is called for the second or third time from the same session, the new data i am passing, is appending to the old data without clearing the same even after clearing the global table before passing my data. This doesn't happen when i change the session.
Can someone shed some light....
Many Thanks,
Pankaj
Hi folks,
I have a problem with clearing global sap memory.
I have a global internal table in a function group, when the function module of this function group is called for the second or third time from the same session, the new data i am passing, is appending to the old data without clearing the same even after clearing the global table before passing my data. This doesn't happen when i change the session.
Can someone shed some light....
Many Thanks,
Pankaj
2010 Mar 30 7:07 PM
You can either clear the global data when you first go into the FM or you can create a separate FM in the same group which clears the global data. In this case, you would call the clearing FM and then the other one.. You would do it this way if there are situations where you want to keep the global data between sessions.
Rob
2010 Mar 30 7:09 PM
Hi,
This is not the problem. But the behaviour of SAP. When you use global internal tables, make sure that you clear all these global tables in all the FMs of the FG before using them. This should solve the issue. (I am assuming that you are talking about Z Function group).
Thanks,
Vinod.
2010 Mar 30 7:24 PM
HI ,
If this is custom function module you should first clear all the variable (Internal table, wor area, variables) declared in the TOP include. If there is more than one function module in the same function group the create one more FM only to clear the global variables likes every *_INITIALIZE FM.
If you are using the standard one you can find one more FM wth more or less similar name ending with _INITIALIZE.
If youing any bapi then you should use BAPI_TRANSACTION_COMMIT or BAP_TRANSACTION _ROLLBACK to refresh the memory.
Thanks
Subhankar
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |