All Subjects Flashcards
What does CONV do?
Changes the supplied field to the expected type
What is the EXACT keyword do
Demands that the result be exactly the same value as the source
How does CORRESPONDING work ( not move corresponding)
Can be used in a method call to use structure fields of same name and type as input parameters
give an example of a SWITCH
As a replacement of a case/endcase
Gvtext = switch string( gvclass
When ‘Y’ then ‘bob’
When ‘4’ the ‘jim’
Else ‘fran’ )
Can also have local variables defined by LET
Can also be used with write. WRITE SWITCH string( gvfield when 4 then ‘it was 4
Give an example if COND
Replaces if/elseif
Gvvalue = COND I( when la2 = 6 then 4 )
What is difference between a data type and a data object
Objects take up memory. They are of a type. A type is just a specification
What are the length and value ranges of the 6 numeric abap types
I - integer - length of 4 bytes - range of -2,147,483,648 to + 2,147,483,647 no decimals
p - packed - length of 1 to 16/initial length of 8, range of 2* length -1 and up to 14 decimals
F - binary floating point - length of 8 - max length +/- 1.79E+308 min len +/- 2.22E-308 and zero up to 16 decimals
DECFLOAT16 - floating point decimal - length of 8 - max length +/- 1E+385 min +/- 1E-383 and zero up to 16 decimals
DECFLOAT34 - floating point decimal - length of 16 - max/min +/- 1E+6145 min +/- 1E-6143 and zero up to 34 decimals
INT8 - large integer - 8 bytes - really big numbers with no decimals
What is the maximum length of type C and N fields?
65,535
What maximum length of a type X field?
65,535
What’s the difference between clike and cseq?
Clike is for generic c,n,d,t, string
Csequence is for c and string only
What are the predefined generic types in ABAP
ANY DATA SIMPLE (only for elementary of flat character like structures) NUMERIC (I,I8,F,P,DECFLOAT16,DECFLOAT34) DECFLOAT (DECFLOAT16,DECFLOAT34) CLIKE (C,N,D,T,STRING) CSEQUENCE(C,STRING) XSEQUENCE(X,XSTRING)
What objects are part of the DEEP category?
All reference objects
All internal tables
All structures with at least one deep component
Data types String and Xstring
How long can a literal be?
255
What differences exist between string and text literals
Trailing spaces are suppressed in a text literal but not a string literal
Use quotes in text literal, back quotes in a string
What are the three types of literals?
Numeric, text, string
If a table is declared in a form, or function module, it is visible throughout the entire program. True or false?
True
Can i have the same field name declared in the top of a program and in a form?
Yes, but the element of the same name in the top will not be a available while in the form
An inline data declaration cannot be addressed statically before the declaration. True or false.
True
Can inline declarations be used if the result type is generic? (Type any..)?
No
How is a host variable defined in an sql statement?
@
In new syntax for sql a comma must be between fields…true?
Yes
In the new open sql, what part of the statement should be last
INTO
In new sql what statement has been introduced?
FIELDS which can be placed after the FROM
Is SUBMIT program a synchronous or asynchronous process
Sychronous. The only way to process something async from a program is to call a function module starting new task
How can i submit a program and fill the called program selection screen?
You can specify a variant or provide specific values for input fields
How do I pass a select option to a submit program?
WITH seloption (‘EQ’|’NE’) value
WITH sel-option BETWEEN val1 AND val2 SIGN (‘I’|’E’)
You can also pass a range table
What is the difference between LEAVE TO TRANSACTION and CALL TRANSACTION
Leave to transaction does not return to the calling program. Call transaction returns to the call point.
Call transaction skips the tcode auth check, not sure if leave to does or not.
What should you supply if from a program you call a transaction that does updates?
Specify the UPDATE as local, sync, async..
Default is async
How can i fill screen data of a called transaction
Using a table of the BDCDATA type
Data gtdata type table of bdcdata.
CALL TRANSACTION ‘bob’
USING gtdata
How can I receive messages from a called transaction?
Using the MESSAGES addition
Data gtmesssages type table of BDCMSGCOLL
CALL TRANSACTION ‘bob’
MESSAGES gtmessages
If a CALL TRANSACTION is in a program running in background, what must the program provide.
Basically the entire BDC table must be filled including functions
I would just creat a FM myself
What are the fields in the BDCDATA structure
program (only first record) Dynpro (only first rec of new screen) Dynbegin (‘X’ for first rec of screen only) Fnam Fval
If i want to call a transaction from a program but not have the user see screens, what do I do?
Same as BDC. Use mode = ‘N’
Is ABAP compiled or generated?
Compiled at runtime
Are programs loaded every time they are called?
No, program loads are saved on the apllication server and database buffer
Are temporary versions of programs (those being edited) stored?
No, only temp versions are used
What is the PXA
Program Execution Area. Each program can only exist once per app server. Roll areas are created for each running copy of the program
How can i tell if a program is loaded in the PXA
Use ST02 detail analysis, click program in other objects, click buffered objects
What is the maximum number of external sessions a user can have?
What is the default?
Where is it set?
16
6
rdisp/max_alt_modes
What is the maximum number of internal sessions that each external session can have?
9
These are the call transaction, submit….called from an external session process
How are function groups and global classes loaded into memory
One time when first called by a program. They are added to the program group and do not initiate a new internal session
Do internal sessions share function groups with other internal sessions or the external session?
No, the function group is loaded separately for each session
What happens when a function group calls another function group, what can happen
Errors can occur
Within a program group all programs share what components?
TABLES, NODES, COMMON PART
How can I analyze memory
SM04 and AL08
List some examples of how data can be shared between programs
Using the called program interface (selection screen) ABAP memory SAP memory (set/get) Database tables Local files
Give an example of ABAP Memory usage between internal sessions
EXPORT
conn = gconn
Flights = gflights (this is a table)
TO MEMORY ID ‘myid’
In next orogram IMPORT conn = gconn Flights = gtflights FROM MEMORY ID ‘myid’
How is the MEMORY ID cleared?
FREE MEMORY ID
When dealing with internal tables what do these three keywords do
CLEAR, REFRESH, FREE
CLEAR AND REFRESH remove the data
FREE clears data and releases the memory
When dealing with passing strings and internal tables as parameters is by value different than by reference?
Technically no. They are passed by sharing. However, if you use call by value and then change the object in the called procedure then a resource intensive copy occurs
Where is a shared area defined?
Transaction SHMA
What is the super class of shared area classes?
CL_SHM_AREA
How can i see all shared memory
SHMM shared memory monitor
Name the 5 numeric data OBJECT types
I - integer
P - packed decimal
F - binary floating point arithmetic
DECFLOAT16 and DECFLOAT34 - decimal floating point
Are integer results rounded or truncated?
Rounded
In packed fields what are the two possible values of the last byte?
D for negative
C for positive
When fixed point arithmetic is turned off, what happens?
The decimals definition of a packed field is only used for output. The program treats all numbers as integers regardless of the presence of a decimal.
So 123.67 is treated as 12367
DECFLOAT16 and DECFLOAT34 are like type P or type F in regards to accuracy of decimal handling?
Like type P
Explain the arithmetic conversion rules for mixed expressions
If all are I then I
If one is p then p
If one is f then f (this include DECFLOAT34 and DECFLOAT16)
If a type p and a type f exist, type f is used
What are the classical keywords used in text processing
CONCATENATE, FIND, REPLACE, SHIFT,SPLIT, CONDENSE, OVERLAY, TRANSLATE, WRITE TO
In unicode systems what mode should be used with the SHIFT keyword
PLACES IN BYTE MODE
List logical operators for character and byte operations
CO, CA, CS, CP, CN, NA, NS, NP
BYTE-CO, BYTE-CA, BYTE-CS, BYTE-CN, BYTE-NA, BYTE-NS
If a D (date) field is used in arithmetic, its value is converted to..
The number of days since January 1, 0001
If a T (time) field is used in arithmetic its value is converted to…
The number of seconds since midnight
There are 16 formating options for expressions. Name 10
WIDTH ALIGN (left, center, right) PAD CASE SIGN EXPONENT DECIMALS ZERO STYLE CURRENCY NUMBER DATE TIME TIMESTAMP TIMEZONE COUNTRY
What literals in string processing must be escaped by a \ in literal text
|
{
}
So if i want to have a } i would enter it as }
There are 6 descriptive string functions. What are they?
STRLEN (returns length)
NUMCHAR (returns length excluding trailing blanks)
FIND (returns offset)
FIND_ANY_OF (returns offset of any character contained in the pattern, always case sensitive)
COUNT (number of occurrences)
COUNT_ANY_OF (number of occurrences of any character contained in pattern, always case sensitive)
What are the three categories of string functions
Descriptive functions which return a numeric result
Processing functions which return a character result
Predicate functions which return true or false
What are the 18 processing functions for strings? Name 12
Shift-left shift-right condense to-upper and to-lower and to-mixed and from-mixed replace insert substring Cmax and cmin Concat-lines-of Escape Match Repeat Reverse Translate
What are the predicate string functions
Contains, contains-any-of, matches
What is the regular expression operator for any character?
.
The preiod
What is the regular expression operator for zero or more occurrences?
*
Asterisk
What is the regular expression operator for 1 or more.
+
Plus
What is the regular expression operator for min/max occurrences?
{m,n}
What is the regular expression operator for exactly # of occurrences?
{m}
What is the regular expression operator for 0 or 1 occurrences?
?
Question mark
What is the regular expression operator to indicate or?
|
Like if it can be A or B it would be written as A|B
What is the regular expression operator for substring?
( )
So if a string could be ABC or ADC
I would write as A(B|D)C
What regular expression operators indicate the start and end of a line.
^ and $
What regular expression operators indicate the start and end of a word
< and >
What is the escape character for regular expressions.?
\
What are some of the regular expression operators for single character
. = any character
\u = any upper case
\l = any lower case
\d = any digit
[] = any value include between the brackets [ACDRf]
Placing a ^ in the brackets makes it a not [^ACDRf]
Placing a - makes it a value range [A-F] or [^A-F]
You can also use groups like [[:upper:]] or [[:digit:]]
Additional regular expression character combinations include
{n} {n,m} ? * \+ | (?:) ( j
Where can regular expressions be used in ABAP keywords?
FIND and REPLACE
What string functions support the use of regular expressions
COUNT COUNT_ CONTAINS FIND FIND_ MATCH MATCHES REPLACE SUBSTRING SUBSTRING_
Can a standard table have a unique key?
No
What additional object is created when creating a hash table?
A hash board
Can I loop at a hash table?
Yes you can. And you can loop using the defined keys
Can a hash table be sorted?
Yes it can. Only needed if you are going to loop thru it
What are three index operations that might corrupt a sorted table?
APPEND, MODIFY, INSERT (index specified)
When the key is implicit, does the FROM need to have the same structure as the INTO?
No
READ TABLE bob
FROM bobsearch
INTO bobresult
In this case the fields of bobsearch are used as key fields but the structure does not need to match bobresult
What is internal table implicit key vs explicit key
FROM is implicit. The fields of the key are populated in a structure
DELETE TABLE tbob FROM areabob
WITH TABLE KEY
Fld1 = val1
What is the easist way to look at code and tell whether the access is key or index
All index access has the word INDEX. All key access has the word TABLE. INDEX and TABLE are mutually exclusive when accessing internal tables
When using DELETE by key. What two approaches work?
FROM, or TABLE KEY. Generic KEY can not be used
With what KEY operations are limited to using an implicit (from) key?
MODIFY, INSERT
What three index operations can be used on standard and sorted tables
DELETE, APPEND, MODIFY, INSERT
What three stanents can be used without the INDEX addition within a loop that will cause an exception if used outside of a loop?
INSERT, MODIFY, DELETE can all be used without the index addition within a loop because the system will use sy-tabix as the default. Using these statements outside of a loop without the INDEX addition causes a short dump
When using the WHERE keyword with MODIFY within an internal table, what other keyword must be used?
TRANSPORTING
When using the WHERE clause for internal table processing, the TABLES keyword is omitted. True or false.
True
Delete mytab where carrid = ‘BOB’
Can a WHERE clause be used when accessing a HASH table?
Apparently yes but i need to check on this
After 7.4 move-corresponding can be used for internal tables as well as structures. Is this statement true?
Yes
If I want to use move-corresponding to populate a table from a table without overwriting existing lines what KEYWORD must I add?
KEEPING TARGET LINES
MOVE-CORRESPONDING tab1 TO tab2 KEEPING TARGET LINES
What are the 3 variants of the COMPARING keyword used for deleting adjacent duplicates?
COMPARING
COMPARING col1 col2 col3
COMPARING ALL FIELDS
What prerequisite must be met before the COLLECT statement can be used?
All non-key fields must be numeric. Easily accomplished by declaring the internal table with the DEFAULT KEY option.
Secondary table keys can be unique or non-unique. Is this true?
Yes
Secondary internal table keys can be of what types
UNIQUE STANDARD
NON-UNIQUE SORTED
UNIQUE HASHED
What is the maximum number of secondary keys for an internal table?
15
What are the four internal table processing statements where a secondary key cannot be used?
APPEND, INSERT, READ TABLE…WITH TABLE KEY, DELETE TABLE …WITH TABLE KEY
What’s more expensive, a secondary key, or resorting a table?
The secondary key is more expensive
READ TABLE itab1 INDEX idx INTO workarea
Can be replaced with…..in the new syntax?
workarea = itab1[idx]
READ TABLE itab INDEX idx USING KEY key INTO workarea
Can be replaced by what using new syntax?
Workarea = itab[ KEY key INDEX idx]
READ TABLE itab WITH KEY col1 = ‘val1’ INTO workarea
Can be replaced by what using new syntax?
Workarea = itab[ col1 = val1 ]
READ TABLE itab WITH TABLE KEY key COMPONENTS col1 = val1 INTO workarea. Can be replaced by what in new syntax?
Workarea = itab[ KEY key col1 = val1 ]
Note components keyword is optional after key
What would the following do?
Tab2 = VALUE #( BASE = tab1
Col1 = ‘bob’ ) ).
This would append a line to tab1 before copying it to tab2
What is the difference between these commands?
VALUE #( BASE = itab2 )
VALUE #( FOR tline in itab2 where(….
BASE is all of the table
FOR is an iterative statement. We will loop thru itab2 into tline based on the where statement. So lines not in the where statement will not be processed
Two new built in functions exist for determining if a line exists and where. Give examples of both.
idx = LINE_INDEX( itab1[ ] )
IF LINE_EXISTS( itab1[ ])
….
ENDIF.
How is a generic data reference declared?
Type ref to DATA
How do I assign a data reference to an actual data field?
GET REFERENCE OF into
so;
data my_field type I value 10.
data my_ref type ref to I.
GET REFERENCE OF my_field into my_ref.
or
my_ref = REF #( my_field ).
What does the dereference of a data object do? and when must it be used?
It can always be used as an alternative but when the reference is TYPE REF TO DATA it must be used. And the result mut be assigned to a field symbol.
data my_field type I value 10.
data my_ref type ref to data
GET REFERENCE OF my_field into my_ref.
Assign my_ref->* to .
How can I tell if a reference is assigned?
If is [NOT] bound
Assign, check assignment, unassign a field symbol
ASSIGN my_field TO .
IF is assigned….
UNASSIGN
How is an inline field symbol declared
ASSIGN afield TO FIELD_SYMBOL()
Is a field symbol a dereferenced pointer?
Yes, it pretty much is
Can you use CASTING when accessing an internal table with a field symbol?
No
List two restrictions for using field symbol assignment in a LOOP
You cannot use SUM
You can not reassign or unassign the field symbol within the loop
ABAP allows what types of dynamic statements
Dynamic
- extension of internal tables or strings
- offset and length specifications
- Specification of program object names (forms, methods, sort criteria..)
- Specification of type and data declarations
In a select statement, what can be dynamically supplied
FROM, WHERE, and the field list
In a select statement, what cannot be dynamically supplied
INTO (although you can use an inline declaration to serve the same purpose)
When a dynamic object is used, how is it identified
In parentheses with no spaces (dynamic)
When calling a function module or method dynamically, how are parameters passed?
Using the PARAMETER-TABLE statement
When calling a function module or method dynamically, how are exceptions passed?
Using the EXCEPTION-TABLE statement
What does INSERT REPORT do
Creates a permanent program in the repository
GENERATE SUBROUTINE POOL
Creates a transient include
Is it possible to dynamically assign a variable to a fields symbol?
Yes, use type ANY
FIELD-SYMBOL .
gv_name = ‘MY_STRUCT-FIELD’.
ASSIGN (gv_name) to .
When assigning components of a structure are assigned to a field system, what are the two methods of addressing?
By name or component number.
What is the only keyword that can be used to dereference a generically typed reference variable?
ASSIGN reffld->* to FS must be a generically typed field symbol example DATA my_data TYPE REF TO DATA. FIELD-SYMBOL TYPE ANY ASSIGN mY_data->* TO . = 5
What is the RTTI and what is it used for?
Runtime Type Identification and it is used to query information about run time objects
What are the four abstract classes of the RTTI
CL_ABAP_TYPEDESCR
CL_ABAP_DATADESCR
CL_ABAP_COMPLEXDESCR
CL_ABAP_OBJECTDESCR
What are the six RTTI classes tht can be instanciated?
CL_ABAP_ELEMDESCR CL_ABAP_REFDESCR CL_ABAP_STRUCTDESC CL_ABAP_TABLEDESCR CL_ABAP_CLASSDESCR CL_ABAP_INTFDESCR
Can the RTTI classes be instantiated directly using CREATE OBJECT?
No, you must use the static method CL_ABAP_TYPEDESCR=>DESCRIBE_BY_xxxx
What are the four DESCRIBE_BY_ types in RTTI?
DESCRIBE_BY_NAME
DESCRIBE_BY_DATA
DESCRIBE_BY_DATA_REF
DESCRIBE_BY_OBJECT_REF
What is the RTTC?
RunTime Type Creation
Describe what the CREATE DATA statement builds
The CREATE DATA statement;
- creates a data object dynamically
- assigns memory to it
- points the data reference variable to tht object in memory
- The data object is not given a name and has to be dereferenced to be used
What tasks are performed by the Open SQL Interface?
- Translate the open SQL to native SQL
- Add the client to the request
- Manages the SAP buffer
What is a DB-WP and what does it do?
The DataBase Work Process is a shadow process of the database. Each SAP WP is assigned to one DB-WP when database access is required
What is the transaction code for SQL Trace
ST05
What are the two types of database optimizers?
Rule based and cost based
What are the read times for these three scenarios?
Read from Application Server Table Buffer
Read from Database Buffer
Read from Database
.1ms for app server
1ms for database buffer
10ms for database
What is the recommended setting for buffer refresh in seconds?
60 to 240
What is the size recommendation for buffered tables
Less than 10mb
What happens if the table buffer runs out of space?
The newly buffered objects will overwrite the old
What is read to determine if buffered information has changed and needs to be sychronized
DDLOG
What fields cannot be used in the Select/Order by clause
String, LCHAR, LRAW, RAW_STRING
Can SELECT DISTINCT be used on Pool and Cluster tables?
Yes, but you must use * in the field list. You cannot select individual columns
What are the 5 aggregate functions allowed by Open Sql
Min( colname } Max( colname ) AVG( colname ) SUM( colname ) Count( * )
What are the two prerequisites for using “ORDERBY PRIMARY KEY”
Single table in the FROM. No views
All fields of the primary key must be included in the field list
What will COUNT( DISTINCT colname ) provide
A count of the unique values of the column
If a select contains both columns and aggregate functions, how is the data returned?
As a table
If a select contains both columns and aggregate functions, what other keyword must exist?
GROUP BY. Group by must include all non-aggregate fields in the field list. It can contain fields not in the select list but this is not recommended
What can the HAVING function contain
HAVING is after group by. It can only contain fields in the GROUP BY clause or aggregate functions.
Do Aggregate functions in the HAVING need to mimic the aggregate functions in the Select?
Nope, they can be different
There are 8 types of operators used with the WHERE clause. Name them!
- The EQ, LT, GT, NE, LE, GE or (=,,<>, <=,>=)
- BETWEEN obj1 AND obj2
- IN (obj1, obj2)
- IN a range table or select option table
- LIKE using % as the wildcard, or _ for single character
- IS [NOT] NULL
- AND, OR
- NOT
In a LIKE comparison how can I search for a wildcard character such as !
use the keyword ESCAPE. For example
WHERE fld1 LIKE ‘__!_’ ESCAPE ‘!’
would allow a search for a _ in the third column of the field
Can the APPENDING be used in a select statement where the target table is HASHED or SORTED
Yes, the APPENDING and APPENDING CORESPONDING ncan be used. The system converts these to inserts
What is the only possible reason to use a SELECT/ENDSELECT
If the result set would be too large for the memory area
What Parameter can be added to select/endselect to control the number of records of each pass
PACKAGE SIZE
The class lists 9 new operators and functions for 750. What are they?
&& LENGTH LPAD LTRIM RTRIM RIGHT REPLACE SUBSTRING CONCAT
What is the difference between && and CONCAT?
CONCAT uses exactly 2 operands.
CONCAT can handle sting types
CONCAT can have a reult length of 1333 where as && has a max of 255
There are 10 new arithmetic operands that can be used within the select. Name them.
+, -, *, /
ABS, CEIL, FLOOR, DIV, MOD
ROUND
What keyword can be used in a select to convert the type of a field to one that can be used in mathematical equations
CAST( fld as TYPE type ) / CAST( fld2 as TYPE type )
Can only fields of the table be used in CAST?
No, CAST( 100 as TYPY FLTP ) is also acceptable
Can CASE be used in a select statement?
Yes it can CASE fld1 WHEN 'A' THEN '123' WHEN 'B' THEN 'ABC' ELSE '1W2' END AS fld2.
Within a select can CASE only be used with a single field?
No, CASE can also be used in expressions. For example CASE WHEN fld1 GT fld2 THEN 'X ELSE ' ' END AS fld2
Nested selects should…..?
Be avoided at all costs
Client handling in views is the responsibility of the programmer…..?
Not any more. Implicit handling of CLIENT now happens automatically
What is the maximum number of tables in a join?
50
What is the maximum number of subqueries in a join?
50
Where can a subquery be added to a SELECT?
In the WHERE or HAVING clause
When using FOR ALL ENTRIES how are duplicates handled
They are deleted. It is best if you can remove duplicates from the driving table
How does ASSERT work?
If the ASSERT is false then the program fails
What are the four states of an ASSERT
Inactive (bypassed)
Break (debugger opens if assertion fails)
Log (write to the log if the assertion fails)
Abort (runtime error if fails)
What are the run time analysis tcodes
SAT replaced SE30
In ST05 results what are the two methods of grouping SQL statements
Value Identical and Structure Identical
How is the SQL Monitor accessed
First it must be activated. It is activated by SQLM. It can be read thru SQLM or SQLMD