Sie sind auf Seite 1von 26

SAP ABAP FAQ - Frequently Asked Questions

The ANSWERS is in BOLD.


Please note that not all questions have answers.

1. If a table does not have MANDT as part of the primary key, it is.

A: A structure
B: Invalid
C: Client-independent
D: Not mandatory

2. In regard to CALL, which of the following is NOT a valid statement?

A: CALL FUNCTION
B: CALL SCREEN
C: CALL TRANSACTION
D: CALL PROGRAM

3. Name the type of ABAP Dictionary table that has these characteristics:
Same number of fields as the database table
Same name as database table
Maps 1:1 to database table

A: Pooled
B: Cluster
C: Transparent
D: View

4. An event starts with an event keyword and ends with:

A: Program execution.
B: END-OF-EVENT.
C: Another event keyword.
D: END-EVENT.

5. What is the system field for the current date?

A: SY-DATUM
B: SY-DATE
C: SY-DATID
D: SY-SDATE

6. The following code indicates: A


SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab WHERE fld1 IN sfld1.
A: Add rows to the existing rows of itab.
B: Add rows to itab after first deleting any existing rows of itab.
C: Select rows from tab1 for matching itab entries.
D: Nothing, this is a syntax error.

7. You may change the following data object as shown below so that it equals 3.14.
CONSTANTS: PI type P decimals 2 value '3.1'.
PI = '3.14'.

A: True
B: False

8. The SAP service that ensures data integrity by handling locking is called:

A: Update
B: Dialog
C: Enqueue/Dequeue
D: Spool

9. Which of these sentences most accurately describes the GET VBAK LATE. event?

A: This event is processed before the second time the GET VBAK event is processed.
B: This event is processed after all occurrences of the GET VBAK event are completed.
C: This event will only be processed after the user has selected a basic list row.
D: This event is only processed if no records are selected from table VBAK.

10. Which of the following is not a true statement in regard to a hashed internal table
type?

A: Its key must always be UNIQUE.


B: May only be accessed by its key.
C: Response time for accessing a row depends on the number of entries in the table.
D: Declared using internal table type HASHED TABLE.

11. TO include database-specific SQL statements within an ABAP program, code them
between:

A: NATIVE SQL_ENDNATIVE.
B: DB SQL_ENDDB.
C: SELECT_ENDSELECT.
D: EXEC SQL_ENDEXEC.

12. To measure how long a block of code runs, use the ABAP statement:
A: GET TIME .
B: SET TIME FIELD .
C: GET RUN TIME FIELD .
D: SET CURSOR FIELD .

13. When a secondary list is being processed, the data of the basic list is available by
default.

A: True
B: False

14. Given:
DATA: BEGIN OF itab OCCURS 10,
qty type I,
END OF itab.

DO 25 TIMES. itab-qty = sy-index. APPEND itab.


ENDDO.

LOOP AT itab WHERE qty > 10.


WRITE: /1 itab-qty.
ENDLOOP.

This will result in:

A: Output of only those itab rows with a qty field less than 10
B: Output of the first 10 itab rows with a qty field greater than 10
C: A syntax error
D: None of the above

15. After a DESCRIBE TABLE statement SY-TFILL will contain

A: The number of rows in the internal table.


B: The current OCCURS value.
C: Zero, if the table contains one or more rows.
D: The length of the internal table row structure.

16. You may declare your own internal table type using the TYPES keyword.

A: True
B: False

17. After adding rows to an internal table with COLLECT, you should avoid adding more
rows with APPEND.
A: True
B: False

18. Which of the following is not a component of control break processing when looping
at an internal table?

A: AT START OF
B: AT FIRST
C: AT LAST
D: AT NEW

19. A dictionary table is made available for use within an ABAP program via the
TABLES statement.

A: True
B: False

20. Which of the following would be best for hiding further selection criteria until a
function is chosen?

A: AT NEW SELECTION-SCREEN
B: SELECTION-SCREEN AT LINE-SELECTION
C: SUBMIT SELECTION-SCREEN
D: CALL SELECTION-SCREEN

21. What must you code in the flow logic to prevent a module from being called unless a
field contains a non-initial value (as determined by its data type)?

A: ON INPUT
B: CHAIN
C: FIELD
D: ON REQUEST

22. The AT USER-COMMAND event is triggered by functions defined in the ____.

A: screen painter
B: ABAP report
C: menu painter status
D: ABAP Dictionary

23. In regard to a function group, which of the following is NOT a true statement?

A: Combines similar function modules.


B: Shares global data with all its function modules.
C: Exists within the ABAP workbench as an include program.
D: Shares subroutines with all its function modules.
24. In regard to SET PF-STATUS, you can deactivate unwanted function codes by using
____.

A: EXCLUDING
B: IMMEDIATELY
C: WITHOUT
D: HIDE

25. In regard to data transported in PAI when the FIELD statement is used, which of the
following is NOT a true statement?

A: Fields in PBO are transported directly from PAI.


B: Fields with identical names are transported to the ABAP side.
C: Fields not defined in FIELD statements are transported first.
D: Fields that are defined in FIELD statements are transported when their corresponding
module is called.

26. The order in which an event appears in the ABAP code determines when the event is
processed.

A: True
B: False

27. A field declared as type T has the following internal representation:

A: SSMMHH
B: HHMMSS
C: MMHHSS
D: HHSSMM

28. Which of the following is NOT a component of the default standard ABAP report
header?

A: Date and Time


B: List title
C: Page number
D: Underline

29. Assuming a pushbutton with function code 'FUNC' is available in the toolbar of a list
report, what event is processed when the button is clicked?

A: AT USER-COMMAND.
B: AT PFn.
C: AT SELECTION-SCREEN.
D: END-OF-SELECTION.
30. In regard to field selection, what option of the SELECT statement is required?

A: FOR ALL ENTRIES


B: WHERE
C: INTO
D: MOVE-CORRESPONDING *-- Dinesh

