Go on link..

link us with ...

Tuesday, June 23, 2009

SAP ABAP Interview Questions with Answers or with solution


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.

SAP ABAP - Frequently Asked Questions with solution




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      

The ANSWERS is in BOLD.
Please note that not all questions have answers.

SAP ABAP - Frequently Asked Questions

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      

The ANSWERS is in BOLD.
Please note that not all questions have answers.

link us...

For Visitors

if you want to publish or Add something on ERP, SAP , SAP FUNCTIONAL, SAP ABAP then mail us along with your email-id. contain must be yours

email-id :- avinashkr_raj@yahoo.com(any email)

email-id :- avinaskr_raj.abap@blogger.com ( use only gmail)