2013 Sep 16 7:36 AM
Dear All,
Could anybody please tell me ,How to free SAP memory for below scenario?
Scenario.
I have created one custom Tab screen including 6 customized fields in Tcode: BP as inside BP there are 3 push buttons for creating business partner (like Person, Organisation and Group) ,
I'm passing the parameters values from BADI to customize screen(PBO) using set parameter and getting parameters values for those customized fields using SAP memory parameters for business partner (After clicking on person)
But after saving business partner person when I'm trying to create business partner (Organisation click on org push button) at that time old values persist under customize tab .
Here ,I want to ask , how to free sap memory after saving records for one option like(person) and old value should't display when I create organisation.
Please find more datails as an attachment and give me reply asap that would be helpful.
Regards,
Alok
2013 Sep 16 8:11 AM
Try this.
Suppose zorg is your organization field and 'ORG' the parameter ID.
data: zorg type org.
* after getting values from ID
clear zorg.
set parameter ID 'ORG' field zorg.
Another option
DATA PERNR_C TYPE STRING.
SET PARAMETER ID ’PERNR’ FIELD PERNR_C
GET PARAMETER ID ’PERNR_C field pernr_C.
FREE MEMORY ID ’ PERNR_C’.
OR
DELETE FROM MEMORY ID ’PERNR_C’
OR
SET PARAMETER ID ’PERNR_C’ FIELD SPACE
Try this.
Suppose zorg is your organization field and 'ORG' the parameter ID.
data: zorg type org.
* after getting values from ID
clear zorg.
set parameter ID 'ORG' field zorg.
Another option
DATA PERNR_C TYPE STRING.
SET PARAMETER ID ’PERNR’ FIELD PERNR_C
GET PARAMETER ID ’PERNR_C field pernr_C.
FREE MEMORY ID ’ PERNR_C’.
OR
DELETE FROM MEMORY ID ’PERNR_C’
OR
SET PARAMETER ID ’PERNR_C’ FIELD SPACE
2013 Sep 16 8:11 AM
Try this.
Suppose zorg is your organization field and 'ORG' the parameter ID.
data: zorg type org.
* after getting values from ID
clear zorg.
set parameter ID 'ORG' field zorg.
Another option
DATA PERNR_C TYPE STRING.
SET PARAMETER ID ’PERNR’ FIELD PERNR_C
GET PARAMETER ID ’PERNR_C field pernr_C.
FREE MEMORY ID ’ PERNR_C’.
OR
DELETE FROM MEMORY ID ’PERNR_C’
OR
SET PARAMETER ID ’PERNR_C’ FIELD SPACE
2013 Sep 16 8:12 AM
Hi Alok,
You can SET PARAMETER ID as SPACE for fields or parameter that effects, in PAI for every push button. That means initially you set parameter ID as Space and then write your business logic for each push button.
Thanks & Regards,
-Vijay
2013 Sep 16 8:26 AM
Hi Alok,
We can make use of FREE key word. Please looking Free Keyword documentation.
Regards,
Venkat.
2013 Sep 16 11:11 AM
Hi venkat ,
I've used free keyword but it's not working and but we use tcode ; bug2 and come back to BP screen again at that time I see , data is not present in customize screen so what is the cause , sometimes memory free and sometimes for new option it shows old values from buffer .
2013 Sep 16 11:42 AM
Hi,
Please try below code and let me know.
DELETE FROM SHARED MEMORY indx(pt) ID 'ZMID' - or
DELETE FROM SHARED BUFFER indx(pt) ID 'ZMID'.
Best Regards,
Abirami
2013 Sep 16 1:15 PM
Hi Abirami,
Still, It's not working .As I'm able to create business partner (person) and save then after I go for organisation (click on push button) again I see old values under customized tab in SAP transaction BP.
Regards,
Alok
2013 Sep 16 1:22 PM
As already written you have to clear memory with FREE or SET to space. But not only your own memory id (the one exported in BAdI) but also the standard memory ids used by BP transaction (BPA, etc.) Also insure that your custom code for custom tab manages correctly the GET MEMORY ID, and clear/refresh data if the GET MEMORY fails.
Regards,
Rayond
2013 Sep 16 2:50 PM
Hi Sushmitha/Raymond,
Earlier I've used free or space memory in our program but it was not working that's I had asked that how can we free memory after saving record .
regards,
alok
2013 Sep 17 6:30 AM
Hi Alok,
Please let me know at which block you are trying to get the paramter id.
If you have used 'get parameter id' at initialization, just remove it and try placing 'get paramter id' in AT SELECTION-SCREEN output.
For Ex:
PARAMETERS: P_EBELN LIKE EKKO-EBELN MEMORY ID EBS.
AT SELECTION-SCREEN OUTPUT.
GET PARAMETER ID 'BES' FIELD P_EBELN.
START-OF-SELECTION.
P_EBELN = P_EBELN + 1.
SET PARAMETER ID 'EBS' FIELD P_EBELN.
WRITE: / P_EBELN.
Best Regards,
Abirami
2013 Sep 17 7:39 AM
HI Abirami ,
I'm passing parameter from one ADDRESS badi to Screen exit for customize scree BP .
Please find below code on this.
2013 Sep 17 10:37 AM
Hi,
Did u try SET PARAMETER ID 'LAT' FIELD SPACE.
It helps to delete SAP memory ID.
Best Regards,
Abirami
2013 Sep 17 1:15 PM
Hi ,
Yes ,I had also used SET PARAMETER ID 'LAT' FIELD SPACE. but it did't work.
Regards,
Alok
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |