difference between append and collect statement?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / aditya
append adds to end of the internal table, irrespective if
the same data was present or not.
collect doesnt add duplicate records as it searches for the key.
Is This Answer Correct ? | 7 Yes | 3 No |
Answer / chvpavankumar
append adds the recoed to table body
collect first search for the non numeric fields.if it same
adds the numeric values
Is This Answer Correct ? | 3 Yes | 6 No |
Answer / sainath
Append statement appends the contents of the header line at
the end of the internal table.
The Collect statement includes the header line of the
internal table in the table as the new entry or adds it to
the existing entry of the same type.
Is This Answer Correct ? | 0 Yes | 9 No |
What are subroutines? : abap modularization
Explain what are the problems in processing batch input sessions? How is batch input process different from processing on line?
what is SAP R/3? What it means?
what is the use append structure?? in data dictionary
Tools used for internal communication.
Name a few system global variables you can use in ABAP programs?
PLEASE HELP ANYONE ON THIS ISSUE,is there any problem with this function module :RHPQ_T77BX_ADD_QUALIS_OF_DPLAN. IT IS TRIGGERING BEFORE COMPLETION OF THE DEVELOPMENT PLAN but it has to trigger after compltion of development plan..this issue raised in my project..so reply urgently..thanks in advance..
What do you mean by pooled tables in sap abap? Also explain what do you mean by table pool? : abap data dictionary
when does end-of-page stmnt triggers in reports.
What are the tables using in diff modules like SD, PM, MM, QM AND FICO? give me some example names ? Do we need to use the existing tables in R/3 most of the time?
What is a BAdi? How to implement a BAdi?
what is use of STOP stsment