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

EXPORT & IMPORT ??

Former Member
0 Likes
534

Hi Experts,

Just curoius,

I found some code in our system, its,

In Z prog. = sy-repid = My_Module_Pool

1) wa_memory_id = sy-repid.

2) EXPORT it_manr TO MEMORY ID wa_memory_id.

In the exit of Move_field_to_LIPS --> of MV50AFZ1 - Delivery exits

3) wa_memory_id = 'My_Module_Pool'. --> Z module pool prog. name

4) import it_matnr from memory id wa_memory_id.

I know simple. EXPORT & IMPORT, but, here,

1) Why programmer is EXPORTing Z report name to memory ID in 1st stetemnt? Wht is the purpose? programmer can directly EXPORT the internal table right as in 2nd stetemnt?

2) After eEXPORTing the report name to memory id, again the programmer EXPORTing the iternal table cobtents to the same memory ID, Why?

3) Is itab contanets appends to memory ID? or over writes the report name?

4) I know the intenstion of the programmer that, is exporting internal table contents from Z prog. to LIPS user-exit, But, Why the SY-REPID came into picture? wht is the purpose?

4) Why again in 3rd stetemnt, programmer doing some thing, Wht does it mean?

thanq

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
469

>

>

> I found some code in our system, its,

>

> In Z prog. = sy-repid = My_Module_Pool

>

> 1) wa_memory_id = sy-repid. <=== parameter id assignment

> 2) EXPORT it_manr TO MEMORY ID wa_memory_id.

>

> In the exit of Move_field_to_LIPS --> of MV50AFZ1 - Delivery exits

>

> 3) wa_memory_id = 'My_Module_Pool'. --> Z module pool prog. name

> 4) import it_matnr from memory id wa_memory_id.

>

> I know simple. EXPORT & IMPORT, but, here,

>

> 1) Why programmer is EXPORTing Z report name to memory ID in 1st stetemnt? Wht is the purpose? programmer can directly EXPORT the internal table right as in 2nd stetemnt?

programmer is EXPORTing Z report name to memory ID in 1st stetemnt

they are not exporting program name to memory id.

they are taking sy-repid as memory ID , and using the memory id they are exporting the internal table data.

>

> 2) After eEXPORTing the report name to memory id, again the programmer EXPORTing the iternal table cobtents to the same memory ID, Why?

first memory id population, to that memory id they are sending the data.

>

> 3) Is itab contanets appends to memory ID? or over writes the report name?

tablecontents will be stored in the memory id.

see you are confusing with the memory ID and table. it won't overwrite , it has nothing to do with that.

this table stores in a memory id whose name is equal to program name.

>

> 4) I know the intenstion of the programmer that, is exporting internal table contents from Z prog. to LIPS user-exit, But, Why the SY-REPID came into picture? wht is the purpose?

they want to give the Memory ID some name, if they give sy-repid then may be think that it is easy for them use the same name to get it from memory." when they import

>

> 4) Why again in 3rd stetemnt, programmer doing some thing, Wht does it mean?

>

it is Importing part.

when you want to import you have to give the same name of the memory id. that time he used it as sy-epid. but the sy-repid value might be 'My_Module_Pool'.

so inorder to import he need to give the same meory id name.

wa_memory_id = 'My_Module_Pool'. --> Z module pool prog. name

import it_matnr from memory id wa_memory_id.

> thanq

2 REPLIES 2
Read only

Former Member
0 Likes
469

The programmer just named the memory id with the z report name. Whenever you are exporting or importing data you need to refer the memory space by some name and memory id is used for that. This way both the IMPORT and EXPORT commands can be paired/linked and exchange the same data object

Here I find the programmer only exported a table it_matnr and imported the same table later using the same memory id.

Read only

Former Member
0 Likes
470

>

>

> I found some code in our system, its,

>

> In Z prog. = sy-repid = My_Module_Pool

>

> 1) wa_memory_id = sy-repid. <=== parameter id assignment

> 2) EXPORT it_manr TO MEMORY ID wa_memory_id.

>

> In the exit of Move_field_to_LIPS --> of MV50AFZ1 - Delivery exits

>

> 3) wa_memory_id = 'My_Module_Pool'. --> Z module pool prog. name

> 4) import it_matnr from memory id wa_memory_id.

>

> I know simple. EXPORT & IMPORT, but, here,

>

> 1) Why programmer is EXPORTing Z report name to memory ID in 1st stetemnt? Wht is the purpose? programmer can directly EXPORT the internal table right as in 2nd stetemnt?

programmer is EXPORTing Z report name to memory ID in 1st stetemnt

they are not exporting program name to memory id.

they are taking sy-repid as memory ID , and using the memory id they are exporting the internal table data.

>

> 2) After eEXPORTing the report name to memory id, again the programmer EXPORTing the iternal table cobtents to the same memory ID, Why?

first memory id population, to that memory id they are sending the data.

>

> 3) Is itab contanets appends to memory ID? or over writes the report name?

tablecontents will be stored in the memory id.

see you are confusing with the memory ID and table. it won't overwrite , it has nothing to do with that.

this table stores in a memory id whose name is equal to program name.

>

> 4) I know the intenstion of the programmer that, is exporting internal table contents from Z prog. to LIPS user-exit, But, Why the SY-REPID came into picture? wht is the purpose?

they want to give the Memory ID some name, if they give sy-repid then may be think that it is easy for them use the same name to get it from memory." when they import

>

> 4) Why again in 3rd stetemnt, programmer doing some thing, Wht does it mean?

>

it is Importing part.

when you want to import you have to give the same name of the memory id. that time he used it as sy-epid. but the sy-repid value might be 'My_Module_Pool'.

so inorder to import he need to give the same meory id name.

wa_memory_id = 'My_Module_Pool'. --> Z module pool prog. name

import it_matnr from memory id wa_memory_id.

> thanq