Application Development and Automation 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: 
Read only

how to create memory id

Former Member
0 Likes
11,492

Hi SAP Guru's,

I have statement in my code Export f1 f2.....f8 to MEMORY ID 'ZMID'.

How to create memory id 'ZMID'? or How can i find the memory id of my current running program? Or Is memory ID's already created in SAP?

Rewarded for Gud answers.

1 ACCEPTED SOLUTION
Read only

Former Member
5,036

Hi Kiran,

The memory id 'ZMID' is automatically created when u write the statement Export f1 f2.....f8 to MEMORY ID 'ZMID'.

Good luck!

Do reward points at promised.

7 REPLIES 7
Read only

Former Member
5,037

Hi Kiran,

The memory id 'ZMID' is automatically created when u write the statement Export f1 f2.....f8 to MEMORY ID 'ZMID'.

Good luck!

Do reward points at promised.

Read only

Former Member
0 Likes
5,036

Hi,

1 . goto transaction SM30 for table tpara and create your new parameter.

2 . you can go to SE80, Other object button -> More... tab -> SET/GET parameter ID.

Enter a name and press the create button.

Regards,

Omkar.

Read only

Former Member
0 Likes
5,036

The memory ID can be any flat character type data object which contains an identification with a maximum of 60 characters.

To create a SPA/GPA parameter follow the steps as suggested above

Message was edited by:

Rajesh

Read only

RaymondGiuseppi
Active Contributor
0 Likes
5,036

Create the new memory id in table TPARA thru transaction SM30.

You don't need to create it to use in your Z-programs.

You only need to create it (out of documentaion purpose)if you want to link the id to data elements.

Regards

Read only

Former Member
0 Likes
5,036

Hi when u r using EMPORT x y z .. to MEMORY-ID 'ZYZ' in SAP memory once place is allocated to store the values of X, Y, Z and the memory location is refered with NAME 'ZYZ'.

if you want to read the values.. you can use IMPORT FROM MEMORY-ID into... so that the values will come back to your program variables.

This facility is provided for us to access data from one program to other programs hwere there is no link available.

I will tell you a scenario.

I have 2 user-exits. but there are no common parameters are there.. but in one exit i am exporting Sales Order No. to memory and in other exit i am importing that sales order number and using the same for further processing.

one thing is after IMPORT you have to use FREE MEMORY-iD id name to release the memory for other's use.

For more details read SAP Help.

http://help.sap.com/saphelp_nw04/helpdata/en/c0/98039ee58611d194cc00a0c94260a5/content.htm

Read only

Former Member
0 Likes
5,036

Hello Kiran,

There are 2 procedures to create a memory Id.

1) First Goto Tcode SM30 and enter table name TPARA.

Now click on Display Button and enter the name of the Memory Id in Set/Get Parameter Id. Press Enter and it will create a memory id for your program.

2) While writing a program it will automatically creates a memory id once you include the following statement:

PARAMETERS: p_matnr like mara-matnr MEMORY ID pid.

Here is an example code:

REPORT ZSELECT.

TABLES: mara.

DATA pid.

  • Memory ID

SELECTION-SCREEN BEGIN OF BLOCK first WITH FRAME TITLE text-001.

PARAMETERS: p_matnr like mara-matnr MEMORY ID pid.

SELECTION-SCREEN end of BLOCK first.

START-of-SELECTION.

write: p_matnr.

end-of-SELECTION.

Reward if useful !

Kiran

Read only

0 Likes
5,036

Thank you all. All of you cleared my doubt and made my life easier.