Monday, June 11, 2012

0 ABAP Interview Questions-Part1


1.      What are the components of Data Dictionary?
Ans: Tables, Views, Data Type, Domain, Search help, Lock objects.

2.      What is the difference between table and structure?
Ans: Table store values, where as structure doesn’t store values.

3.      What is the purpose of structure?
Ans: Structure is used for reusability purpose.

4.      How can you create a table?
Ans: To create a table go to SE11 (data dictionary) –give table name –press create button – give short description and delivery class (A- application table) – enter the field name, check the key and give the field type –double click on field type – it will ask for whether you want to create data element – click yes- then create the data element-give the short description for data element-select any one either domain or built in type (if you select built in type no need to create the domain and if u want to create the domain select the domain button) –select the field label button tab give the short, medium, long, heading labels –if u select the domain radio button then give the domain name and double click on that name-it will ask for whether you want to create domain-click on yes –give the short description for the domain- give the data type, no. Of characters, decimal places, out put length, conversion routine, and check if you want sign and lowercase checkboxes, -select the value range tab button- give the fixed values and short text for single values (or) lower limit and upper limit for intervals –give the value table name, if any…repeat the same for the number of fields- then choose the technical setting button on the application tool bar – give the data class (APPL0 – Master data, APPL1 – Transactional data, APPL2 – Organizational data, USER (or) USER1-customer data), size( ranging from 0-4), select the any of these buffering radio button buffering not allowed, buffering allowed but switched off, buffering switched on,  and select any of buffering type (single record buffering, generic area buffered, fully buffered)…then  check for syntax and activate.

5.      What is Data element and Domain?
Ans: Data element gives the semantic attributes of the field. F1 help is coming because of data element. Domain gives the technical attributes of the field. F4 help is coming because of Domain.

6.      What is the search help? How can you create? How can you attach search help to a field?
Ans:  To create search help go to SE11 (data dictionary) – select the search help radio button and give the search help name and press create button –it will ask whether you want to create elementary search help (or) collective search help, select the radio button- give the short description for the search help – give the help view name in the selection method –give the search help exit name in the search help exit text field –then enter the search help parameter names- save and activate the search help.
F4 help is coming because of the search help attached to that field. To attach the search help to a field, you should give that search help name in the screen field attributes. (or) you can attach the search help through match code object also.

7.      What is Lock object? How can you create a lock object?
Ans: Lock object is used for locking and unlocking.  You cannot create a lock object, as lock object name should start with ‘E’. Two function modules are there for locking and unlocking, they are ENQUE_* for locking and DEQUE_* for unlocking.

8.      In Table creation what do you mean by Technical settings?
Ans: In Technical settings, you have to give the Data class name Size category, buffering (buffering not allowed, buffering allowed but switched off, buffering switched on radio buttons), and buffering type (single record buffering, generic area buffered, full buffered check boxes).

9.      How can we view the contents of the table?
Ans: you can view the contents of the table through SE16.

10.How can you add a field to a SAP table? (Already existing SAP table)
Ans: You need to take the Access key to modify the SAP table.

11. What is Internal table? How many types of internal tables?
Ans: Internal table is used to temporarily store the data and do all the manipulations. Internal table is created when you run the program and delete after execution. The life of internal table is still the program is running.
There are 5 types of internal tables. They are
1.      Standard table.
2.      Sorted table.
3.      Hashed table.
4.      Indexed table.
5.      Any table.

1. Standard table defines the table as a standard table. Key access to a standard table uses a linear search. This means that the time required for a search is in linear relation to the number of table entries. You should use index operations to access standard tables.
2. Sorted table defines the table as one that is always saved correctly sorted. Key access to a sorted table uses a binary key. You can also access tables by index operations.
3. Hash table defines the table as one that is managed with an internal hash procedure. You can imagine a hashed table as a set, whose elements you can address using unique key. Unlike standard and sorted tables, you cannot access hash tables using index. You can only access a hashed table using the generic key operations or other generic operations (sort, loop and so on).
4.Standard and Sorted tables belongs to the generic class index tables. An index table is one that you can access using an index.


12. What is difference between sorted table and hashed internal table?
Ans: In Sorted table the values are stored in a sorted order, where as in hashed table the values are stored according to key value pair.

