‎2010 May 18 8:43 AM
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
‎2010 May 18 8:53 AM
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
‎2010 May 18 8:51 AM
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
‎2010 May 18 8:53 AM
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
‎2010 May 18 9:06 AM
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
‎2010 May 18 9:24 AM
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