‎2011 Apr 15 10:32 AM
hi Experts,
I use EXPORT variable to MEMORY ID 'XXX' in Program ztest. And in the program, I call a FM ZFM in BACKGROUND TASK. In the FM ZFM, I use IMPORT statement to receive the variable. But it seems I can not get the value. Since I can not debug FM executed in BACKGROUND TASK, I can just judge by the result.
Here is the question, what is the access posibility of EXPORT statement. If I want to access the variable, should I use some other ways? Such as EXPORT to database? But I am not very familiar with this command and the cluster tables. Can anyone give me some advice?
thanks in advance.
‎2011 Apr 15 10:35 AM
export to memory exports to ABAP memory. If your other program is done in background task this is a new mode/task and ABAP memory is not able to handle this as it is mode based. you should make use of the SAP memory which works over mode/taskboundaries.
‎2011 Apr 18 3:27 AM
thanks Florian. So it means I can not access the calling program's memory id in my background task FM? Is there anyway to do this?
‎2011 Apr 18 4:22 AM
Hi,
If the data that you need exported is a single field value, then you can use create a parameter ID and use "SET/GET PARAMETER ID". If it is more than a data field, you can use Export to database/shared buffer, please go through the below link.
http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/frameset.htm
Regards,
Chen
‎2011 Apr 18 10:36 AM
Thanks Chen, I have implemented the EXPORT TO DATABASE. I found all the examples using table ID indx to store the data, is this table a default table for the EXPORT to database table?
‎2011 Apr 15 11:15 AM