Skip to Content
-1

Not able to Import the Data From the Enhancement point.

Mar 14 at 05:51 AM

36

avatar image

I have one problem,
need to export one structure from one place to another place.
While exporting data is getting in Structure, but while importing Structure is empty.

Export.

Data:BEGIN OF rit_mseg OCCURS 0.
INCLUDE STRUCTURE mseg.

data:END OF rit_mseg.

move: mseg to rit_mseg.
EXPORT MSEG TO MEMORY ID 'CTAB'.

Import
DATA:BEGIN OF rit_mseg1 OCCURS 0.

INCLUDE STRUCTURE mseg.
DATA:END OF rit_mseg1.

IMPORT rit_mseg TO rit_mseg1 FROM MEMORY ID 'CTAB'.
FREE MEMORY ID 'CTAB'.

Any suggestion about above problem.

10 |10000 characters needed characters left characters exceeded

OCCURS 0. ??????

You deal with header lines!!!

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Mar 14 at 06:14 AM
0

Hello charan,

For Import /export the names of variables should be same. Then only will import data.

REPORT ztest.
DATA mseg TYPE mseg.

DATA:BEGIN OF rit_mseg OCCURS 0.
        INCLUDE STRUCTURE mseg.
DATA:END OF rit_mseg.

mseg-mblnr = '123' .

* Export
MOVE: mseg TO rit_mseg.
EXPORT mseg TO MEMORY ID 'CTAB'.
CLEAR mseg.


*IMPORT
DATA:BEGIN OF rit_mseg1 OCCURS 0.
        INCLUDE STRUCTURE mseg.
DATA:END OF rit_mseg1.

IMPORT mseg FROM MEMORY ID 'CTAB'.
FREE MEMORY ID 'CTAB'.

Thanks,

Praveen.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Ok, thanks for your reply.

In export i did a mistake, I changed it to rit_mseg. Now export and import are both are same.

EXPORT rit_mseg TO MEMORY ID 'CTAB'.

But still importing structure is empty.

0

Thank you ,Two mistakes i did,

Table created wrongly, and import and export id wrongly Created.

0
Former Member

Hello,

If you use RIT_MSEG then it will export internal table body. If you use append RIT_MSEG before export then during import you will get the table rows back.

Thanks,

Praveen.

0