13. What is the command used to sort internal table?
Ans:  Sort <internal table name>.
Sort  <internal table name> by <field name1 > ….. <Field name n >.
Sort <internal table name>
14. What is the syntax of the internal table with header line and without header line?
Ans: Internal table with Header line:
Data: begin of <internal table name> occurs 0,
<Field names>…….
End of <internal table name>.

Internal table without header line:
Data: <internal table name> like  <internal table name or table name>.

15. What is difference between classical and interactive reports?
Ans: In classical report no user interaction is allowed. Classical report out put is limited to basic list itself. In interactive report user can interact with the output in the basic list for further more details. In Interactive report the output can be one basic list and 20 secondary lists.

16. What are the system variables you used in interactive reporting?
Ans:  sy-lsind – system variable stores the list index (0- for basic list).
Sy-linno – system variable stores the current line number where the cursor is placed.
Sy-lincnt - system variable stores the total number of lines in the list.
Sy-lisel – system variable stores the content of the line from where the event is triggered

17. How many lists can we create in interactive report?
Ans: In interactive report we can create one basic list and up to 20 secondary lists.

18.What is the system variable used to find out the index of the list?
Ans: Sy-lsind.

19. What is the system variable sy-lisel store?
Ans: System variable sy-lisel store the contents of the line from where the event is triggered.

20. What are the events in classical and interactive reporting?
Ans: Classical report events: Initialization, at selection-screen, Start-of-selection, top-of-page, end-of-page, end-of-selection.
Interactive report events: At line-selection, At user command, At pf-status.

21. What are the LDB events?
Ans: Get, Get late.

22. How can you attach LDB in report?
Ans: you should give the LDB name in the report attributes.

23. Have you ever created LDB? How can you create LDB?
Ans: You can create LDB in SE36.In SE36 give the LDB name, select the structure radio button and press create button- then it will ask for the short description for the ldb - give the short description and press create button – then save- then it will ask for the name of the root node- give the name of the root node, short description and select the database table radio button and press on create button - then select that node and press the insert node button – then give the node name and data base table name press create button….– then come back and select the selections radio button- it will ask that should the selection of the logical database be generated from the structure-press yes – then it will ask that do you want to define new search help- if you want to define press yes otherwise press no – then it will ask for nodes for free selection and field selection, select the nodes and press the transfer button- then it will show the include program – uncomment the select-options and replace the question mark with the select-option name, then save active – then come out and select the database program radio button – it will ask for should the program of the logical database be generated from the structure and selection- press yes, it will take you to the report program, then double click on the system routines include- then it will show includes –double click on each include and uncomment the select statement, save activate..-you can test the LDB.

24. What is the difference between GET and GET LATE?
Ans: The code that follows GET node LATE is processed after all subordinate nodes have been read and processed.
You can only use Get node statement once in a program.

25. Is it possible to create more than one selection screen in classical reporting?
Ans: No

26.What is the Selection-screen number?
Ans: Selection-screen number is 1000.

27. What is Transaction? What are the events in Transaction?
Ans: Transaction is a collection screens and its flow logic. Events in transactions are
PBO – process before output,
PAI – process after input,
POV – process on value request,
POH – process on help request.
The event PBO is triggered when before the screen is displayed for the first time.
The event PAI is triggered when you enter the data in the screen and press push button.
The event POV is triggered when you press F4 on any input field of the screen.
The event POH is triggered when you press F1 on any field of the screen.

28. What is POV?
Ans: POV is process on value request. When you press F4 on the input field in the screen then the event POV is triggered. It is used to get the possible values for that field.

29. What is POH?
Ans: POH is process on help request. When you press F1 on the fields in the screen then the event POH is triggered. It is used to get the description about that field.

30. If for a particular screen filed you have POV, search help, tables help, domain then, which will be triggered by pressing F4?
Ans: Search help, search help will predominate all.

31. What is the difference between Match code and Search help?
Ans:


32.In PBO, PAI, POV, POH what are the default events? If you didn’t code PBO what happened?
Ans: The default events are PBO and PAI. If you didn’t code the PBO then it will show an error that process after input must be preceded by process before output.

33. What is the type of the transaction program?
Ans: Type-M

