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

Importing Data Clusters

Former Member
0 Likes
439

Dear All,

How do I import data clusters from a database table to view the data it contains. I know, or at least I think, I have to use the IMPORT command which has the following syntax:

IMPORT parameter_list FROM medium [conversion_options].

But how do I find what the parameter list, their type, etc. and is medium the name of the table? Is there a tool that enables me to read data clusters similar to se16 for data fields?

Thank you for your help,

Philon

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
412

See the simple example :

REPORT ZTEST_AMEM1.-> Main program and usinge export

tables : lfa1.

data : begin of i_lfa1 occurs 0 ,

lifnr like lfa1-lifnr,

name1 like lfa1-name1,

land1 like lfa1-land1,

end of i_lfa1.

start-of-selection.

select lifnr

name1

land1 from lfa1

into table i_lfa1 up to 100 rows.

  • Export

export i_lfa1 to memory id 'SAP'.

submit ztest_amem2 and return.

write:/ 'hello'.

&----


*& Report ZTEST_AMEM2

*&

&----


*&

*&

&----


REPORT ZTEST_AMEM2.-> called program and used import command

data : begin of j_lfa1 occurs 0,

lifnr like lfa1-lifnr,

name1 like lfa1-name1,

land1 like lfa1-land1,

end of j_lfa1.

start-of-selection.

import i_lfa1 to j_lfa1 from memory id 'SAP'.

loop at j_lfa1.

write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.

endloop.

2 REPLIES 2
Read only

Former Member
0 Likes
412

What I have done is use the "where used" for the table and try to see how SAP uses the IMPORT statement.

Rob

Read only

Former Member
0 Likes
413

See the simple example :

REPORT ZTEST_AMEM1.-> Main program and usinge export

tables : lfa1.

data : begin of i_lfa1 occurs 0 ,

lifnr like lfa1-lifnr,

name1 like lfa1-name1,

land1 like lfa1-land1,

end of i_lfa1.

start-of-selection.

select lifnr

name1

land1 from lfa1

into table i_lfa1 up to 100 rows.

  • Export

export i_lfa1 to memory id 'SAP'.

submit ztest_amem2 and return.

write:/ 'hello'.

&----


*& Report ZTEST_AMEM2

*&

&----


*&

*&

&----


REPORT ZTEST_AMEM2.-> called program and used import command

data : begin of j_lfa1 occurs 0,

lifnr like lfa1-lifnr,

name1 like lfa1-name1,

land1 like lfa1-land1,

end of j_lfa1.

start-of-selection.

import i_lfa1 to j_lfa1 from memory id 'SAP'.

loop at j_lfa1.

write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.

endloop.