Monday, May 19, 2014

70 SAP ABAP Interview Questions and Answers

SAP ABAP Interview Questions and Answers for Freshers Experienced. Welcome to www.sapabapiq.com.

Here in this post we are providing some basic and advanced interview questions related to SAP ABAP. These interview questions will help novice programmers as well for experienced professionals to prepare well for interviews. Read here: OOABAP Interview Questions and Answers



SAP ABAP Interview Questions and Answers




1. When using Open SQL statements in an ABAP/4 program, you must ensure what?


Ans) The database system being addressed must be supported by SAP. The database tables being addressed must be defined in the ABAP/4 dictionary.



2. What are Open SQL and Native SQL commands? What is the purpose?


Ans) A database interface translates SAP’s Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly. 

When you use Native SQL, the addressed database tables do not have to be known to the ABAP/4 dictionary. In Open SQL, the addressed database tables must be defined in the ABAP/4 dictionary.


3. What are TABLE and STANDARD TABLE?


Ans) TABLE is used as a synonym for STANDARD TABLE. You can only access a hashed table using the generic key operations. Explicit or implicit index operations (such as LOOP ... FROM oe INSERT itab within a LOOP) are not allowed.


4. Can a transparent table exist in data dictionary but not in the database physically? 


Ans) False


5. Can you create a table with fields not referring to data elements?


Ans) Yes


6. How do you create a batch input session for a transaction?


Ans) ‘Bdc_insert’ for the transaction.



7. What is the alternative to batch input session?


Ans) Call transaction


8. The following are true about ‘EXEC SQL’. 


Ans) You can end the Native SQL with a semicolon. You cannot perform reliable authorization checks using EXEC SQL.



9. The following are true about database locking.


Ans) Database systems set physical locks on all lines affected by a database call. Read locks prevent other transactions from setting write locks for the objects in question.



10. What are field symbols? 


Ans) Field symbols are like pointers in C that can point to any data object in ABAP/4 and to structures defined in ABAP/4 dictionary. All operations you have programmed with the field symbol are carried out with the assigned field.


ABAP Interview Questions and Answers



11. EXTRACT statement 


Ans) The first EXTRACT statement creates the extract dataset and adds the first extract record. Each extract record contains, if specified, the fields of the field group.



12. You cannot assign a local data object defined in a subroutine or function module to a field group. 


Ans) True



13. Is numeric components used as table kay?


Ans) If the system finds a numeric component, that is not part of the key, the numeric fields that are not part of the table key (see ABAP number types) are added to the sum total of the existing entries. If it does not find an entry, the system creates a new entry instead.


14. Regarding ABAP queries?


Ans) ABAP queries are created from user groups attached to the functional areas that are created from a logical database or through a direct read/retrieval program.



15. A logical unit of work (LUW or transaction) begins 


Ans) Each time you start a transaction. Before the database changes of the previous LUW have been cancelled (database rollback).


16. A database commit is triggered by


Ans) ABAP/4 command COMMIT WORK.
 CALL SCREEN, CALL DIALOG.
 A Remote Function Call
 CALL TRANSACTION



17. What is SAPscript control commands? 


Ans) If a control command is unknown or it contains syntax errors, the line containing it will be treated as a comment line. A maximum of one control command may appear in each line.



18. To output SAPscript layout sets, in the print program


Ans) You must always start the output with OPEN_FORM and end it with CLOSE_FORM. 
WRITE_FORM should be used within an OPEN_FORM and CLOSE_FORM.



19. The transaction CMOD and SMOD are


Ans) Used to create enhancements to standard SAP programs. 
Used to create the user exits, menu exits and screen exits.


20. Which of the following are tools to report data in ABAP?


Ans) ALV


21. ABAP Query tool is used to what?


Ans) Automatically generate code for reporting


22. In ABAP Query tool?


Ans) Each user can be assigned to several user-groups
Each user can be assigned to several functional areas
Each functional area can be assigned to several user-groups



23. Logical databases must be used to create an ABAP Query


Ans) False



24. In a BDC program, how would you handle errored records? Would you…


Ans) Report the errored records
Generate a batch-input session with errored records
Create an output file, to be run again after corrections



25. What are IDocs?


Ans) Documents used for data-transport between SAP and non-SAP s/w.
Documents used for data-transport between two different SAP systems

26. For transportation of data from a presentation server into SAP, the function module used is


Ans) UPLOAD,  WS_UPLOAD


27. For one-time high volume data-uploads into SAP from non-reliable systems, the following are generally used:


Ans) BDC
 LSMW


28. In an ABAP program, the INITIALIZATION event is invoked


Ans) Before the AT-SELECTION-SCREEN event


29. The statement to check whether an internal table itab_test has no records, is:

IF itab_test is initial.

Ans) FALSE


Real Time SAP ABAP Interview Questions and Answers



30. The statement used to clear all the contents of an internal table is:

Ans) REFRESH itab.

FREE itab.


31. The AT-SELECTION-SCREEN event is triggered when…


Ans) ENTER key is hit on the selection-screen
F8 key is hit on the selection-screen



