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

Append is not working

Former Member
0 Likes
1,477

Hi Experts,

I ve two table t_output_data1 and t_output_data and in the t_output_data1 table i have 2 records. But when i am trying to append these records to t_output_data table then its append only one records.

Can u please help me .

regards,

Satya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,050

Use this code.

APPEND LINES OF t_output_data1 TO t_output_data.

Please mark points if the solution was useful.

Regards,

Manoj

Use this code.

APPEND LINES OF t_output_data1 TO t_output_data.

Please mark points if the solution was useful.

Regards,

Manoj

5 REPLIES 5
Read only

Former Member
0 Likes
1,051

Use this code.

APPEND LINES OF t_output_data1 TO t_output_data.

Please mark points if the solution was useful.

Regards,

Manoj

Read only

Former Member
0 Likes
1,050

Hi Satya,

Loop at table t_output_data1 and append into the second table t_output_data.

<b>Reward points if answer is helpful.</b>

With Thanks,

Chinmay

Read only

Former Member
0 Likes
1,050

Hi

loop at the t_output_data

like this

<b>loop at t_output_data.

t_output_data1-field1 = t_output_data-field1.

t_output_data1-field2 = t_output_data-field2.

append t_output_data1

endloop.</b>

try like this then it will append all the records to the next internal table

if u don't put like this then it will get the last record to be displayed

<b>reward if usefull</b>

Read only

Former Member
0 Likes
1,050

loop @ t_output_data1

MOVE t_output_data1 TO t_output_data table

append t_output_data.

endloop

reward points is useful

thx

Read only

Former Member
0 Likes
1,050

Hi,

these are syntaxes for append statement.

1)This syntax is for append the records from one internal table into other with loop.

LOOP AT tbl_bsak.

CLEAR tbl_bsak_belnr.

MOVE: tbl_bsak-bukrs TO tbl_bsak_temp-bukrs,

tbl_bsak-gjahr TO tbl_bsak_temp-gjahr,

tbl_bsak-augbl TO tbl_bsak_temp-belnr,

tbl_bsak-monat TO tbl_bsak_temp-monat.

<b>APPEND tbl_bsak_temp.</b>

CLEAR tbl_bsak_temp.

ENDLOOP.

2)the following syntax whcih it moves all the records from one itab to other without lopp.

<b> APPEND LINES OF tbl_bsak TO tbl_bsak_temp</b>.

3) the following syntax is used to append the records from Database table to internal table which it contain alread records.

Suppose tbl_bsak contains some records againg you need to add some more records into the existing tbl_bsak.

SELECT * FROM bsak

<b>APPENDING TABLE tbl_bsak</b>

FOR ALL ENTRIES IN tbl_bsak_temp

WHERE bukrs EQ tbl_bsak_temp-bukrs

AND gjahr EQ tbl_bsak_temp-gjahr

AND belnr EQ tbl_bsak_temp-belnr

AND monat EQ tbl_bsak_temp-monat

Reward with points if useful

Regards,

Vijay