==If a table does not have MANDT as part of the primary key, it is _Client-independent ___.==
invalid

1. A structure
2. Invalid
3. Client-independent
4. Not mandatory

==In regard to CALL, which of the following is NOT a valid statement?==CALL PROGRAM

1. CALL FUNCTION
2. CALL SCREEN
3. CALL TRANSACTION
4. CALL PROGRAM

Contents
[Hide TOC]
• 1 Name the type of ABAP Dictionary table that has these characteristics:
• 2 An event starts with an event keyword and ends with:
• 3 The following code indicates:
• 4 The SAP service that ensures data integrity by handling locking is called:
• 5 Which of these sentences most accurately describes the GET VBAK LATE event?
• 6 When a secondary list is being processed, the data of the basic list is available by default.
• 7 Given:
• 8 Which of the following would be best for hiding further selection criteria until a function is chosen?
• 9 In regard to data transported in PAI when the FIELD statement is used, which of the following is
NOT a true statement?

• 10 A field declared as type T has the following internal representation:

[Edit section] Name the type of ABAP Dictionary table that has these characteristics:

• Same number of fields as the database table


• Same name as database table
• Maps 1:1 to database table : Transparent

1. Pooled
2. Cluster
3. Transparent
4. View

[Edit section] An event starts with an event keyword and ends with:

1. Program execution.
2. END-OF-EVENT
3. Another event keyword
4. END-EVENT

==What is the system field for the current date?== SY-DATUM

1. SY-DATUM
2. SY-DATE
3. SY-DATID
4. SY-SDATE

[Edit section] The following code indicates:


SELECT fld1 fld2 FROM tab1 APPENDING TABLE itab WHERE fld1 IN sfld1.

1. Add rows to the existing rows of itab


2. Add rows to itab after first deleting any existing rows of itab
3. Select rows from tab1 for matching itab entries
4. Nothing, this is a syntax error

==You may change the following data object as shown below so that it equals 3.14.== false
CONSTANTS: PI type P decimals 2 value '3.1'.
PI = '3.14'.

1. True
2. False

[Edit section] The SAP service that ensures data integrity by handling locking is called:
enqueue

1. Update
2. Dialog
3. Enqueue/Dequeue
4. Spool

[Edit section] Which of these sentences most accurately describes the GET VBAK LATE
event?

1. This event is processed before the second time the GET VBAK event is processed.
2. This event is processed after all occurrences of the GET VBAK event are completed.
3. This event will only be processed after the user has selected a basic list row.
4. This event is only processed if no records are selected from table VBAK.

==Which of the following is not a true statement in regard to a hashed internal table type?==
response time..

1. Its key must always be UNIQUE


2. May only be accessed by its key
3. Response time for accessing a row depends on the number of entries in the table
4. Declared using internal table type HASHED TABLE

==To include database-specific SQL statements within an ABAP program, code them
between:== # EXEC SQL_ENDEXEC
1. NATIVE SQL_ENDNATIVE
2. DB SQL_ENDDB
3. SELECT_ENDSELECT
4. EXEC SQL_ENDEXEC

==To measure how long a block of code runs, use the ABAP statement:== # GET RUN TIME
FIELD

1. GET TIME
2. SET TIME FIELD
3. GET RUN TIME FIELD
4. SET CURSOR FIELD

[Edit section] When a secondary list is being processed, the data of the basic list is
available by default.

1. True
2. False

[Edit section] Given:


DATA: BEGIN OF itab OCCURS 10, qty type I, END OF itab. DO 25 TIMES.
itab-qty = sy-index. APPEND itab. ENDDO. LOOP AT itab WHERE qty > 10. WRITE:
/1 itab-qty. ENDLOOP.

1. Output of the first 15 itab rows with a qty field greater than 10

This will result in:

1. Output of only those itab rows with a qty field less than 10
2. Output of the first 10 itab rows with a qty field greater than 10
3. A syntax error
4. None of the above

==After a DESCRIBE TABLE statement SY-TFILL will contain== # The number of rows in the
internal table

1. The number of rows in the internal table


2. The current OCCURS value
3. Zero, if the table contains one or more rows
4. The length of the internal table row structure

==You may declare your own internal table type using the TYPES keyword.== # True

1. True
2. False

==After adding rows to an internal table with COLLECT, you should avoid adding more rows
with APPEND.== # True

1. True
2. False
==Which of the following is not a component of control break processing when looping at an
internal table?== # AT START OF

1. AT START OF
2. AT FIRST
3. AT LAST
4. AT NEW

==A dictionary table is made available for use within an ABAP program via the TABLES
statement.== # True

1. True
2. False

[Edit section] Which of the following would be best for hiding further selection criteria
until a function is chosen?

1. AT NEW SELECTION-SCREEN
2. SELECTION-SCREEN AT LINE-SELECTION
3. SUBMIT SELECTION-SCREEN
4. CALL SELECTION-SCREEN

==What must you code in the flow logic to prevent a module from being called unless a field
contains a non-initial value (as determined by its data type)?== # ON INPUT

1. ON INPUT
2. CHAIN
3. FIELD
4. ON REQUEST

==The AT USER-COMMAND event is triggered by functions defined in the ____.== # Menu


painter status

1. Screen painter
2. ABAP report
3. Menu painter status
4. ABAP Dictionary

==In regard to a function group, which of the following is NOT a true statement?== # Shares
subroutines with all its function modules

1. Combines similar function modules


2. Shares global data with all its function modules
3. Exists within the ABAP workbench as an include program
4. Shares subroutines with all its function modules

==In regard to SET PF-STATUS, you can deactivate unwanted function codes by using ____.==
# EXCLUDING

1. EXCLUDING
2. IMMEDIATELY
3. WITHOUT
4. HIDE
[Edit section] In regard to data transported in PAI when the FIELD statement is used,
which of the following is NOT a true statement?

1. Fields in PBO are transported directly from PAI


