difference between append and collect statement?

Answer Posted / sravan

APPEND statement adds the record to the internal table
body.We can't say it adds the new record at the end of the
internal table. It all depends on the type of the internal
table (standard,sorted or Hashed).
COLLECT statement searches for the data in the char type
fields and adds the numeric value.

eg.
if itab contains fields f1 and f2 f1 of char type and f2 of
numc type.
if itab contains data like this.
f1 f2
A 5
b 30
c 10

if we give collect stament like collect itab ( A and 15 as
values)

the data in the itab will become.
f1 f2
A 20
b 30
c 10


this is how it works

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give Some examples of reports generated in real time scenarion? Also give examples of standard reports in SAP used in real time?

2326


Explain data dictionary in abap?

602


How we format the data before before write statement in report ?

556


How do you move on to the next screen in interactive reporting?

614


Explain the client concept of sap.

585






What is evaluation path, where do we do it and why? : sap abap hr

574


In sap script how to print bar code in vertical manner

2632


What are the types of search helps? : sap abap data dictionary

642


what will happen if called program is not executable ?

1701


What are the features of abap/4 dictionary? : abap data dictionary

590


What are the types of subroutines? : abap data dictionary

588


Can you assign a matchcode object to a parameter? If so how?

601


Difference between sap script and report?

750


What are the different types of luws?

662


Explain the sequences of event block?

557