2023 Jul 21 2:15 PM
Hi,
I exported a value from a method and it is successful, and I am importing it in a FM, but IMPORT fails.
Export: EXPORT lv_opp_search = im_projectdefinition-zzopporid TO MEMORY ID 'SEARCH'.
Import: IMPORT lv_opp_search to lv_opp_search FROM MEMORY ID 'SEARCH'.
pls help.
Thanks in Advance.
2023 Jul 21 2:30 PM
Either use = or TO/FROM but don't mix styles.
Anyway. Your statements look correct. Are the method and FM in the same internal session?
2023 Jul 21 2:33 PM
Hello,
it should be like this:
IMPORT lv_opp_search = lv_opp_search FROM MEMORY ID 'SEARCH'.
Note that "lv_opp_search" on the left side is parameter name and "lv_opp_search" on the right side is your local variable. Check ABAP documentation for more details and examples.
2023 Jul 21 3:00 PM
There is absolutely no difference whatever it's used in method, FM or whatever.
It's only when you run them in different memory contexts that it will fail (different internal session e.g. possibly implying SUBMIT, CALL TRANSACTION, update task, RFC, etc.)