2. Fields with identical names are transported to the ABAP side
3. Fields not defined in FIELD statements are transported first
4. Fields that are defined in FIELD statements are transported when their corresponding
module is called

==The order in which an event appears in the ABAP code determines when the event is
processed.== # False

1. True
2. False

[Edit section] A field declared as type T has the following internal representation:

1. SSMMHH
2. HHMMSS
3. MMHHSS
4. HHSSMM

==Which of the following is NOT a component of the default standard ABAP report header?== #
Date and Time

1. Date and Time


2. List title
3. Page number
4. Underline

==Assuming a pushbutton with function code 'FUNC' is available in the toolbar of a list report,
what event is processed when the button is clicked?== # AT USER-COMMAND

1. AT USER-COMMAND
2. AT PFn
3. AT SELECTION-SCREEN
4. END-OF-SELECTION

30. In regard to field selection, what option of the SELECT statement is required? A: FOR ALL
ENTRIES B: WHERE C: INTO D: MOVE-CORRESPONDING
31. The following program outputs what?
report zjgtest1 write: /1 'Ready_'. PARAMETER: test. INITIALIZATION. write: /1 'Set_'. START-
OF-SELECTION. write: /1 'GO!!'.
A: Set_ GO!! (each on its own line) B: Set_ Ready_ GO!! (all on their own lines) C: Ready_ GO!!
(each on its own line) D: Ready_ Set_ GO!! (all on their own lines)
32. To declare a selection criterion that does not appear on the selection screen, use: A: NO-
DISPLAY B: INVISIBLE C: MODIF ID D: OBLIGATORY
33. An internal table that is nested within another internal table should not contain a header line.
A: True B: False
34. What is output by the following code?
DATA: BEGIN OF itab OCCURS 0, letter type c, END OF itab. itab-letter = 'A'. APPEND itab.
itab-letter = 'B'. APPEND itab. itab-letter = 'C'. APPEND itab. itab-letter = 'D'. APPEND itab.
LOOP AT itab. SY-TABIX = 2. WRITE itab-letter. EXIT. ENDLOOP.
A: A B: A B C D C: B D: B C D
35. To select all database entries for a certain WHERE clause into an internal table in one step,
use A: SELECT_INTO TABLE itab_ B: SELECT_INTO itab_ C: SELECT_APPENDING itab D:
SELECT_itab_
36. After a successful SELECT statement, what does SY-SUBRC equal? A: 0 B: 4 C: 8 D: Null
37. This selection screen syntax forces the user to input a value: A: REQUIRED-ENTRY B:
OBLIGATORY C: DEFAULT D: SELECTION-SCREEN EXCLUDE
38. If the following code results in a syntax error, the remedy is:
DATA: itab TYPE SORTED TABLE OF rec_type WITH UNIQUE KEY field1 WITH HEADER
LINE. itab-field1 = 'Company'. itab-field2 = '1234'. INSERT TABLE itab. itab-field1 = 'Bank'. itab-
field2 = 'ABC'. INSERT TABLE itab. SORT itab. LOOP AT itab. write: /1 itab-field1, itab-field2.
ENDLOOP.
A: There is no syntax error here B: Remove the SORT statement C: Change INSERT to
APPEND D: Add a WHERE clause to the loop
39. If this code results in an error, the remedy is:
SELECT fld1 fld2 FROM tab1 WHERE fld3 = pfld3. WRITE: /1 tab1-fld1, tab1-fld2.
ENDSELECT.
A: Add a SY-SUBRC check. B: Change the WHERE clause to use fld1 or fld2. C: Remove the /1
from the WRITE statement. D: Add INTO (tab1-fld1, tab1-fld2).
40. When modifying an internal table within LOOP AT itab. _ ENDLOOP. you must include an
index number. A: True B: False
41. To allow the user to enter values on the screen for a list field, use: A: OPEN LINE. B: SET
CURSOR FIELD. C: WRITE fld AS INPUT FIELD. D: FORMAT INPUT ON.
42. Before a function module may be tested, it must first be: A: Linked B: Authorized C:
Released D: Active
43. To include a field on your screen that is not in the ABAP Dictionary, which include program
should contain the data declaration for the field? A: PBO module include program B: TOP
include program C: PAI module include program D: Subroutine include program
44. If a table contains many duplicate values for a field, minimize the number of records
returned by using this SELECT statement addition. A: MIN B: ORDER BY C: DISTINCT D:
DELETE
45. The system internal table used for dynamic screen modification is named: A: ITAB B:
SCREEN C: MODTAB D: SMOD
46. Within the source code of a function module, errors are handled via the keyword: A:
EXCEPTION B: RAISE C: STOP D: ABEND
47. Which system field contains the contents of a selected line? A: SY-CUCOL B: SY-LILLI C:
SY-CUROW D: SY-LISEL
48. The following statement writes what type of data object? WRITE: /1 'Total Amount:'. A: Text
literal B: Text variable C: In-code comment D: Text integer
49. For the code below, second_field is of what data type? DATA: first_field type P, second_field
like first_field. A: P B: C C: N D: D
50. Which of the following describes the internal representation of a type D data object? A:
DDMMYYYY B: YYYYDDMM C: MMDDYYYY D: YYYYMMDD
51. A BDC program is used for all of the following except: A: Downloading data to a local file B:
Data interfaces between SAP and external systems C: Initial data transfer D: Entering a large
amount of data
52. In regard to PERFORM, which of the following is NOT a true statement? A: May be used
within a subroutine. B: Requires actual parameters. C: Recursive calls are allowed in ABAP. D:
Can call a subroutine in another program.
53. What is the transaction code for the ABAP Editor? A: SE11 B: SE38 C: SE36 D: SE16
54. In regard to HIDE, which of the following is NOT a true statement? A: Saves the contents of
variables in relation to a list line's row number. B: The hidden variables must be output on a list
line. C: The HIDE area is retrieved when using the READ LINE statement. D: The HIDE area is
retrieved when an interactive event is triggered.
55. Database locks are sufficient in a multi-user environment. A: True B: False
56. The complete technical definition of a table field is determined by the field's: A: Domain B:
Field name C: Data type D: Data element
57. In regard to LEAVE, which of the following is NOT a true statement? A: May be used to
return immediately to a calling program. B: May be used to stop the current loop pass and get
the next. C: May be used to start a new transaction. D: May be used to go to the next screen.
58. The following code indicates:
SELECT fld6 fld3 fld2 fld1 FROM tab1 INTO CORRESPONDING FIELDS OF TABLE itab
WHERE fld3 = pfld3.
A: The order of the fields in itab does not matter. B: Fill the header line of itab, but not the body.
C: Table itab can only contain fields also in table tab1. D: None of the above.
59. The ABAP statement below indicates that the program should continue with the next line of
code if the internal table itab:
CHECK NOT itab[] IS INITIAL.
A: Contains no rows B: Contains at least one row C: Has a header line D: Has an empty header
line
60. What will be output by the following code?
DATA: BEGIN OF itab OCCURS 0, fval type i, END OF itab. itab-fval = 1. APPEND itab. itab-
fval = 2. APPEND itab. FREE itab. WRITE: /1 itab-fval.
A: 2 B: 0 C: blank D: 1
61. To allow the user to enter a range of values on a selection screen, use the ABAP keyword:
A: DATA. B: RANGES. C: PARAMETERS. D: SELECT-OPTIONS.
62. If an internal table is declared without a header line, what else must you declare to work with
the table's rows? A: Another internal table with a header line. B: A work area with the same
structure as the internal table. C: An internal table type using the TYPES statement. D: A
PARAMETER.
63. Assuming an internal table contains 2000 entries, how many entries will it have after the
following line of code is executed?
DELETE itab FROM 1500 TO 1700.
A: This is a syntax error. B: 1801 C: 1800 D: 1799
64. To remove lines from a database table, use ____. A: UPDATE B: MODIFY C: ERASE D:
DELETE
65. All of the following may be performed using SET CURSOR except: A: Move the cursor to a
specific field on a list. B: Move the cursor to a specific list line. C: Move the cursor to a specific
pushbutton, activating that function. D: Move the cursor to a specific row and column on a list.
66. When is it optional to pass an actual parameter to a required formal parameter of a function
module? A: The actual parameter is type C. B: The formal parameter contains a default value.
C: The formal parameter's \"Reference\" attribute is turned on. D: It is never optional.
67. Coding two INITIALIZATION events will cause a syntax error. A: True B: False
68. Adding a COMMIT WORK statement between SELECT_ENDSELECT is a good method for
improving performance. A: True B: False
69. To save information on a list line for use after the line is selected, use this keyword. A:
APPEND B: EXPORT C: WRITE D: HIDE
70. To bypass automatic field input checks, include this in PAI. A: AT EXIT-COMMAND B: ON
INPUT C: ON REQUEST D: LEAVE TO SCREEN 0.
71. Within a function module's source code, if the MESSAGE_RAISING statement is executed,
all of the following system fields are filled automatically except: A: SY-MSGTY B: SY-MSGNO
C: SY-MSGV1 D: SY-MSGWA
72. The following code indicates:
REPORT ZLISTTST. START-OF-SELECTION. WRITE: text-001. FORMAT HOTSPOT ON.
WRITE: text-002. FORMAT HOTSPOT OFF. AT LINE-SELECTION. WRITE / text-003.
A: Text-002 may not be selected. B: The value of text-002 is stored in a special memory area.
C: Text-002 may be clicked once to trigger the output of text-003. D: None of the above.
73. The ____ type of ABAP Dictionary view consists of one or more transparent tables and may
be accessed by an ABAP program using Open SQL. A: Database view B: Projection view C:
Help view D: Entity view
74. A concrete field is associated with a field-symbol via ABAP keyword A: MOVE B: WRITE C:
ASSIGN D: VALUE
75. The output for the following code will be:
report zabaprg. DATA: char_field type C. char_field = 'ABAP data'. WRITE char_field.
A: ABAP data B: A C: Nothing, there is a syntax error D: None of the above
76. Page footers are coded in the event: A: TOP-OF-PAGE. B: END-OF-SELECTION. C: NEW-
PAGE. D: END-OF-PAGE.
77. The event AT SELECTION-SCREEN OUTPUT. occurs before the selection screen is
displayed and is the best event for assigning default values to selection criteria. A: True B: False
78. The TABLES statement declares a data object. A: True B: False
79. Assuming tab1-fld7 is not a key field, how can you prevent reading all the table rows?
SELECT fld1 fld2 fld3 FROM tab1 INTO (fld4, fld5, fld6) WHERE fld7 = pfld7. WRITE: /1 fld4,
fld5, fld6. ENDSELECT.
A: Take fld7 out of the WHERE clause. B: Create an index in the ABAP Dictionary for tab1-fld7.
C: Use INTO TABLE instead of just INTO. D: Take the WRITE statement out of the
SELECT_ENDSELECT.
80. Which of the following is NOT a required attribute when creating an ABAP program? A:
Application B: Title C: Status D: Type
81. When creating a transparent table in the ABAP Dictionary, which step automatically creates
the table in the underlying database? A: Adding technical settings to the table B: Checking the
table syntax C: Saving the table D: Activating the table
82. Within the ABAP program attributes, Type = 1 represents: A: INCLUDE program B: Online
program C: Module pool D: Function group E: Subroutine pool
83. If this code results in an error, the remedy is:
SELECT fld1 SUM( fld1 ) FROM tab1 INTO_
A: Remove the spaces from SUM( fld1 ). B: Move SUM( fld1 ) before fld1. C: Add GROUP BY
f1. D: Change to SUM( DISTINCT f1 ).
84. Which keyword adds rows to an internal table while accumulating numeric values? A:
INSERT B: APPEND C: COLLECT D: GROUP
85. Assuming itab has a header line, what will be output by the following code?
READ TABLE itab INDEX 3 TRANSPORTING field1. WRITE: /1 itab-field1, itab-field2.
A: The contents of the third row's itab-field1. B: The contents of the third row's itab-field1 and
itab-field2. C: The contents of the third row's itab-field2. D: Nothing.
86. The following code indicates:
SELECTION-SCREEN BEGIN OF BLOCK B1. PARAMETERS: myparam(10) type C,
Myparam2(10) type N, SELECTION-SCREEN END OF BLOCK.
A: Draw a box around myparam and myparam2 on the selection screen. B: Allow myparam and
myparam2 to be ready for input during an error dialog. C: Do not display myparam and
myparam2 on the selection screen. D: Display myparam and myparam2 only if both fields have
default values.
87. Which statement will sort the data of an internal table with fields FRUIT, QTY, and PRICE so
that it appears as follows?
FRUIT QTY PRICE Apples 12 22.50 Apples 9 18.25 Oranges 15 17.35 Bananas 20 10.20
Bananas 15 6.89 Bananas 5 2.75
A: SORT itab DESCENDING BY QTY PRICE. B: SORT itab BY PRICE FRUIT. C: SORT itab.
D: SORT itab BY PRICE DESCENDING.
88. Which keyword adds a line anywhere within an internal table? A: APPEND B: MODIFY C:
ADD D: INSERT
89. To read a single line of an internal table, use the following: A: LOOP AT itab. _ ENDLOOP.
B: READ itab. C: SELECT SINGLE * FROM itab. D: READ TABLE itab.
90. Which Open SQL statement should not be used with cluster databases? A: UPDATE B:
MODIFY C: DELETE D: INSERT
91. To include a field on your screen that is not in the ABAP Dictionary, which include program
should contain the data declaration for the field? A: PBO module include program B: TOP
include program C: PAI module include program D: Subroutine include program
92. This flow logic statement is used to make multiple fields open for input after an error or
warning message. A: GROUP B: FIELD-GROUP C: CHAIN D: LOOP AT SCREEN
93. Given:
PERFORM subroutine USING var.
The var field is known as what type of parameter?
A: Formal B: Actual C: Static D: Value
Interview Questions Answers For Abaper
What are differences between At selection-screen and at selection-screen output?

