Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with freeing memory ID

Former Member
0 Likes
1,203

Hi all,

Am not able free memory ID in BADI.I used following statements for the same-

free memory id 'ZCAR'.

DELETE FROM MEMORY ID 'ZCAR'.

Please help.

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,169

Hi,

Try this --

FREE MEMORY ID 'ZCAR'.

Regards

Pinaki

Hi all,

Am not able free memory ID in BADI.I used following statements for the same-

free memory id 'ZCAR'.

DELETE FROM MEMORY ID 'ZCAR'.

Please help.

Thank you.

7 REPLIES 7
Read only

Former Member
0 Likes
1,169

free memory id worked for me in BADI,

Can u show the code which u have written above and below this statement.

why do u say its not getting freed does it show in debug.

кu03B1ятu03B9к

Read only

Former Member
0 Likes
1,170

Hi,

Try this --

FREE MEMORY ID 'ZCAR'.

Regards

Pinaki

Read only

0 Likes
1,169

As i see above this is what he has already tried, so why are you advising him to try it again.

кu03B1ятu03B9к

Read only

0 Likes
1,169

This is my full code for the same-

METHOD if_ex_badi_matn1~matn1_output_001.

DATA: it_zemail_mdm TYPE STANDARD TABLE OF zemail_mdm,

wa_zemail_mdm TYPE zemail_mdm.

SELECT * INTO wa_zemail_mdm

FROM zemail_mdm

WHERE user_psid = sy-uname. "OR superior_psid = sy-uname .

ENDSELECT.

IF sy-tcode = 'MM06'.

CONSTANTS : c_msg1(45) TYPE c VALUE 'You are not authorised for this transaction.'.

DATA: v_x, c_err TYPE c VALUE 'S'.

GET PARAMETER ID: 'ZCAR' FIELD v_x.

IF sy-uname = wa_zemail_mdm-user_psid AND v_x = ' '.

MESSAGE c_msg1 TYPE c_err.

LEAVE TO SCREEN 0.

ENDIF.

free memory id 'ZCAR'. "HERE IT IS

DELETE FROM MEMORY ID 'ZCAR'. "HERE IT IS

ENDIF.

ENDMETHOD.

Edited by: sanu debu on Mar 12, 2009 3:25 PM

Read only

0 Likes
1,169

Hi Sanu,

You can try to use CLEAR statement.

eg: CLEAR ZCAR.

GET PARAMETER ID 'ZCAR' FIELD v_x.

or if you are assigning a select option to a parameter, try the following piece of code,


INITIALIZATION.
GET PARAMETER ID 'ZCAR' FIELD s_zcar-low.
IF s_zcar-low NE ``.
s_zcar-option = 'EQ'.
s_zcar-sign = 'I'.
APPEND s_zcar.
ENDIF.

START-OF-SELECTION.
SET PARAMETER ID 'COMP' FIELD s_compcd-low.

Hope it helps.

Regards,

Jose

Read only

0 Likes
1,169

Hello,

From your code it is quite clear that Free memory id & delete from memory id will never going to execute at run-time.

My suggestion to you try to clear memory in your screen 0 PBO module .

Or else you want to clear in badi & try to clear before calling screen 0.

Regards,

Sameer

Read only

Former Member
0 Likes
1,169

close this thread as u have already got the solution in the other similar thread u posted.

кu03B1ятu03B9к