34. What is BDC? How many methods in BDC?
Ans: BDC (batch data communication (or) batch data capture (or) batch input): Transferring the from legacy system to SAP R/3 system is called BDC. There are 3 methods in BDC.
1.      Session method
2.      Call Transaction
3.      Direct input method.

35. What is difference between Session and Call transaction?
Ans: Session: Data will not update into the data base table until session is processed.
No sy-subrc is returned.
Automatic error log will be created.
Default updation mode is Synchronous.
Call transaction: Data will update directly into the database.
Sy-subrc will be returned.
Error log needs to handle explicitly.
Update modes are synchronous, asynchronous and local.

36. What are Synchronous, Asynchronous and local regarding the call transaction?
Ans: Synchronous:




37. How you program Session method and call transaction?
Ans: Session method: Create an internal table with the same structure as BDCDATA, and upload the all the data into that internal table. Then use the function module BDC_OPEN_GROUP, BDC_INSERT, BDC-CLOSE-GROUP.
Call Transaction: Create internal tables with the same structure as BDCDATA, BDCMSGCOLL, and upload all the data into that internal table. Then call the transaction directly using the syntax
Call transaction <transaction code> using <bdcdata name> Mode <a or n or e> Messages into <bdcmsgcoll name>.

38. How you create a job?
Ans: To create jobs go to SM36 (Define background job)- give the job name, job class (A-high priority, B- Middle priority, C-low priority), and give the target server.
39. How many ways you can run back ground jobs?
Ans



40. How you will do recording? What is the transaction code for recording?
Ans: Transaction code for recording is SHDB. – Select the new recording – give the recording, transaction code then press the start new recording push button, - enter the values in the transaction and press save, come back- select the recording name and the press the create program – give the program name and select the radio button read from file, check the check box create and give the file name and press create button. Then it will create the program and sample test data.

41. What are the run modes in session and call transaction?
Ans:  Run modes in Session: Process fore ground
Display errors only
Back ground.
Run modes in call transaction: A – display all screens
E – display errors
N – back ground processing

42. What for Sap script are used?
Ans: Sap script is used to design and print the layout sets.

43. What are Sap script elements?
Ans:  Header, Pages, Windows, Page windows, Paragraph formats, Character formats, Documentation.

44. What are different types of windows?
Ans:  There are 4 types of windows. 1. Main window 2. Constant window 3. Variable window 4.Grid screen.

45. What is the character format? What are they?
Ans:

46. How to print a logo?
Ans: To print a logo run the report program RSTXLDMC, give the macro name. In the layout set Insert-Graphics give the file name.

47. What are the settings you done while creating a logo as an abaper?
Ans:

48.How you write a print program?
Ans To write a print program use the function modules OPEN_FORM, WRITE_FORM, CLOSE_FORM.

49. How will you call a layout set in a print program?
Ans: You should give the layout set name in the OPEN_FORM attributes. It will open that layout set form for writing purpose.

50. Have you ever debugged a layout set? How will you debug a layout set?
Ans:

51. At a time how many variables you can see while debugging?
Ans: at a time you can see 4 variables while debugging.

52. What is difference between watch point and break point?
Ans:



53. How will you debug a report, Transaction, BDC program?
Ans:



54. What are the Sap script elements?
Ans: Header, Pages, Windows, Page Window, Paragraph format, Character format, Documentation.

55. How many types of windows in SAP Script? What are they? Explain?
Ans: In Sap script they are 3 types of windows.
1.      Main window: whose contents can extend more than one page.
2.      Constant window: Whose content does not change from page to page.
3.      Variable window: Whose content change from page to page.

56. For layout set how many main windows and how many sub windows?
Ans: Per layout set, you can create only one main window and up to 99 sub windows.

57. How to get the current line in reports?
Ans: To get the current line in report uses the system variable Sy-linno.

58. What is Initialization? When it will trigger?
Ans: Initialization is a classical report event. It triggers before the selection screen event is triggered.

59. What is BDC?
Ans: BDC (batch data communication or batch data capture or batch input) : BDC is transferring the data from the legacy system to the SAP R/3 system.

60. What is WRITE statement? What for it is used?
Ans: Write is an abap key word. Write statement is used to print the out.

61.What are the Data dictionary objects?
Ans: Tables, Views, Data type (data element or structure), Domain, Search help, Lock objects.