At selection-screen output is triggered when the selection screen is loaded in memory


before being displayed.

The event AT SELECTION-SCREEN is the basic form of a whole series of events that
occur while the selection screen is being processed.

The standard selection screen in an executable program or in the logical database linked
to it is automatically called between the INITIALIZATION and START-OF-
SELECTION events. When you call the selection screen, and when users interact with it,
the ABAP runtime environment generates selection screen events, which occur between
INITIALIZATION and START-OF-SELECTION.

What are the events?

Initialization, At selection-screen,Start-of-selection,end-of-selection,top-of-page,end-of-
page, At line-selection, At user-command,At PF,Get,At New,At LAST,AT END, AT
FIRST.

What are the interactive events?

ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION


(double click) or AT USER-COMMAND (pressing a button). You can use these events
to move through layers of information about individual items in a list.

What is Hide?

Say HIDE f

Stores the contents of f in relation to the current output line in the HIDE area not
necessary for f to appear on current line
place the HIDE statement immediately after the output statement for f
User selection of a line for which HIDE fields are available fills the variables in the
program with the values stored.

How can you write programatically value help to a field without?

Using searchhelp and matchcodes.?

What is RFC?

Remote Function Call. RFC is an SAP interface protocol. Based on CPI-C, it


considerably simplifies the programming of communication processes between systems.
RFCs enable you to call and execute predefined functions in a remote system - or even in
the same system.
RFCs manage the communication process, parameter transfer and error handling.

