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 not working

Former Member
0 Likes
1,207

i have internal table

Main report.

begin of itab_lst occurs 0,

seqno like zfit_cos01-seqno,

gsber like tgsbt-gsber,

cntsl like glt01-tslvt,

cnhsl like glt0-tslvt,

end of itab_lst.

data: xtab_lst like table of itab_lst with header line

Perform frm_gsber.

/Form.........................../

form frm_gsber.

loop at itab_rbusa.

perform frm_make_data. (inside this form i have

itab_lst table, each time i have to append

the records to xtab_list.)

loop at itab_lst.

move-corresponding itab_lst to xtab_lst.

append xtab_list.

endloop.

[

in this place if i print the xtab_list table it has

all the records appended.i get all records.

]

endloop.

endform.

[ but if we loop xtab_list and print outside the form it prints

only last records appended to it.why]

10 REPLIES 10
Read only

Former Member
0 Likes
1,003

Hello Ambichan,

I have a doubt about your global and local declarations. could you please check that out once?

What do you mean <i>outside the form</i>? Where exactly? and outside which form?

Also, please give the entire code and point out the area of your problem more clearly.

Regards,

Anand Mandalika.

Read only

0 Likes
1,003

hey

do u have any mail id.

prog is very big...i can explain u the fact and send u in mail..is it possible.

ambichan.

Read only

0 Likes
1,003

Hi ambi chan,

Check the WRITE statement, as you are mentioning that it is displaying only last record.May be the records are overwritten while displaying.

Thanks

Lakshman

Message was edited by: Lakshman Tandra

Message was edited by: Lakshman Tandra

Read only

0 Likes
1,003

i doubt with internal table definition.

could you please check out that..is it correct.

ambichan

Read only

0 Likes
1,003

actually what i want to do here is..

i want to append the records for each loop and pass it to

seperate table called xtab_lst..

finally i want to see the total records displayed here..

ambichan.

Read only

0 Likes
1,003

Hello Ambichan,

I'm almost sure that you don't need to have nested loops in here.

When you call the Subroutine FRM_GSBER, the internal tables <b>itab_lst</b> and <b>xtab_lst</b> are both empty. Is that correct?

What exactly are you trying to do in the Subroutine FRM_MAKE_DATA?

Why are you loopping at ITAB_LST after calling FRM_MAKE_DATA ?

Regards,

Anand Mandalika.

Read only

0 Likes
1,003

Hi Ambichan,

Is the source code which you had sent is the actual one, as I could see the internal table names which you are using while APPEND and MOVE-CORRESPONDING are different.

Thanks

Lakshman

Read only

0 Likes
1,003

That is a very good observation , Lakshman.

Read only

Former Member
0 Likes
1,003

1) wheather the same variable has been used as local in the subroutine

2) Also check wheather the list is printed in the same line whereas it should have been Write:\

3) Before looping xtab_lst just try to execute the command of READ TABLE XTAB_LST INDEX 0 and then try to run the Loop

Read only

0 Likes
1,003

hey i have posted the continued of this as new post

shall i close this and continue with that new post.

sorry for the inconvinience..

ambichan.