62. What is internal table?
Ans Internal table is used to store the data temporarily, and do some modifications or calculations. The life of internal table is until the program is running.

63. What are reports?
Ans: Reports are ment for displaying the data according to the user selection. Reports are used for analysis.

64. What is Transaction?
Ans: Transaction is a collection of screens and its flow logic.

65. What are the events in Report? When they will trigger?
Ans: Events in Classical Report are:  1.Initialization
2. At Selection-screen
3. Start-Of-Selection
4. Top-Of-Page
5.  End-Of-Page
6. End-Of-Selection
Events in Interactive Report are: 1. At Line-Selection
2. At User-Command
3. At Pf-n

-          The event Initialization is triggered before the at selection screen event is triggered.
-          The event At-Selection-Screen is triggered, when the user enters the values in the selection screen and then execute.
-          The event Start-Of-Selection is the default event. All the processing logic is kept in this. It triggers after the at selection screen event triggered.
-          The event Top-Of-Page is triggered whenever it encounters the first write statement or new page is triggered.
-          The event End-Of-Page is triggered when it reaches the end of page.
-          The event End-Of-Selection is triggered before leaving the program.

-          The event At Line-Selection is triggered whenever user double clicks on the basic list or any secondary list or chooses a line in the list with the cursor and press function key, which has function code, PICK in the interface definition.
-          The event At User-Command is triggered whenever user presses any menu button or function key or makes an entry in the command filed.
-          The At Pf-n event is triggered whenever user presses a function key that contains the function code PFn in the interface definition.




66. What is the difference between Session and Call transaction?
Ans: Session: Data base tables will not update until you process the Session.
No sy-subrc is returned.
Automatic error log is generated.
Default update method is Synchronous.
Call Transaction: immediate data base updating.
Sy-subrc is returned.
Need to handle the errors programmatically.
Update methods are Synchronous, Asynchronous, and Local.

67. What is View?
Ans: View is a precreated query. It is just like an imaginary table. View is created before the program starts running, but it stores the data as long as the program is running.

68. What is Lock Object?
Ans: Lock Objects are used for synchronous and asynchronous purpose. You can not create a lock object as the lock object name should start with the letter ‘E’.

69. How will you handle exceptions?
Ans: you need to check the system field Sy-Subrc. (0 - success, 4 or 8 – failure).

70.    What is difference between Subroutines and Function modules?
Ans: Subroutines:  Subroutines can be used only with in that program.
Subroutines cannot return value.
In subroutines exceptions need to handle explicitly.

Function Modules: Function modules stores centrally in the SAP library, so u can use globally
In any program.
Function modules return values.
Automatic error handling is there.

71.    What is Form and Perform?
Ans: Perform statement is used to call the subroutine. Perform call the Form.

72.    How you increase the performance of a report?
Ans: You can increase the performance of a report by removing the inner joins, nested select statements, using the keys to retrive the data modularize the code.

73.    What are the standards used in the reports?
Ans: While creating a report, we give the report name, purpose of the report, author, date and time, tables used in the report, Ldb’s used in the report, variables.

74.    What is the difference between Open SQL and Native SQL?
Ans: Open SQL is the SAP’S Propriety language for database. Native SQL is the Database specific language. Open SQL commands are interpreted in the database interface to the database specific commands. Native SQL commands directly interact the database.
75.    In BDC which method is preferable?
Ans: depending upon the requirement

76.    What is the Hide technique?
Ans: Hide command internally stores the contents of the clicked line in the hide area (system space).

77.    What are the system variable used in the reports?
Ans: Sy-subrc – system sub return code.
Sy-lsind – list index
Sy-ucomm – stores the function code

78.    What are the data types?
Ans: char, numc, date, time, int, floating point, packed decimal.

79.    What is the difference between screen processor and abap processor?
Ans: flow logic or screen logic is processed by the screen processor. Processing  logic or abap logic is processed by the abap processor.

80.    What is difference between Function module and RFC?
Ans:  Function module is Client independent. RFC is client dependent.

81.    What is the transaction code to create Function module?
Ans: SE37.

82.    What you will set in the attributes screen of a Function module?
Ans: In the attributes screen of a Function module you need to give the Function group, and need to check the radio button normal function module (or) remote enabled module (or) update module (start immediately or immediate start, no restart or start delayed (or) coll.run).