What are client-dependant tables and independent tables?

In SAP systems we have many clients. A client independent table contains data that can
be accessed from any client. Generally these tables contain SAP control data, language
indicators and transaction codes.

Client Dependent tables contain data which is applicable to one specific client. These
tables contain data related to a particular company, for eg. structure of the company,
basic commercial data etc..

How to distinguish them?

All client – dep tables have the field MANDT, other don’t.

What are the domains?

Domain is the central object for describing the technical characteristics of an attribute of
an business objects. It describes the value range of the field

What are the check tables and value tables?

Value Table - This is maintained at Domain Level.


When ever you create a domain , you can entered allowed values. For example you go
to Domain SHKZG - Debit/credit indicator. Here only allowed values is H or S. When
ever you use this Domain, the system will forces you to enter only these values. This is
a sort of master check . To be maintained as a customization object. This mean that if you
want to enter values to this table you have to create a development request & transport
the same.

Check table - For example you have Employee master table & Employee Transaction
table. When ever an employee Transacts we need to check whether that employee
exists , so we can refer to the employee master table. This is nothing but a Parent &
Child relationship . Here data can be maintained at client level , no development
involved. As per DBMS what we call foregin key table, is called as check table in SAP.

What are lock objects?

The R/3 System synchronizes simultaneous access of several users to the same data
records with a lock mechanism. When interactive transactions are programmed, locks are
set and released by calling function modules (see Function Modules for Lock Requests).
These function modules are automatically generated from the definition of lock objects in
the ABAP Dictionary.
What are the different internal tables ? Explain them?

Standard Internal Tables - Standard tables have a linear index. You can access them using
either the index or the key. If you use the key, the response time is in linear relationship
to the number of table entries. The key of a standard table is always non-unique, and you
may not include any specification for the uniqueness in the table definition.

