‎2010 Feb 16 5:51 AM
Hi All,
I have a requirement where i need to export internal table from program1 and IMPORT it in program2.
I have used IMPORT/EXPORT FROM/TO MEMORY ID statements.
Program1---
EXPORT g00 TO MEMORY ID 'Y_ECC6DEV_20100216_110600'
Program2 --
IMPORT g00 TO <dyn_out> FROM MEMORY ID prog.
Here <dyn_out> is dynamic internal table and have the same structure as 'g00' internal table.
Problem is when this import statement executes it gives me dump saying : -
Runtime Errors IMPORT_ALIGNMENT_MISMATCH
Exception CX_SY_IMPORT_MISMATCH_ERROR
Date and Time 16.02.2010 10:48:37
Detailed Log is pasted in last.
Thanks for early reply.
Regards
Munish Garg
-
Runtime Errors IMPORT_ALIGNMENT_MISMATCH
Exception CX_SY_IMPORT_MISMATCH_ERROR
Date and Time 16.02.2010 10:48:37
-
-
Short text |
Error when importing object "G00". |
-
-
Error analysis |
An exception occurred that is explained in detail below. |
The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was |
not caught and |
therefore caused a runtime error. |
The reason for the exception is: |
When importing object "G00", the structure did not match the |
structure of the target object. The error occurred in component |
no. 2. |
This may be due to one of the following reasons: |
- the structure is actually different (the next field has, for |
example, a different data type) or |
- the same sequence of components were exported and imported, |
but the fields were from other include units. |
-
-
How to correct the error |
There is a probably a new version of the program active that does |
not match the dataset. The data may not have been converted. |
It is also possible that the field type of the imported field |
has been changed in the Data Dictionary. |
Try to eliminate the error by regenerating the program "YZ_MG_TEST_LDB_F1S_3". |
To |
do this, proceed as follows: |
Call Transaction SE38 in the R/3 System, enter the program |
name "YZ_MG_TEST_LDB_F1S_3" and then choose "Generate". |
If the error occurred in your own ABAP program or in an SAP |
program you modified, try to remove the error. |
If the error occures in a non-modified SAP program, you may be able to |
find an interim solution in an SAP Note. |
If you have access to SAP Notes, carry out a search with the following |
keywords: |
"IMPORT_ALIGNMENT_MISMATCH" "CX_SY_IMPORT_MISMATCH_ERROR" |
"YZ_MG_TEST_LDB_F1S_3" or "YZ_MG_TEST_LDB_F1S_3" |
"START-OF-SELECTION" |
If you cannot solve the problem yourself and want to send an error |
notification to SAP, include the following information: |
1. The description of the current problem (short dump) |
To save the description, choose "System->List->Save->Local File |
(Unconverted)". |
2. Corresponding system log |
Display the system log by calling transaction SM21. |
Restrict the time interval to 10 minutes before and five minutes |
after the short dump. Then choose "System->List->Save->Local File |
(Unconverted)". |
3. If the problem occurs in a problem of your own or a modified SAP |
program: The source code of the program |
In the editor, choose "Utilities->More |
Utilities->Upload/Download->Download". |
4. Details about the conditions under which the error occurred or which |
actions and input led to the error. |
-
-
Information on where terminated |
Termination occurred in the ABAP program "YZ_MG_TEST_LDB_F1S_3" - in |
"START-OF-SELECTION". |
The main program was "YZ_MG_TEST_LDB_F1S_3 ". |
In the source code you have the termination point in line 277 |
of the (Include) program "YZ_MG_TEST_LDB_F1S_3". |
-
-
Source Code Extract |
-
Line | SourceCde |
-
247 | APPEND wa_code TO code. clear wa_code. |
248 | |
249 |
|
250 | SYNTAX-CHECK FOR code MESSAGE mess LINE lin WORD wrd DIRECTORY ENTRY dir. |
251 | IF sy-subrc EQ 0. |
252 | TRY. |
253 | INSERT REPORT prog FROM code DIRECTORY ENTRY dir. |
254 | IF sy-subrc EQ 0. |
255 | l_subrc = sy-subrc. |
256 | IF l_subrc EQ 0. |
257 | COMMIT WORK AND WAIT. |
258 | Write:/ 'Report', prog, 'successfully generated'. |
259 | ENDIF. |
260 | ELSE. |
261 | Write 😕 'Error in generating', prog, 'Report'. |
262 | ENDIF. |
263 | CATCH CX_SY_WRITE_SRC_LINE_TOO_LONG. "Parent CX_DYNAMIC_CHECK |
264 | WRITE 😕 'A line in the source code contains more than 255 characters'. |
265 | ENDTRY. |
266 | ELSE. |
267 | Write:/ 'Syntax-Error', 'in line', lin. |
268 | WRITE:/ mess. |
269 | EXIT. |
270 | ENDIF. |
271 | IF l_subrc EQ 0. |
272 | DATA : it_test TYPE TABLE OF string. |
273 | CLEAR l_subrc. |
274 | SUBMIT (prog) AND RETURN EXPORTING LIST TO MEMORY. " USING s |
275 | PERFORM generate_dfies_tbl TABLES it_out_table it_dfies. |
276 | PERFORM generate_dyn_tbl TABLES it_dfies. |
>>>>> |
|
278 | IMPORT g00 FROM MEMORY ID prog. |
279 | IMPORT g00 TO <dyn_out> FROM MEMORY ID prog. |
280 | DATA listobj TYPE STANDARD TABLE OF ABAPLIST. |
281 | CALL FUNCTION 'LIST_FROM_MEMORY' |
282 | TABLES |
283 | listobject = listobj |
284 | EXCEPTIONS |
285 | not_found = 1. |
286 | IF sy-subrc NE 0. |
287 | |
288 | ENDIF. |
289 | CALL FUNCTION 'LIST_TO_ASCI' |
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | TABLES |
-
‎2010 Feb 16 5:54 AM
I think this problem is not related with Import Export statement.
Please check the tables/structures declaration from where you are exporting and importing in both programs.
Structure declaration should be same.
Hope this will be useful.
Please tell if further queries.
‎2010 Feb 16 6:05 AM
Hi Rushikesh,
Dynamic table i have created with same structure as of internal table which is getting exported....
thats why i m surprised how come structure mismatch.....i have checked in debugger, structure is same.....for both the tables,
Can you/anyone give any example of Exporting internal table to MEMORY ID and getting it back (IMPORT) into dynamic internal table of same structure...
Regards
Munish Garg
Edited by: MunishGarg on Feb 16, 2010 11:36 AM
‎2010 Feb 16 5:56 AM
Hi, Garg
Note that there is a limit of 2500 characters per post.
For more info check this =>
Regards,
Faisal
‎2010 Aug 31 2:17 PM
Solved by delaring INT1, INT2 types as I in program 1 and created the dynamic table with type i for INT1 and INT2.