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: 

Problem Using Memory ID

Former Member
0 Kudos

Hi All,

During my process flow I am trying to use memory ID to pass the value of one field and fetch it somewhere in the process afterwards.

In one function module I am writing:

export com_tax-prod_code to memory id 'ZPROD_CODE'.

While after sometime during the process in another function module I am writing:

import prod_code from memory id 'ZPROD_CODE'.

Still I am not getting the value properly. Is anything wrong in the above code?? I am getting sy-subrc = 0 too. And I have checked the values in debugging too. Still unable to get it. Did i miss something???

Your help would be appreciated.

Thanks,

Jignesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Not sure, but I think the name of the field needs to be the same in both places. Try:

import <b>com_tax-prod_code</b> from memory id 'ZPROD_CODE'.

Sudha

14 REPLIES 14

Former Member
0 Kudos

Hi Jignesh,

Check if you have activated the two Function Modules.

Regards,

Kunal,

0 Kudos

I will definitely let you know if i solve this. Please bare with me till tomorrow.

Thanks all for the help but still seeks more input on this.

Former Member
0 Kudos
hi Jignesh,

   I had cheked the help of export and import , the syntax which u had used had been removed , try this

set parameter id 'TEST' field com_tax-prod_code.

get parameter id 'TEST' field com_tax-prod_code.

Former Member
0 Kudos

Not sure, but I think the name of the field needs to be the same in both places. Try:

import <b>com_tax-prod_code</b> from memory id 'ZPROD_CODE'.

Sudha

Former Member
0 Kudos

You have to maintain parameter ID 'ZPROD_CODE' in table TPARA. Use SM30 - it will raise a transport.

Rob

0 Kudos

Thanks All.

Rob I am already using other memory ID which is working fine and it is not there in TPARA table !!

Sudha as of I know it is not mandatory to use same name.

I have activated both the Function Modules before testing.

Shekhar, I am not sure whether this has been removed from the SAP bcoz I have used same Import-Export at many other places before this.

Jignesh

0 Kudos

Hi Jignesh,

Even i had used this before , but pls check help on export u will find that

0 Kudos

Try by keeping the same name as mentioned by Sudha.

I also faced the same problem but when i kept the same name it worked.

Try it and let us know.

Regards

Aman

0 Kudos

Also I cant use GET and SET PARAMETER .. Since multiple use would be logged in and the values would get over written each time !!

0 Kudos

Add it - see if it helps. It won't do any harm.

Rob

0 Kudos

Hi All,

Finally I was able to solve it. The thing which i should mention here is that we have to use same datatype for import which we use for export. Please note that I was using a Char 10 field for exporting which was a part of the structure. and while importing I was using Char 10 field (Note both have same technical attributes) which was not part of that structure. So what I did, I took the same type of field for importing too(i.e. field type struct-field). Here Sudha your hint was useful. However Name should be identical is not must thing. But yeah your hint was useful.

Thanks All for your help and suggesstions.

Thanks again,

Jignesh.

0 Kudos

Glad to help Jignesh. And thanks for sharing the information with all of us.

Please close the thread now that your question has been answered.

Sudha

Former Member
0 Kudos

Hi Jignesh,

Did u use any statements like "leave to transaction" or "submit"?

0 Kudos

No I did not use those transactions.