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

import statement

Former Member
0 Likes
1,073

<<"Plz help" removed from subject by moderator>>

Hi,

one program is giving dump at the location 'IMPORT......... statement'.

but there is no EXPORT statement in this program(is it required?)

can someone explain me the technical details of the following statement below:

IMPORT ITAB_BKPF FROM DATABASE RFDT(BB) ID XYZ.

IF SY-SUBRC = 0.

READ TABLE T_BKPF INDEX 1.

.....................

more details:

same code is working in one system and giving dump in another system.

both systems are samp versions..

plz help me

Edited by: MICR S on Feb 3, 2009 10:47 AM

Edited by: Matt on Feb 3, 2009 11:31 AM - plz help removed from subject

6 REPLIES 6
Read only

Former Member
0 Likes
943

No need in the same program the export statement should be mentioned...It can be mentioned else where..Just like u can append the data to application server and frrom another program we can download.

&

The read statement mentioned by you is not realted to the import tab...could you paste some more code..

regards

sas

And what dump analysis are you getting??

Read only

0 Likes
943

the following dump I am getting

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 attempting to import data, the

structure of the complex object "ITAB_BKPF" was not compatible with the

target object. The error occurred with component no. 71.

Read only

0 Likes
943

Hi,

U can Go through F1 help on import...

U wil find Import Exceptions....

In that u wil find

CX_SY_IMPORT_MISMATCH_ERROR

Lot of resons for runtime error ....

plz go through this....

Read only

Former Member
0 Likes
943

Hi

IMPORT ITAB_BKPF FROM DATABASE RFDT(BB) ID XYZ.

ITAB_BKPF in the export structure and import structure should be of same declaration

can u try using in the lines of below piece of code

EXPORT tb_cond FROM tb_cond

TO DATABASE indx(st) ID wf_memid.

Import TB_COND to TB_COND from DATABASE indx(st) ID wf_memid.

Cheers

Lavanya

Read only

Former Member
0 Likes
943

Hi,

From the description youe provided the problem lies in the itab.

The explanation says "The reason for the exception is:

When attempting to import data, the

structure of the complex object "ITAB_BKPF" was not compatible with the

target object. " means that there is a mismatch between the target table and actual table.

Figuring out the difference will solve your problem

Hope it helps u.

Thanks & Regards

Read only

Former Member
0 Likes
943

Hi,

Its not mandatory to use Export statement like in function modules. But from dump analysis it is very clearly mentioned that there is some mismatch in the ITAB_BKPF table (Source table) with the target table. It has nothing to do with the READ statement as it is dumping at the import statement itself.

So check your import statement for source and target tables structures if both are same.

Regards,

Sumalatha