83.    Have you ever created a table?
Ans:

84.    Why you need to create a data element and domain for a table?
Ans: Data element gives the semantic attributes of the field. Domain gives the technical attributes of the field. So you need to give the data element and domain while you creating a table.

85.    What is View? How many types of Views are there?
Ans: View is a precreated query. It is just like an imaginary table. There are 4 types of Views are there. They are 1. Projection view.
2. Database view.
3. Maintenance view.
4. Help view.

86.    Is view physically stores data in the database table?
Ans: no, view doesn’t store data physically into the database. It is only runtime.
87.    What is structure? Is structure stores physically?
Ans: Structure is only logical definition not physical definition. Structure doesn’t store physically.

88.    What is LDB?
Ans: LDB (logical database) is logically and hierarchal relating the tables. Ldb is used to retrieve the data from the database tables. The advantage of LDB is allows dynamic selection.

89.    How you use the LDB in the report program?
Ans: You have to give the LDB name in the report attributes and in the program after report statement you need to give as node and LDB name. And you have to use the GET <node> or GET<node> LATE statement to fetch the data.

90.    What is the transaction code for LDB?
Ans: SE36.

91. What is user exit? How can you find out the enhancements in   SD module?
Ans: If you want to add the some more functionality to the standard SAP applications, then you need to write that functionality in the corresponding user exit. There are 4 type of user exits are there. They are 1. Menu exit
2. Key word exit
3. Function module exit
4. Field exit.
Menu exit – Adding the menu buttons and corresponding functionality to the standard SAP programs are called menu exit.

Key word exit – Adding the user specific documentation to the standard SAP field is called key word exit.

Function module exit – Adding the functionality to the standard SAP function modules is called Function module exit.

Field exit – Adding the fields to the standard SAP screens is called the Field exit.

You use the transaction SMOD – SAP enhancements to find out the enhancements available in any module.

91.    What is enhancement?
Ans: Adding our own functionality to the standard SAP applications is called enhancements.

92.    What is LSMWB? What for it is used?
Ans: LSMWB – Legacy System Migration Work Bench
LSMWB is a tool to transfer the data from the Legacy system to the SAP R/3 system.

93.    What is the Recording?
Ans: Recoding is the option provided by the SAP to transfer the data from the application server to the SAP R/3 system.

94.    What case makes you write a BDC program? Which is not possible with the Recording?
Ans: Recording programs read data only from application server not from presentation server. If you want to upload the data from the application server then you can do it by recording. But if you want to upload the data from the presentation server then you need to write the BDC program manually.
The reason is that the recording program uses the open_data_set, read_data_set, and close_data_set. Where the statements read data only from the application server not from presentation server. To read the data from presentation server you need to use the function modules upload (or) ws_upload.

95.    What are the methods available in the BDC?
Ans: Session, Call transaction, Direct input.

96.    What is the difference between Pooled table and Cluster table?
Ans:

97.    How many types of tables are there?
Ans: There are 5 types of tables in SAP. They are
1.      Transparent tables.
2.      Table pools.
3.      Table clusters.
4.      Pooled tables.
5.      Cluster tables.

98.    In which format text elements store?
Ans: In ritch text format text elements store.

99.    Which looping statement is fast?
Ans:

100.What is difference between case endcase and if endif? Which is faster?
Ans: Case executes the block of statements depending upon the variable given in case statement.
If checks the condition, and if the condition satisfied then executes the block of statements between if and else, if the condition not satisfied then it will executes the corresponding else, otherwise doesn’t executes any code.

101.What are the parameters you will give in session and call transaction?
Ans: Session: session name, keep session, lock date,
While running the session you need to give run mode (process/fore ground, display errors only, background), Destination, extended log, expert mode, dynpro standard size .
Call transaction: run mode (A or E or N), update session (L or S or A), keep session, and lock date.

102.What are sy-datum, sy-uname, sy-uzeit?
Ans: sy-datum – system variable containing the current system date.
Sy-uname – system variable, which stores the login user name
Sy-uzeit – system variable containing the current system time.

103.How you create messages? How many types of messages are there?
Ans: You can create the messages in SE91. There are 5 types of messages are there. They are
1.      Error.
2.      Warning.
3.      Abnormal.
4.      Information.
5.      Success.

