Age: 46 Joined: 05 Nov 2007 Posts: 725 Location: КраснАдар
Posted: Fri Dec 07, 2007 5:01 pm Post subject:
Начну:
1) по использованию ФМ - однозначно ответить нельзя, зависит как и откуда вызываются. В общем виде - если надо проинициализировать глобальные переменные в группе функций (при условии что написанного деструктора не существует) - то использовать ASSIGN и чистить, чистить и чистить.
2) по ABAP memory (памяти на клиенте) - не забывать очищать SPA/GPA параметры после их использования
3) по SAP memory (глобальной системной памяти) - кроме FREE MEMORY ID ничего не знаю.
Резюме: ничего нового относительно ABAP-справки не написал, будем ждать новых ответов.
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.
2) Вся ABAP memory полностью чистится FREE MEMORY без ID.
Code:
DATA: lifnr TYPE lifnr.
lifnr = '777'.
EXPORT lifnr TO MEMORY ID 'Z_LIFNR'.
WRITE: / 'lifnr=', lifnr.
CLEAR lifnr.
WRITE: / 'lifnr=', lifnr.
IMPORT lifnr FROM MEMORY ID 'Z_LIFNR'.
WRITE: / 'lifnr=', lifnr.
FREE MEMORY.
CLEAR lifnr.
IMPORT lifnr FROM MEMORY ID 'Z_LIFNR'.
WRITE: / 'lifnr=', lifnr.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.