TAW_11 Chapter 3, Internal tables Flashcards
Its okay to resort sorted tables?
NEVER!!!
You can append a sorted table?
Only if the appended line will be in the correct order.
All reads of a sorted table are binary by default?
Correct
Can a hash table be sorted?
Yes, and this is appropriate if the hash table is to be used in a loop/endloop
What is the safest way to add a row to a sorted table?
insert with key
three operations might cause issues with a sort table violation.
INSERT, APPEND, MODIFY by index
It is best to INSERT using key and Modify using key. Best to avoid APPEND altogether
What is implicit specification with table operations?
using FROM where <> is a populated object with the a line of the table lne
What are the 4 ways of reading a table
By index (index)
by table key (with table key)
by any key (with key)
by implicit key (from)
What two keywords are mutually exclusive when writing table statements?
INDEX and TABLE will never occur together
By default does the insert use the table key?
Yes
Hashed tables cannot use index access?
This is true
Can I use MODIFY with table key to change key fields?
No, MODIFY by index will allow key fields to be changed. Do not use this with sorted tables and cannot be used with hashed tables
What table access commands can use implicit keys?
DELETE, MODIFY,INSERT, READ
MODIFY by key and INSERT by KEY can only use what type of key
Implicit
When performing INSERT, MODIFY, DELETE with in a table loop, what part of the syntax can be left out?
INDEX. The index will default to sy-tabix so
INSERT INTO
implies INSERT into INDEX
Can the abbreviated syntax (no index specified) be used outside of a loop?
No, It will not cause a syntax error but will cause a runtime error
Can MODIFY be used with a WHERE clause?
Yes, but you must specify TRANSPORTING
Also, WHERE can only be used with MODIFY, not MODIFY TABLE
Can DELETE be used with a where clause?
Yes, but only with DELETE, not with DELETE TABLE
Cn WHERE be used with HASHED tables?
Yes, within a loop only
What happens when you attempt to add a line to a sorted table with a unique key and the record already exists?
Just a sy-subrc 4. no dump
Can MOVE-CORRESPONDING be used with internl tables?
Yes, move-corresponding to works fine as long as no unique key violations exist in as a result of the move
What if I want to move entries from to but I want to keep the records already in ?
Use KEEPING TARGET LINES addition
DELETE ADJACENT DUPLICATES can be used with a HASED table?
It appears so but I need to check. It could only be on secondary key comparisons correct?
Which table types can be used with the collect statement?
All three, but SAP says that COLLECT is best suited for HASHED tables