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 Internal Table

Former Member
0 Likes
693

Hello Guys,

I have written the following code to Export and then Import an Internal Table:

FOR EXPORT

Data : I_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

EXPORT TI_EQUI TO MEMORY ID 'EQUI_TABLE'.

FOR IMPORT

Data : I_EQUI LIKE EQUI,

TI_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

IMPORT TI_EQUI FROM MEMORY ID 'EQUI_TABLE'.

When i run the code it leads me to Dump with th error:

The object "TI_EQUI" has a different object type in the dataset from

*that in the target program "/SAPPSPRO/SAPLMATE".

Please Suggest .

Regards,

Najam

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
659

Hello,

Plese use '[]' while exporting internal table.

Try with below code.

FOR EXPORT

Data : I_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

EXPORT TI_EQUI[] TO MEMORY ID 'EQUI_TABLE'.

FOR IMPORT

Data : I_EQUI LIKE EQUI,

TI_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

IMPORT TI_EQUI[] FROM MEMORY ID 'EQUI_TABLE'.

II. Still your having same problem

check whether the data type for internal tabel TI_EQUI should be same for export/Import .

Regards,

Sudheer

4 REPLIES 4
Read only

Former Member
0 Likes
659

if you want to declare you can better use type en use type standard table

gs_equi type equi.
gt_equi type standard table of equi.

kind regards

arthur

Edited by: A. de Smidt on May 18, 2010 9:51 AM

Read only

Former Member
0 Likes
660

Hello,

Plese use '[]' while exporting internal table.

Try with below code.

FOR EXPORT

Data : I_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

EXPORT TI_EQUI[] TO MEMORY ID 'EQUI_TABLE'.

FOR IMPORT

Data : I_EQUI LIKE EQUI,

TI_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

IMPORT TI_EQUI[] FROM MEMORY ID 'EQUI_TABLE'.

II. Still your having same problem

check whether the data type for internal tabel TI_EQUI should be same for export/Import .

Regards,

Sudheer

Read only

Former Member
0 Likes
659

Hi,

export:-

-


  • export also should refere same data type . check your export how it is declared in export program ***

data: TIEQUI LIKE EQUI._

EXPORT TI_EQUI TO MEMORY ID 'EQUI_TABLE'.

Import:-

-


Data : I_EQUI LIKE EQUI,

TI_EQUI LIKE EQUI,

EQUI_TABLE LIKE EQUI.

IMPORT TI_EQUI FROM MEMORY ID 'EQUI_TABLE'.

regards

sudheer

Read only

Former Member
0 Likes
659

CASE1:- In Both export/import variable +TIEQUI+_ Declared as work area

Export Program:-

Data :TI_EQUI LIKE EQUI.

EXPORT TI_EQUI TO MEMORY ID 'EQUI_TABLE'.

Import program:-

Data TI_EQUI LIKE EQUI,

IMPORT TI_EQUI FROM MEMORY ID 'EQUI_TABLE'.

Output: No error

-


case2:- In export program variable TI_EQUI declared as "Internal table",

But import program variable TI_EQUI declared as work area insted of internal table

Export Program:-

Data :TI_EQUI type table of EQUI. --> " TI_EQUI declared as internal table

EXPORT TI_EQUI TO MEMORY ID 'EQUI_TABLE'.

Import program:-

Data TI_EQUI LIKE EQUI, --> declared as work area

IMPORT TI_EQUI FROM MEMORY ID 'EQUI_TABLE'.

output:- error/shortdump

Thanks & Regards

Sudheer Madisetty