Application Development 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: 

Import internal table problem

Former Member
0 Kudos

Hi..

I have 2 programs with me.

In the first program my code is like this

REPORT Y_TEST1.

DATA:

BEGIN OF FS_DATA,

NUMBER TYPE I,

NAME(30) TYPE C,

END OF FS_DATA.

DATA:

T_DATA LIKE STANDARD TABLE OF FS_DATA.

DEFINE APPEND_TABLE.

FS_DATA-NUMBER = &1.

FS_DATA-NAME = &2.

APPEND FS_DATA TO T_DATA.

CLEAR FS_DATA.

END-OF-DEFINITION.

APPEND_TABLE 1 'HARISH'.

APPEND_TABLE 2 'MAHESH'.

APPEND_TABLE 3 'SURESH'.

APPEND_TABLE 4 'WAJID'.

APPEND_TABLE 5 'SANKAR'.

APPEND_TABLE 6 'SATISH'.

APPEND_TABLE 7 'CHANDU'.

APPEND_TABLE 8 'VEERESH'.

EXPORT T_DATA TO MEMORY ID 'NAM'.

SUBMIT Y_TEST1_CALLED.

And my Second Program code is ..

REPORT Y_TEST1_CALLED.

DATA:

FS_DATA(30).

DATA:

T_DATA LIKE STANDARD TABLE OF FS_DATA.

IMPORT T_DATA FROM MEMORY ID 'NAM' . ******ERROR

LOOP AT T_DATA INTO FS_DATA.

WRITE: / FS_DATA.

ENDLOOP.

These are the programs that i have here in

second Prog i am getting Shortdump as Types mis match ..

but according to my requirement i need to get the data into itab t_data without changing structure of the internal tables ,

here I need to use any of options in IMPORT

{ { { {[ACCEPTING PADDING] [ACCEPTING TRUNCATION]}

| [IGNORING STRUCTURE BOUNDARIES] }

[IGNORING CONVERSION ERRORS [REPLACEMENT CHARACTER rc]] }

| [IN CHAR-TO-HEX MODE] }

[CODEPAGE INTO cp]

[ENDIAN INTO endian].

what i need to use and how ......

i think correct option is IGNORING CONVERSION ERRORS but it is giving syntax error ..can any one send me the proper code and my system is ECC 5.

9 REPLIES 9

former_member181962
Active Contributor
0 Kudos

Refer the demo program:

DEMO_DATA_EXT_CLUSTER_IMPORT

Regards,

Ravi

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You should make sure that both defintions of FS_DATA are exactly the same in both programs.

Regards,

RIch Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

So if you are not allowed to change the structure of the internal table in the second program, you should use a dedicated internal table for passing the data in both programs, then you can simply move the records from the other internal table to FS_DATA in the second program.

Regards,

Rich Heilman

0 Kudos

sorry i didn't get u ..what is the meaning of dedecated Internal table ..

here i have to use the options of IMPORT those what i specified in my question...mainly

IGNORING CONVERSION ERRORS in IMPORT

0 Kudos

You should use a internal table in both progams which have the same exact structure.

Regards,

Rich Heilman

0 Kudos

But the different structures r working in 4.6 system ( my Clients machine)

0 Kudos

Hi Pasupulati,

Please try it in this way. I have already done it in my one requirement.

Hi,

Please use it in this way,

*& First Prog----

data: char4(4) type c.
EXPORT char4 TO MEMORY ID 'ZOT'.

*& Other Prog---


Data: char4(4) type c.
 IMPORT char4 FROM MEMORY ID 'ZOT'.

Once you get the output.

Then Free the Memory

syntax is:

 Free memory id 'ZOT'.

0 Kudos

here i have the internal tables with two different structures,

so please give me any solution,if any , whch will works with these type of different structured itams..

and i saw Import has so many options to deal with some different stuructured itabs in F1

help ..

and more over that this report is executing in 4.6 system without any issues ,and why it is giving short dump in ECC5,can any one tell me the reason.......

OR atleast tell me how to write the code using

"IGNORING CONVERSION ERRORS" option in "IMPORT"

so if any one has used those options ,can please suggest me...

Message was edited by:

RK Pasupuleti

Message was edited by:

RK Pasupuleti

Former Member
0 Kudos

Hi,

Please use it in this way,

*& First Prog----

data: char4(4) type c.
EXPORT char4 TO MEMORY ID 'ZOT'.

*& Other Prog---

Data: char4(4) type c.
 IMPORT char4 FROM MEMORY ID 'ZOT'.

Once you get the output.

Then Free the Memory

syntax is:

 Free memory id 'ZOT'.

Reward point if helpfull.***************************