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 |
How to find Buffered or not?
2 Answers Cap Gemini, Unilogic Software, Visa Steel,
What type of user exits have you written?
3 Answers Deloitte, Kingfisher,
Does the call transaction method allow multiple transactions to be processed by sap?
hi, what is basic diff b/w RFCs and BAPI? What is basic diff b/w BADI and BAPLI?please dont give the general diff?please any one can tell me?
7. what are enhancements?
How can you change properties of screen elements dynamically in Module pool Programming ?
What are the two ways for restricting the value range for a domain ?
What are the function of the transport system and workbench organiser? : abap data dictionary
For which transaction you used BDC?
How would you suppress the display of a parameter on the selection screen?
how do you transport lsmw data from one system to another?
in script can i print the back page of a paper