This table type is particularly appropriate if you want to address individual table entries
using the index. This is the quickest way to access table entries. To fill a standard table,
append lines using the (APPEND) statement. You should read, modify and delete lines
by referring to the index (INDEX option with the relevant ABAP command). The
response time for accessing a standard table is in linear relation to the number of table
entries. If you need to use key access, standard tables are appropriate if you can fill and
process the table in separate steps. For example, you can fill a standard table by
appending records and then sort it. If you then use key access with the binary search
option (BINARY), the response time is in logarithmic relation to the number of table
entries.

Sorted Internal Tables - Sorted tables are always saved correctly sorted by key. They also
have a linear key, and, like standard tables, you can access them using either the table
index or the key. When you use the key, the response time is in logarithmic relationship
to the number of table entries, since the system uses a binary search. The key of a sorted
table can be either unique, or non-unique, and you must specify either UNIQUE or NON-
UNIQUE in the table definition. Standard tables and sorted tables both belong to the
generic group index tables.

This table type is particularly suitable if you want the table to be sorted while you are still
adding entries to it. You fill the table using the (INSERT) statement, according to the sort
sequence defined in the table key. Table entries that do not fit are recognised before they
are inserted. The response time for access using the key is in logarithmic relation to the
number of table entries, since the system automatically uses a binary search. Sorted tables
are appropriate for partially sequential processing in a LOOP, as long as the WHERE
condition contains the beginning of the table key.

Hashed Internal Tables - Hashes tables have no internal linear index. You can only access
hashed tables by specifying the key. The response time is constant, regardless of the
number of table entries, since the search uses a hash algorithm. The key of a hashed table
must be unique, and you must specify UNIQUE in the table definition.

This table type is particularly suitable if you want mainly to use key access for table
entries. You cannot access hashed tables using the index. When you use key access, the
response time remains constant, regardless of the number of table entries. As with
database tables, the key of a hashed table is always unique. Hashed tables are therefore a
useful way of constructing and
using internal tables that are similar to database tables.
What is runtime analysis?
This runtime analysis tools allows the ABAP/4 programmer to trace the tables used by
the SAP dialog/reports programs. In the Analyze button, you can see four more buttons
like:-

Hit List - Displays the execution time of each statement in the program.
Tables - Displays the tables accessed during run time.
Group hit list - Displays the execution time of all the statements and grouping them
based on the type of command. e.g. performs, SQL and internal tables used.
Hirarchy - Displays the execution time of each statement in the actual order in which
were executed. Uses indentation to indicate the level of nesting of statements within
subroutines.

Any tables use by the transaction or program can be easily trace with the runtime analysis
tools.
Go to transaction SE30
Type in the transaction code you want to analyze.

What are session mothod and call transaction method and explain about them?
Methods in which you can do a BDC the difference between session and call transaction
is Session method.

Question
How can I automatically upload data to SAP, and How can I download some data to Excel or
other popular files.
[Edit section] Answer 1
SAP Download and SAP Upload are the more popular keywords around SAP in the search
engines.
That means many people are not happy with the current solutions offered.
SAP upload: if you have hundreds of materials to create or to modify, the solutions available
are:

• Build a program in ABAP.


• Use one SAP tool called LSMW (Legacy Systems Migration Workbench).
• Use one internal test tool called CATT (Computer Aided Test Tool).
• Use some easy to use third party tools such as Process Runner, Z Option, EzySolutions
from Gesix, WinShuttle, or DSM ERP from EPI-USE.
• For some business objects, use the SAP mass maintenance transactions such as MASS
or MM17
• If SAPGui scripting is enabled, the user can "script" an upload / modify job by looping
through say an Excel table with vbscript. See
Use_Script_Recording_and_Playback_to_automate_user_updates. Requires a medium
level of skill to edit a recorded script
• Use the GUIXT tool from Synactive Inc. with the InputAssistant add-on (expensive!)

The SAP internal solutions are usually not available to end users, and require some strong
technical knowledge.
[Edit section] Answer 2
To download from SAP to Excel:

• Many SAP reports have direct download function to EXCEL.


• SAP Query and SAP QuickViewer are excellent tools for Downloading (BvdR AO).
• Transaction SE16N allows you to access any sap table and download result to Excel
• SAP RFC functions can be called directly from Excel / VBA.

Use transaction BAPI in SAP to find your business object and study the function.
If you know the SAP table the RFC RFC_READ_TABLE offers a SQL query
of the table
Trouble is .. you can not use joins here. you have to put the join in
as a query in the SAP database and use the query in RFC_READ_TABLE
To upload data from Excel into SAP:

• Some of the Business functions (BAPI's / RFC unctions) offer data upload
• The general tool in SAP for data upload is the Batch input / call transactions

In the batch input file you specify screen by screen and field by field the input to SAP. SAP has
a recorder to create the sample file. Just run trans SHDB and within this trans you run a case of
the changes you want to do. On exit of the trans you will have a batch input file that you can
download and from excel manipulate the file before you call the RFC function
RFC_CALL_TRANSACTION.
Did I say it was easy ? No , not really , but it's a set of very powerful tools there if you take your
time to study them. Our company would not manage without them.
[Edit section] Commercial Tools

• Process Runner allows you to download and upload from Excel to SAP (Transaction or
BAPI) or vice versa without writing code.
• To be able to Upload/Download from the one place see EzySolutions from Gesix
• For SAP downloads directly to Excel try the SAP Data Downloader MS Access
application. You can download the demo version from Opal Software Solutions.
• For GL entries, see GLSU from Z Option
• See also TxShuttle

[Edit section] Answer 3


Use FM "ALSM_EXCEL_TO_INTERNAL_TABLE" using this fm we can upload excel to internal
table
[Edit section] Answer 4
To Download data from a Structure to MS Access use the "MS Access Interface"
This is a Standard SAP interface, which is used to transfer structures and data between R/3 and
Microsoft Access.
The four main features available with this interface are
a) Download R/3 structures to MS Access.
b) Download R/3 table data to MS Access.
c) Upload materials from MS Access tables to a network in R/3.
d) Upload confirmations from MS Access tables to a network in
R/3.
1. What is an ABAP data dictionary?

