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

How we insert the value with out using insert command in an internal table

Former Member
0 Likes
1,311

Hi,

Is there other way to insert the values in an internal table...

with out using the insert,update and modify command.

8 REPLIES 8
Read only

Former Member
0 Likes
1,221

Hi,

We generally use modify,assert and update for inserting values into an internal table in addition to this we can also use APPEND also.APPEND can be done with the Standard Internal Table omly.

Reward Points if found helpfull..

Cheers,

Chandra Sekhar.

Read only

0 Likes
1,221

Try

 APPEND line_spec TO itab [SORTED BY comp] [result].  

Also try

 APPEND LINES OF jtab [FROM idx1] [TO idx2].  

Effect

The rows of an internal table jtab are appended according to the same rules that apply for appending a workarea, in the sequence in which they exist in jtab. If jtab is an index table, you can restrict the rows to be appended by specifying FROM idx1 and TO idx2. In this case, only the table rows starting at table index idx1 or ending at table index idx2 from jtab are appended. For idx1 and idx2, data objects of type i are expected. If the value idx1 or idx2 is less than 0, an untreatable exception occurs. If idx1 is greater than idx2 or greater than the number of table rows, no rows are appended. If idx2 is greater than the number of table rows, it is set to the number of table rows.

Thanks,

Balaji

Read only

Former Member
0 Likes
1,221

Hi,

Yes, we can do that with APPEND & COLLECT Statements.

Rgds,

Bujji

Read only

Former Member
0 Likes
1,221

Hi Dude,

Try this way,

it_name-fld1 = fld1_value. (or) move fld1_value to it_name-fld1.

it_name-fld2 = fld2_value. (or) move fld2_value to it_name-fld2.

it_name-fld3 = fld3_value. (or) move fld3_value to it_name-fld3.

append it_name.

Regards,

Lakshmanan

Read only

Former Member
0 Likes
1,221

Hi

You can use 'APPEND' stmt to insert records in an internal table. (will add the record in last position)

APPEND <work_area> to <internal_table>.

Thanks

Vijay

PLZ reward points if helpful

Read only

Former Member
0 Likes
1,221

no even i don't want to use append and collect also..

...can we use field-symbol...if it is how we can..is there any exiting program

Read only

Former Member
0 Likes
1,221

hi,

Append:Can be used with Standard internal table.

Insert:Can be used with standard,hashed and sorted internal table.

append always adds entry at the end of internal table.

insert for standard tables adds at end or index specified.

for sorted and hashed it will add entry as per the key given.

Read only

Former Member
0 Likes
1,221

you can not insert new record in internal table using field-symbols. The field-symbols are nothing but the address of the record. You can change the records wihtout using Modify statement using field-symbols but cant insert.