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

Upload to Internal table

Former Member
0 Likes
718

Hello Everyone,

I have afile format as followes.

A B C100 200 300

100 200 100

200 100 300

300 200 100.

Now i have declared a internal table with deep structure..

data: begin of x_data occurs o,

X like 100,

Y like 200,

Z like 300,

end of x_data.

data: begin of i_data,

M like A,

N like B,

O like C,

it_data like table of x_data,

end of i_data.

Now how i can upload given file so tht al the records are in deep structure i_data.

Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
699

Hi..

better take an itab of field 1 of type string.

<b>data:

begin of itab occurs 0,

line type string,

end of itab.</b>

now upload data into itab using <b>GUI_UPLOAD</b>.

later move ur data to respective fields into ur itabs.

Hello Everyone,

I have afile format as followes.

A B C100 200 300

100 200 100

200 100 300

300 200 100.

Now i have declared a internal table with deep structure..

data: begin of x_data occurs o,

X like 100,

Y like 200,

Z like 300,

end of x_data.

data: begin of i_data,

M like A,

N like B,

O like C,

it_data like table of x_data,

end of i_data.

Now how i can upload given file so tht al the records are in deep structure i_data.

Regards

4 REPLIES 4
Read only

Former Member
0 Likes
700

Hi..

better take an itab of field 1 of type string.

<b>data:

begin of itab occurs 0,

line type string,

end of itab.</b>

now upload data into itab using <b>GUI_UPLOAD</b>.

later move ur data to respective fields into ur itabs.

Read only

Former Member
0 Likes
699

Hi,

Try to upload data in itab having fileds like A B C100 200 300, process data using loop statement considering blank uploaded in ABC if any.

May be this iwll help you

Read only

Former Member
0 Likes
699

u have to first read the data in a internal table with single field

then loop at that table sending the fields to WA which is defined as a string

data wa like string

eg loop at itab into wa.

now use move corresponding statement to move the data from wa to ur deep structured internal table

eg move-correspondoing wa+ 0(3) to i_data-m

and so on...

Read only

Former Member
0 Likes
699

Thanks all for your inputs.

I have resolved on my own.

Regards