32. What is the transaction-code for viewing batch-runs of a program?


Ans) SM37


33. SY-BATCH can be used to determine whether a program is being run in batch-mode, within the AT-SELECTION-SCREEN event.


Ans) FALSE


34. Which statements will clear the header-line of an internal table?


Ans) CLEAR ITAB.


35. The SAP Logon password is always case-insensitive.


Ans) From ECC6.0, SAP Logon Password is case-sensitive.



36. Data: BEGIN OF ITAB OCCURS 0,

FIELD1(10),
FIELD2(10),
END OF ITAB.

DO 20 TIMES.

ITAB-FIELD1 = ‘Field1’.
ITAB-FIELD2 = ‘Field2’.
ENDDO.

Ans) The internal table has no entry.



37. READ TABLE ITAB_TEST WITH KEY 

VBELN = k_vbeln. 
If multiple records in table ITAB satisfy the condition, then 

Ans) The first record is fetched


38. If ITAB has 1000 entries, and DBTAB is a large table, which is better in terms of performance?


i) LOOP AT ITAB.

SELECT * INTO ITAB_2 FROM DBTAB WHERE
KEY1 = ITAB-KEY1.
APPEND ITAB_2.
ENDSELECT.
ENDLOOP.

ii) LOOP AT ITAB.

SELECT * INTO TABLE ITAB_2 FROM DBTAB WHERE
KEY1 = ITAB-KEY1.
ENDLOOP.

iii) SELECT * INTO TABLE ITAB_2 FROM DBTAB 

FOR ALL ENTRIES IN ITAB WHERE
KEY1 = ITAB-KEY1.


Ans) (iii) is better than (ii) and (ii) is better than (i).


39. DATA: BEGIN OF ITAB OCCURS 0,

Fld1 (1),
Fld2 (1),
Fld3 (1),
END OF ITAB.

ITAB has 5 records – [ (1,1,1), (1,1,2), (1,2, 2), (2,2,2), (2,2,3) ].


The code segment:

LOOP AT ITAB.
AT NEW fld3.
WRITE fld3.
ENDAT.
ENDLOOP.
Produces the output:

Ans) 1 2 2 2 3


40. TYPES: BEGIN OF TYPE1,

FLD1,
FLD2,
FLD3,
END OF TYPE1.
DATA: ITAB1 TYPE STANDARD TABLE OF TYPE1.

ITAB1-FLD1 = ‘a’.

ITAB1-FLD2 = ‘b’.
ITAB1-FLD3 = ‘c’.
APPEND ITAB1.

Ans) Compilation error due to method of declaration of table.



41. The fastest way to read a value in an internal table is to:


Ans) Directly specify the index value


42. If COLLECT is used on an internal table, which has a non-key character field,


Ans) Compilation error


43. Which is the correct syntax for sorting an internal table?


Ans) SORT ITAB BY key1 key2.


44. If we need to fetch all database entries corresponding to a given key, 

X records at a time, the syntax to be used is:

Ans) SELECT…PACKAGE SIZE X…


45. LOOP AT ITAB_DTL_1.

COLLECT ITAB_DTL_1 INTO ITAB_FINAL.
ENDLOOP.
If the tables contain character fields, which table should be declared with the keys 
Explicitly specified?

Ans) ITAB_FINAL


46. The syntax to concatenate a set of values into one variable is:


Ans) CONCATENATE source1 source2 INTO target.


47. On the selection-screen, if, while using SELECT-OPTIONS, we specify NO INTERVALS,

we can guarantee that the user will not be able to enter a range of values.

Ans) FALSE


48. ABAP programmers can create their own data types?


Ans) YES


49. MOVE can be used to copy:


Ans) One field’s contents to another field
One structure’s contents to another compatible structure
One table’s contents to another compatible table
A part of one field to another field



50. PERFORM ROUTINE1 USING val1.

…..
FORM ROUTINE1 USING temp1.
Temp1 = 10.
ENDFORM.

Is the value of val1 changed?


Ans) YES


Interview Questions and Answers on SAP ABAP


51. Within an IF-ENDIF block, 

a) ELSE must be used
b) ELSEIF must be used
c) If ELSEIF is used, ELSE must be used

Ans)None of the above


52. The user-list in a given SAP client can be found using transaction


Ans) SM04


53. The DESCRIBE statement on internal tables is used to:


Ans) Find the number of lines currently in table
Find initial size of the table
Find type of the internal table


54. Which of the following statements can work without a corresponding END-statement?


Ans) SELECT


55. In an ABAP program, we can specify a variable to be of HEXADECIMAL type.


Ans) TRUE


56. In an ABAP program, we can specify a variable to be of OCTAL type.


Ans) FALSE


57. The default length of a field of type “time”(‘T’) in an ABAP program is:


Ans) 6


58. The various numeric types definable in an ABAP program are:


Ans) I, F, P


59. Variables in an ABAP code can be defined as being similar to data-dictionary elements, using:


Ans) LIKE
FOR
TYPE


60. Constants and internal tables are defined using the keywords (respectively):


Ans) CONSTANTS and TABLES


