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

insert data to itab

Former Member
0 Likes
680

hallow

i wont to buield a internal table i inser in data of mine what is <b>best</b> way to do that?

assume i have itab

and i have field char4

i wont

itab

0000

0001

0002

0006

....

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
660

Hello,


data: lv_num type n value '0001'.
DO 10 times.
itab-char4 = lv_num.
append itab.
add 1 lv_num.
enddo.

Regrads,

Vasanth

6 REPLIES 6
Read only

Former Member
0 Likes
660

Hi Shnya.

INSERT statement is itself is the best way.

Reward if useful!

Read only

Former Member
0 Likes
661

Hello,


data: lv_num type n value '0001'.
DO 10 times.
itab-char4 = lv_num.
append itab.
add 1 lv_num.
enddo.

Regrads,

Vasanth

Read only

0 Likes
660

hi Vasanth M

all time i need to append difrent num like

0000

0321

0586

regards

Read only

0 Likes
660

Hello,

I just for an example I gave this code.

Vasanth

Read only

Former Member
0 Likes
660

Hi,

data wa like line of itab.

wa-field = 0001.

append itab.

wa-field = 0002.

append itab.

this u can do for little data

if u have lot of data

you can add the data in an excel sheet in a column.

save the excel sheet in csv format

then use the function module 'WS_DOWNLOAD'

pass the path of the file including file name and filetype as CSV

import data into table itab.

Regards,

Aparna

Read only

Former Member
0 Likes
660

HI.

data wa like line of itab.

wa-field = 0001.

append itab.

wa-field = 0002.

append itab.

Rewards all helpfull answers.

Regards.

Jay