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 and Import statments

Former Member
0 Likes
629

Hi,

I am using a BADI in which the required parameters are not there. So I am using one more BADI where I export the data

(internal table) to memory and import it back in my BADI where the actual changes are done. But his Export and Import is not working. Can any one help withe below code I am using

-


Export

DATA: wa_indx TYPE indx,

cl TYPE mandt VALUE '230',

item TYPE BBPT_PD_SC_ITEM_ICU.

wa_indx-aedat = sy-datum.

wa_indx-usera = sy-uname.

wa_indx-pgmid = sy-repid.

EXPORT item = it_item

TO DATABASE indx(XY)

FROM wa_indx

CLIENT cl

ID 'TABLE'.

-


Import

DATA: wa_indx TYPE indx,

cl TYPE mandt VALUE '230' ,

item TYPE BBPT_PD_SC_ITEM_ICU.

v_category = ITEM_DATA-CATEGORY_ID.

DATA: it_item TYPE STANDARD TABLE OF BBPT_PD_SC_ITEM_ICU.

IMPORT item = it_item

FROM DATABASE indx(xy)

TO wa_indx

CLIENT cl

ID 'TABLE'.

-


Thanks

5 REPLIES 5
Read only

Former Member
0 Likes
596

EXPORT item = it_item

TO DATABASE indx(XY)

try to change the 'xy' in IMPORT to capital and try ..

IMPORT item = it_item

FROM DATABASE indx(xy)

Read only

0 Likes
596

The data is there in the table indx. changed to caps XY still getting Runtime exception ...."An exception with the type CX_SY_IMPORT_MISMATCH_ERROR occurr"

Read only

0 Likes
596

I am not able to use export/import with memory id as we can only export Character type data or string. But I am exporting an internal table with all type of data in it. So thought of using export\import with database table.

Read only

Former Member
0 Likes
596

Hi,

YOu can use import from memroy id if you know that it has been exported to memory in the main program.

https://forums.sdn.sap.com/click.jspa?searchID=11761690&messageID=4533920

Regards

Kiran Sure

Read only

Former Member
0 Likes
596

hi,

import/export in database that is different. don't use database.use memory.

export <f1> to memory id <name>

import <f1> to <var> from memory id <name>

here <f1> and <name> should be same in both prg.

try it.