ABAP 4 data dictionary describes the logical structures of the objects used in
application development and shows how they are mapped to the underlying
relational database in tables/views.

2. What are domains and data element?

Domains:Domain is the central object for describing the technical characteristics of


an attribute of an business objects. It describes the value range of the field. Data
Element: It is used to describe the semantic definition of the table fields like
description the field. Data element describes how a field can be displayed to end-
user.

3. What is foreign key relationship?

A relationship which can be defined between tables and must be explicitly defined at
field level. Foreign keys are used to ensure the consistency of data. Data entered
should be checked against existing data to ensure that there are now contradiction.
While defining foreign key relationship cardinality has to be specified. Cardinality
mentions how many dependent records or how referenced records are possible.

4. Describe data classes.

Master data: It is the data which is seldomly changed. Transaction data: It is the
data which is often changed. Organization data: It is a customizing data which is
entered in the system when the system is configured and is then rarely changed.
System data:It is the data which R/3 system needs for itself.

5. What are indexes?

Indexes are described as a copy of a database table reduced to specific fields. This
data exists in sorted form. This sorting form ease fast access to the field of the
tables. In order that other fields are also read, a pointer to the associated record of
the actual table are included in the index. Yhe indexes are activated along with the
table and are created automatically with it in the database.

6. Difference between transparent tables and pooled tables

Transparent tables: Transparent tables in the dictionary has a one-to-one relation


with the table in database. Its structure corresponds to single database field. Table in
the database has the same name as in the dictionary. Transparent table holds
application data. Pooled tables. Pooled tables in the dictionary has a many-to-one
relation with the table in database. Table in the database has the different name as
in the dictionary. Pooled table are stored in table pool at the database level.

7. What is an ABAP/4 Query?


ABAP/4 Query is a powerful tool to generate simple reports without any coding.
ABAP/4 Query can generate the following 3 simple reports: Basic List: It is the
simple reports. Statistics: Reports with statistical functions like Average,
Percentages. Ranked Lists: For analytical reports. - For creating a ABAP/4 Query,
programmer has to create user group and a functional group. Functional group can
be created using with or without logical database table. Finally, assign user group to
functional group. Finally, create a query on the functional group generated.

8. What is BDC programming?

Transferring of large/external/legacy data into SAP system using Batch Input


programming. Batch input is a automatic procedure referred to as BDC(Batch Data
Communications).The central component of the transfer is a queue file which
receives the data vie a batch input programs and groups associated data into
“sessions”.

9. What are the functional modules used in sequence in BDC?

These are the 3 functional modules which are used in a sequence to perform a data
transfer successfully using BDC programming: BDC_OPEN_GROUP - Parameters like
Name of the client, sessions and user name are specified in this functional modules.
BDC_INSERT - It is used to insert the data for one transaction into a session.
BDC_CLOSE_GROUP - This is used to close the batch input session.

10. What are internal tables?

Internal tables are a standard data type object which exists only during the runtime
of the program. They are used to perform table calculations on subsets of database
tables and for re-organising the contents of database tables according to users need.

11. What is ITS? What are the merits of ITS?

ITS is a Internet Transaction Server. ITS forms an interface between HTTP server
and R/3 system, which converts screen provided data by the R/3 system into HTML
documents and vice-versa. Merits of ITS: A complete web transaction can be
developed and tested in R/3 system. All transaction components, including those
used by the ITS outside the R/3 system at runtime, can be stored in the R/3 system.
The advantage of automatic language processing in the R/3 system can be utilized to
language-dependent HTML documents at runtime.

12. What is DynPro?

DynPro is a Dynamic Programming which is a combination of screen and the


associated flow logic Screen is also called as DynPro.

13. What are screen painter and menu painter?

Screen painter: Screen painter is a tool to design and maintain screen and its
elements. It allows user to create GUI screens for the transactions. Attributes,
layout, filed attributes and flow logic are the elements of Screen painter. Menu
painter: Menu painter is a tool to design the interface components. Status, menu
bars, menu lists, F-key settings, functions and titles are the components of Menu
painters. Screen painter and menu painter both are the graphical interface of an
ABAP/4 applications.

14. What are the components of SAP scripts?

SAP scripts is a word processing tool of SAP which has the following components:
Standard text. It is like a standard normal documents. Layout sets. - Layout set
consists of the following components: Windows and pages, Paragraph formats,
Character formats. Creating forms in the R/3 system. Every layout set consists of
Header, paragraph, and character string. ABAP/4 program.

15. What is ALV programming in ABAP?

When is this grid used in ABAP?- ALV is Application List viewer. Sap provides a set of
ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish
the output of a report. This set of ALV functions is used to enhance the readability
and functionality of any report output. Cases arise in sap when the output of a report
contains columns extending more than 255 characters in length. In such cases, this
set of ALV functions can help choose selected columns and arrange the different
columns from a report output and also save different variants for report display. This
is a very efficient tool for dynamically sorting and arranging the columns from a
report output. The report output can contain up to 90 columns in the display with the
wide array of display options.

16. What are the events in ABAP/4 language?

Initialization, At selection-screen, Start-of-selection, end-of-selection, top-of-page,


end-of-page, At line-selection, At user-command, At PF, Get, At New, At LAST, AT
END, AT FIRST.

17. What is CTS and what do you know about it?

The Change and Transport System (CTS) is a tool that helps you to organize
development projects in the ABAP Workbench and in Customizing, and then
transport the changes between the SAP Systems and clients in your system
landscape. This documentation provides you with an overview of how to manage
changes with the CTS and essential information on setting up your system and client
landscape and deciding on a transport strategy. Read and follow this documentation
when planning your development project.

18. What are logical databases?

