Application Development 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: 

Export from method not working

simantini_sh
Explorer
0 Kudos
223

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.


3 REPLIES 3

matt
Active Contributor
169

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?

Tomas_Buryanek
Active Contributor
0 Kudos
169

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.

-- Tomas --

Sandra_Rossi
Active Contributor
0 Kudos
169

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.)