05-27-2008 9:05 AM
hi,
I m doing exits. I have one exit for importing and another one for changing parameter.
SET PARAMETER exit code is ....
*data:v_nba like eban-bsart,
v_nbc like eban-bsart,
v_nbo like eban-bsart.
v_nbc = 'CAPX'.
v_nbo = 'OPEX'.
v_nba = 'OVH'.
if im_data_new-werks is initial.
if im_data_new-knttp is initial.
if im_data_new-bsart = 'NBC' or im_data_new-bsart = 'SERC' or im_data_new-bsart = 'SERI'
or im_data_new-bsart = 'SER' or im_data_new-bsart = 'SERM' or im_data_new-bsart = 'NBI'.
set parameter id 'ZC1' field v_nbc.
elseif im_data_new-bsart = 'NBO' or im_data_new-bsart = 'NBM' or im_data_new-bsart = 'SERO'.
set parameter id 'ZC2' field v_nbo.
elseif im_data_new-bsart = 'NBA' or im_data_new-bsart = 'SERA'.
set parameter id 'ZC3' field v_nba.
endif.
endif.
endif. *
and GET PARAMETER CODE IS....
get parameter id 'ZC1' field c_fmderive-fund.
get parameter id 'ZC2' field c_fmderive-fund.
get parameter id 'ZC3' field c_fmderive-fund.
FREE MEMORY ID 'ZC1'.
FREE MEMORY ID 'ZC2'.
FREE MEMORY ID 'ZC3'.
*
In this code i m facing memory problem.
It is not refreshing the memory every time.
So plz give me proper solution.
Its urgent.
Thanks
Ranveer
05-27-2008 9:19 AM
Hi,
I suppose you are trying to store some particular value in memory in one program and then retieve it in another.
If so try using EXPORT data TO MEMORY ID 'ZC1'. and IMPORT data FROM MEMORY ID 'ZC1'.
To use SET PARAMETER/GET PARAMETER the specified parameter name should be in table TPARA. Which I don't think is there in your case.
Sample Code :
Data declarations for the function codes to be transferred
DATA : v_first TYPE syucomm,
v_second TYPE syucomm.
CONSTANTS : c_memid TYPE char10 VALUE 'ZCCBPR1'.
Move the function codes to the program varaibles
v_first = gv_bdt_fcode.
v_second = sy-ucomm.
Export the function codes to Memory ID
EXPORT v_first
v_second TO MEMORY ID c_memid. "ZCCBPR1 --- Here you are sending the values to memory
Then retrieve it.
Retrieve the function codes from the Memory ID
IMPORT v_first TO v_fcode_1
v_second TO v_fcode_2
FROM MEMORY ID c_memid. "ZCCBPR1
FREE MEMORY ID c_memid. "ZCCBPR1
After reading the values from memory ID free them your problem should be solved.
Thanks
Barada
Edited by: Baradakanta Swain on May 27, 2008 10:20 AM