What are the advantages/ dis-advantages of logical databases?- To read data from a
database tables we use logical database. A logical database provides read-only
access to a group of related tables to an ABAP/4 program. Advantages: i)check
functions which check that user input is complete, correct,and plausible.
ii)Meaningful data selection. iii)central authorization checks for database accesses.
iv)good read access performance while retaining the hierarchical data view
determined by the application logic. dis advantages: i)If you donot specify a logical
database in the program attributes,the GET events never occur. ii)There is no
ENDGET command,so the code block associated with an event ends with the next
event statement (such as another GET or an END-OF-SELECTION).

19. What is a batch input session?

BATCH INPUT SESSION is an intermediate step between internal table and database
table. Data along with the action is stored in session ie data for screen fields, to
which screen it is passed, program name behind it, and how next screen is
processed.

20. How to upload data using CATT ?

These are the steps to be followed to Upload data through CATT: Creation of the
CATT test case & recording the sample data input. Download of the source file
template. Modification of the source file. Upload of the data from the source file.

21. What is Smart Forms?

Smart Forms allows you to create forms using a graphical design tool with robust
functionality, color, and more. Additionally, all new forms developed at SAP will be
created with the new Smart Form solution.

22. How can I make a differentiation between dependent and independent data?

Client dependent or independent transfer requirements include client specific or cross


client objects in the change requests. Workbench objects like SAPscripts are client
specific, some entries in customizing are client independent. If you display the object
list for one change request, and then for each object the object attributes, you will
find the flag client specific. If one object in the task list has this flag on, then that
transport will be client dependent.

23. What is the difference between macro and subroutine?

Macros can only be used in the program the are defined in and only after the
definition are expanded at compilation / generation. Subroutines (FORM) can be
called from both the program the are defined in and other programs . A MACRO is
more or less an abbreviation for some lines of code that are used more than once or
twice. A FORM is a local subroutine (which can be called external). A FUNCTION is
(more or less) a subroutine that is called external. Since debugging a MACRO is not
really possible, prevent the use of them (I’ve never used them, but seen them in
action). If the subroutine is used only local (called internal) use a FORM. If the
subroutine is called external (used by more than one program) use a FUNCTION.

Question

How many types of reports are there in ABAP and what is the difference between them?

There are 2 type of reports. They are:

1. Interactive report
2. Classic reports
In classic reports,we can see the output in single list where as in interactive reports we can see
the output in multiple list.

[Edit section] Answer

In ABAP, there are a total of 7 types of reports. They are:

• Classical
• Interactive
• Logical Database
• ABAP query
• ALV Reports (ALV stands for ABAP List Viewer)
• Report Writer/Report Painter
• Views (There are different types of views also)

[Edit section] Classical Reports

These are the most simple reports. Programmers learn this one first. It is just an output of data
using the Write statement inside a loop.

• Classical reports are normal reports. These reports are not having any sub reports. IT IS
HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.

Events In Classical Reports.

• INTIALIZATION: This event triggers before selection screen display.


• AT-SELECTION-SCREEN: This event triggers after proccesing user input still selection
screen is in active mode.
• START OF SELECTION: Start of selection screen triggers after proceesing selection
screen.
• END-OF-SELECTION : It is for Logical Database Reporting.

[Edit section] Interactive Reports

As the name suggests, the user can Interact with the report. We can have a drill down into the
report data. For example, Column one of the report displays the material numbers, and the user
feels that he needs some more specific data about the vendor for that material, he can HIDE that
data under those material numbers.

And when the user clicks the material number, another report (actually sub report/secondary list)
which displays the vendor details will be displayed.

We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).

Events associated with Interactive Reports are:

1. AT LINE-SELECTION
2. AT USER-COMMAND
3. AT PF<key>
4. TOP-OF-PAGE DURING LINE-SELECTION.

HIDE statement holds the data to be displayed in the secondary list.


sy-lisel : contains data of the selected line.

sy-lsind : contains the level of report (from 0 to 21)

Interactive Report Events:

• AT LINE-SELECTION : This Event triggers when we double click a line on the list, when
the event is triggered a new sublist is going to be generated. Under this event what ever
the statements that are been return will be displayed on newly generated sublist.
• AT PFn: For predefined function keys...
• AT USER-COMMAND : It provides user functions keys.
• TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.

[Edit section] Logical Database Reports

Logical database is another tool for ABAP reports. Using LDB we can provide extra features for
ABAP reports.

While using LDB there is no need for us to declare Parameters.

Selection-screen as they will be generated automatically.

We have to use the statement NODES in ABAP report.

If there are many tables the Performance will be slow as all the table data will be read from top
node to bottom node .

[Edit section] ABAP Query Reports

ABAP query is another tool for ABAP. It provides efficency for ABAP reports. These reports are
very accurate.

Transaction Code : SQ01

The advantage with ABAP QUERY is logic required for classic &
interactive reports system design automatically 80%.

For ABAP QUERY handle these

SQ01 ; QUERY
SQ02 : INFOSET OR FUNCTIONAL AREA
SQ03: USER GROUP.
[Edit section] Report Writer

Key Concept :

Super users and end users can use Report Painter/Report Writer tools to write their own reports.

Giving them the ability to report on additional fields at their discretion shifts the report
maintenance burden to them, saving SAP support groups time and effort normally spent creating
and maintaining the reports.
Instead of using ABAP code to write a report in FI and CO, many users build a Report Painter/
Report Writer library using transaction MC27.

However, this workaround has some drawbacks. Little known transaction GRCT solves these
problems in most cases, and eliminates the need to use transaction MC27.

[Edit section] ABAP Report Types

ABAP report types are those ones available in some report's attributes screen, i.e. :

• Executable program
• Function group (containing function modules)
• Include
• Interface pool
• Class pool
• Module pool
• Subroutine pool

Also ALV means ABAP List Viewer. Most convenient way to use it is through reuse library (cf.
transaction se83) available from release 4.6 of SAP R/3.

ALV is available in two modes: list and grid. List mode is good old list processing with standard
functionnalities, and grid mode is using a new OCX object displaying grids.

Das könnte Ihnen auch gefallen