61. There are 8 elementary data-types, and hence, 64 possible conversions. Of these,


Ans) Type D and T cannot be inter-converted


62. MOVE f1 TO f2 is equivalent to f2 = f1


Ans) TRUE


63. If a structure does not contain internal tables as components, we can equate two structures of incompatible types.


Ans) TRUE


64. For an inequality check between two variables, the symbol used is:


Ans) NE
 <>
 ><


65. S1 = ‘ABCAB’.

S2 = ‘ABCD ‘.
IF S1 CN S2.
WRITE ‘a’.
ELSE.
WRITE ‘b’.
ENDIF.
Output of above code is:

Ans) b


66. The statement  IF NUM IS BETWEEN 3 AND 7.

Is a valid syntax?

Ans) FALSE


67. Is it possible to call a subroutine of one program from another program? 


Ans) True



68. Can ABAP control statements be used within a sap script?


Ans) YES


69. The presentation server is actually the program named SAPGUI.


Ans) True


70. When is Top-of-page event executed


Ans) When the First Write Statement of the program is encountered.

Before outputting the first line on a new page.



Interview Questions for SAP ABAP Beginners


"You found the information helpful and want to say thanks? Your donation is enough to inspire us to do more. Thanks a bunch!"

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Categories

ABAP (1) ABAP Interview Questions (112) ABAP Open SQL Statements (1) ABAP Syntax Rules (6) ABAP WORKBENCH (2) ABAP-Interview-Questions (52) ALE IDOC (6) ALE IDOC Interview Questions (6) ale-idoc (6) ALE-IDOC-Interview-Questions (19) ALV Interview Questions (5) ALV-Interview-Questions (22) BADI (2) BAPI (1) BAPI Interview Questions (1) BAPI-Interview-Questions (14) BDC (6) BDC Interview Questions (6) BDC-Interview-Questions (9) big data (2) big data interview questions (1) Classical Reports Interview Question (3) Classical-Reports-Interview-Questions (22) Conditional Statements (1) Cross Applications (3) Cross-Applications (14) Data Dictionary (22) Data Type Questins (1) Data types (1) Data-Dictionary (48) Data-Type-Questins (6) Dialog programming (5) Dialog Programming Interview Questions (4) Dialog-Programming (30) DOMAIN Interview Questions (1) Domain-Interview-Questions (8) Function Module (2) hadoop (2) hadoop interview questions (2) hdfs (1) IDoc Tutorials (6) Interactive Report Interview Questions (4) Interactive-Reports-Interview-Questions (22) Internal Tables (1) interview questions (1) Lock Object Interview Questions (1) Lock-Objects-Interview-Questions (10) Logical Database (1) Modularization Interview Questions (4) Modularization-Interview-Questions (25) Module Pool Programming (5) Module-Pool-Programming (39) modules in sap (1) Object Oriented ABAP (19) Object Oriented ABAP Interview Questions (15) object-oriented-abap (2) Object-Oriented-ABAP-Interview-Questions (34) OOABAP (9) Reports (14) Reports Interview Questions (9) Reports-Interview-Questions (19) RFC (1) RFC Interview Questions (1) RFC-Interview-Questions (14) RICEF (1) RICEF Objects (1) SAP (4) SAP ABAP (4) SAP ABAP Interview Questions (42) SAP ABAP Introduction (46) SAP ABAP Message Types (2) SAP BADI Interview Questions (2) SAP Basics (71) SAP Books (2) SAP Certification (1) SAP CONSULTANTS (5) SAP CRM (1) SAP ENHANCEMENTS (3) SAP EXITS (2) SAP EXITS ( SAP ENHANCEMENTS ) Interview Questions (1) SAP Free Books (1) SAP HR (2) SAP Lock Object (1) sap modules (2) SAP Open SQL Statements (1) SAP R/3 Architecture (4) SAP Search help (1) SAP Smartforms (1) SAP Smartforms Interview Questions (2) SAP Tables (5) SAP Tcodes (10) SAP Views (1) SAP Webdynpro ABAP (12) SAP Work Processors (2) SAP Workflow (3) SAP-BADI-Interview-Questions (11) SAP-Enhancements (39) SAP-Exits (39) SAP-Exits-Enhancements-Interview Questions (3) SAP-HANA (1) SAP-HANA-Interview-Questions (1) SAP-Smartforms-Interview-Questions (2) SAP-Workflow (3) Scripts (3) Scripts Interview Questions (2) Scripts-Interview-Questions (32) Search Help Interview Questions (1) Search-Help-Interview-Questions (9) Smartforms (1) Table Maintenance Generator (1) Table-Maintenance-Generator (4) Tables in SAP (2) Tables Interview Questions (3) Tables-Interview-Questions (3) Type Group Interview Questions (1) Type-Group-Interview-Questions (7) Variable Declaration (1) Views Interview Questions (1) Views-Interview-Questions (5) Webdynpro (12) what is big data (1)

Protected Blog

 
This blog is not affiliated to SAP AG |SAP is trademark of SAP AG |The information collected from various sources use information with your own risk.