104.What is ALV?
Ans: ALV- Application list viewing.

105.Can you store structure in database?
Ans: Yes you can store structure in database. But structure cannot store values. It is only logical definition.

  
         

Extra ABAP/4 Questions


1          What is HIDE / Get cursor statement
2          What are the types of function modules
3          What are control events
4          What are control break statements
5          What is the sequence of events are executed in a report
6          What is INITIALIZATION event, and what is its use
7          What are logical databases, and its advantages, events in LDB
8          What is differnce between UPLOAD / WS_UPLOAD function module
9          How will you define additional selection screen
10        Where can we define function keys used at selection screen
11        What is the advantage of using with header line at internal table
12        What are the internal table types
13        What is the advantage of Hashing table type
14        It is must to have CLOSE_FORM function module in Print program
15        Is sapscript client-dependent
16        What is difference between START_FORM / OPEN_FORM statement
17        What is standard text and its t-code
18        How will you upload logo to layout
19        How many main windows you can have in a page, and how will you create
20        Is main window must for a form
21        What are output types? And t-code
22        What are form elements.  How will you define.
23        What is PROTECT / END-PROTECT.
24        Can column name and table name be dynamically specified
25        What is presentation server.
26        What are the typical events in dialog program.
27        What is the system fields holding current list number
28        How many detail list can be created
29        What is the use of OK code field in dialog program
30        What is secondary index in ABAP dictionary, and its advantages
31        Can you have db table without primary index
32        What is editor lock attribute in ABAP program
33        What is lock object
34        What are the different ways for debugging the ABAP program
35        Is it possible to to debug the SAPscript
36        What is field exit, and use.  Can you debug field exits.
37        What is the limitaion of message types used in Field Exit.
38        What are the message types are in ABAP
39        What is doman and data element
40        What is background job, job scheduling, and t-code.
41        What is performance trace and runtime analysis.
42        What will happen when power goes off suddenly.
43        What is CATT and how it is used
44        What is the difference between CALL TRANSACTION / Session Method / Direct Input
45        What is LSMW
46        What is match code object / search help
47        Usages of Development Class
48        Can you transport local object to other client
49        What are the class types in Transparent Tables
50        Can you print smart form without START_FORM.
51        What is Classical / Interactive reports
52        Based on the input in selection screen, can you display some text int eh same screen itself, and how
53        What is SMOD / CMOD
54        What is user / field exit
55        How do you trace availabe customer exits
56        What is check table & transparent table
57        What are the types of joins, differentiate
58        What is the difference between SY-TABIX & SY-INDEX
59        How do you supress the print parameters dialog box in SAPscript printing
60        What is APPEND / COLLECT
61        How do you increate the performance of your program.  What measures you will take
62        Steps to create ABAP Query
63        What are the two types of presenting text in SAP script forms
64        How will you print SAPscripts
65        What are the different kinds of BDCs and how will you differentiate one from the other
66        On what situations you will go for dialog programming
67        Explain about customer exits, what are the different kinds
68        What is Classical / Interactive reports
69        Can you have more than one PBO in a screen flow logic
70        Can you call another selection screen from a selection screen
71        What the different types of windows in SAPscript
72        Can field symbol hold contents of fields dynamically
73        What is extract dataset / internal table.  Differentiate
74        What is CATT
75        How will you trace performance of a particular program / report
76        How will you increate the performance
77        What is the structure of ABAP program
78        What is ABAP / SAP memory.  What are its structures
79        What are the various types of ABAP programs
80        What is Leave / Set / Call Screen
81        How will you schedule a job & what are the ways to schedule it
82        Events in DP
83        How many ways to attatch F4 key help to a screen field.  If all the ways used to a field, which gets fired.
84        How internally transport requests are passing from one client to the other
85        What is field exit / user exit.  Can you call a particular transaction from field exit.
86        What is domain / data element
87        What is difference between COLLECT / SUM
88        In internal table what is free, refresh & clear
89        What is standard text
90        What is step loop / table control
91        What are the various update modes in Call Transaction
92        What are the advantages of MAIN window
93        How many ways to define a break-point
94        What is the difference between watch point / break point
95        What is version management.


 

SAP-ABAP Copyright © 2011 - |- Template created by Vishnu - |- Powered by Blogger Templates