sap abap n.
Skip this Video
Loading SlideShow in 5 Seconds..
Top 10 Sap abap faqs - www.bigclasses.com PowerPoint Presentation
Top 10 Sap abap faqs - www.bigclasses.com

Top 10 Sap abap faqs - www.bigclasses.com

68 Vues
- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. SAP ABAP FREQUENTLY ASKED INTERVIEW QUESTIONS & ANSWERS

  2. 1.Can we write the code both call transaction and session method in single program? Yes it is possible to write call transaction and session in one program.

  3. 2.When using Open SQL statements in an ABAP/4 program, you must ensure the following? a) The database system being addressed must be supported by SAP. b) The database tables being addressed must be defined in the ABAP/4 dictionary. c) Both a and b d) None Ans. c

  4. 3.Which BDC you prefer? If we want to transfer large amount of data and when we need to use more than one transaction code we prefer session method. For small or less amount of data and for single transaction use call transaction. (This is more genric answer but you can add more on to this if you have worked on BDC)

  5. 4.Which of the following statements are correct? a) 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. b) 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. c) There is automatic client handling in Native SQL whereas clients must always be specified in Open SQL. Ans. a,b

  6. 5.When u prefer LSMW? When we need to update medium amount of data we use LSMW. LSMW is also used when the person like functional consultant has less programming language.

  7. 6.Which of the following are true? a) TABLE is used as a synonym for STANDARD TABLE b) 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. c) All hashed tables are index tables. d) We have to define the hash procedure explicitly for HASHED TABLE. Ans. a, b

  8. 7.Difference between .include and .append? Include structure allows to add one or more structure into structure or table.Also placed positioning anywhere. Upto 6 include structure can be used in a table. Append structure can be placed only at the end of a structure or table which also stops further insertion of fields.Only one append structure can be used.

  9. 8.Can a transparent table exist in data dictionary but not in the database physically? a) True b) False Ans. b

  10. 9.Preformance techniques? 1. The sequence of fields must be same as per database table 2. During writing select query write all fields in sequence as per database table. 3. Never write select statements inside loop….endloop. 4. Use st05 SQL trace, se30 run time analysis, code inspector, slin,etc. 5. Use select single * statement instead of select * 6. Always use primary key 7. Use binary search but before using binary search sort that table.

  11. 10.Can you create a table with fields not referring to data elements? a) Yes b) No Ans. a

  12. 11.How to debug sapscripts? Two ways to debug sapscript . first way is goto SE 71 and from menu bar select Utilities- >activate debugger .then goto SE38 execute the print program ,it automatically goes to debugging mode …..the other way is , run the program RSTXDBUG in se 38 . execute it . a message will show that debugger is activated .now open the print program in se 38 …u vll notice that the print prgm is automatically diverted to debugging mode.

  13. 12.How do you create a batch input session for a transaction? a) ‘Call transaction’ in background mode. b) ‘Call transaction’ in error mode. c) ‘Bdc_insert’ for the transaction. d) None of the above. Ans. c

  14. 13.What is partner selection? This concept is mainly used in IDOC where u select the partner profile using Tcode We20 .with Tcode SM59 you create RFC(remote function call) to create communication link to a remote system.

  15. 14.What is the alternative to batch input session? a) Load module b) Call transaction c) BAPI d) Idoc segment Ans. b

  16. 15.What is occurs in internal table? Occurs addition to the Declaration will give initial size to that table.occur statement allocates 8kb of memory to the internal table.

  17. 16.The following are true about ‘EXEC SQL’. a) You can end the Native SQL with a semicolon. b) You can end the Native SQL with a period. c) You cannot perform reliable authorization checks using EXEC SQL. d) Host variables in the Native SQL are identified with a preceding hash (#). Ans. a, c

  18. 17.What is page window? page window is nothing but a container of a page ,which uniquely identifies a set of data …for example while creating invoice …we create logo window , billing document header window , customer window , terms and condition window etc …

  19. 18.The following are true about database locking. a) Database systems set physical locks on all lines affected by a database call. b) Read locks prevent the setting of further read locks for the objects in question. c) Read locks prevent other transactions from setting write locks for the objects in question. d) Write locks allow other transactions to set read locks for the objects in question. Ans. a, c

  20. 19.What is the difference between scrolling a table horizontally and vertically..?? In table control when you scroll a table vertically presentation server needs to call application server to fetch the next record and display in the table while in case of horizontal scroll there is no need to call application server.

  21. 20.What are field symbols? a) 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. b) Field symbols have to be created with type specifications only. c) You cannot assign one field symbol to another. d) All operations you have programmed with the field symbol are carried out with the assigned field. Ans. a, d

  22. 21.What are Field Groups? A group that combines several fields fewer than one name, at runtime, the INSERT command is used to define which data fields are assigned to which field group are called Field Groups. It should always be a HEADER field group that defines how the extracted data will be sorted; the fields grouped under the HEADER field group sort the data.

  23. 22.EXTRACT statement a) The first EXTRACT statement extracts the first extract record. b) The first EXTRACT statement creates the extract dataset and adds the first extract record. c) Each extract record contains, if specified, the fields of the field group. d) Each extract record contains, if specified, the fields of the field symbol. Ans. b, c

  24. 23.List the events in ABAP/4 Language? The events in ABAP/4 are load of program ,Initialization, Selection Screen, Start of Selection, End of Selection, Top of page, Line selection, User command, End, First.

  25. 24.You cannot assign a local data object defined in a subroutine or function module to a field group. a) True b) False Ans. a

  26. 25.How the values will be passed to RFC Function module Pass by Value or Pass by reference? always Pass by Value. RFC is Remote Function call so it can’t access the values with Pass by reference.

  27. 26.Which of the following are true? a) COLLECT can only be used with STANDARD TABLE. b) To use COLLECT, the internal table should be derived from a database table with an explicit key. c) 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, control passes on to the next record in the internal table. d) 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 Ans. d

  28. 27.Buffering concept usage? There are three type of buffer 1 single record 2 generic buffer 3 full buffer Buffering is use for improve performance. it improves performance 10 to 100 times more.

  29. 28.Which of the following are true? a) ABAP queries are created by associating them to a logical database or through a direct read/data retrieval program. b) ABAP queries are created from functional areas that are created from a logical database or through a direct read/retrieval program. c) 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. d) ABAP queries are created through the regular report program. Ans. c

  30. 29.Select up to 1 row and select single difference ? Select single fetches first matching record. If more than one matching records are there then only the first matching record will be considered other records will not be taken into account. Where as select up to 1 rows will fetch all the matching records from the database.(Again it will assign only One Record to the internal table/Work area)

  31. 30.A logical unit of work (LUW or transaction) begins a) Each time you start a transaction. b) Each time you end a transaction. c) When the database changes of the previous LUW have been confirmed (database commit). d) Before the database changes of the previous LUW have been cancelled (database rollback). Ans. a, d.

  32. 31.What are the different buffering methods? There are two different buffering methods The system ensures that data transfer between the R/3 System and the database system is as efficient as possible. To do this, it uses the following techniques: Table buffering: The program accesses data from the buffer of the application server. Database request buffering: Individual database entries are not read or passed to the database until required by an OPEN SQL statement.

  33. 32.A database commit is triggered by a) ABAP/4 command COMMIT WORK. b) CALL SCREEN, CALL DIALOG. c) A Remote Function Call d) CALL TRANSACTION Ans. a, b, c, d

  34. 33.Different types of locks? Read lock (shared lock) Protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table. Write lock (exclusive lock) Protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table. Enhanced write lock (exclusive lock without cumulation) Works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.

  35. 34.The following are true about SAPscript control commands. a) If a control command is unknown or it contains syntax errors, the line containing it will be printed out as it is. b) If a control command is unknown or it contains syntax errors, the line containing it will be treated as a comment line. c) A maximum of one control command may appear in each line. d) A maximum of six control commands may appear in each line. Ans. b, c

  36. 35.CHAIN END CHAIN? Chain and end chain are used for multiple field validation in Module pool programming .It is written inside the screen flow logic.

  37. 36.How to Debug RFC Function module? SE38 –> Utilities –> Settings –> ABAP Editor –> Debugging Activate the external debugging and choose the New Debugger option in ABAP debugger. Go to the particular place in the code and put break point, pop will appear then choose the HTTP break point. If you are triggering the RFC from SAP portal make sure that both the user ID should be same If the users are different then provide the XI/Portal User ID in the users field.

  38. 37.To output SAPscript layout sets, in the print program a) You must always start the output with OPEN_FORM and end it with CLOSE_FORM. b) Within one transaction, you can use only one OPEN_FORM and CLOSE_FORM to open and close a layout set. c) WRITE_FORM should be used within an OPEN_FORM and CLOSE_FORM. d) WRITE_FORM can be used without an OPEN_FORM and CLOSE_FORM. Ans. a, c

  39. 38.Whysapscripts are client dependent and smartforms are client independent? Smartforms create its own function module so it doesn’t need to transport the request through SCC1.As all the Development Object are stored in client independent tables. Whereas Script doesn’t generate any function module while executing so we need to transport the request number through SCC1.Sap script is stroedin side the client depended table as a TEXT.so sapscripts are client dependent and smartforms are client independent.

  40. 39.The transaction CMOD and SMOD are a) Used to create enhancements to standard SAP programs. b) Used to create enhancements to ABAP queries. c) Used to create the user exits, menu exits and screen exits. d) Used to modify the standard function groups. Ans. a, c

  41. 40.Difference between user exit and BADIs? User exit is for single implementation and it is procedural approach while BADIs are for multiple implementation and object oriented approach. Multiple implementation means Reusability… because we use OOps Concepts for BADI.

  42. 41.Which of the following are tools to report data in ABAP? e) ALV f) ALE g) LSMW h) SmartForms Ans: a

  43. 42.Control break events in ABAP? 1. AT-FIRST: This is used when we want to execute the statements before records are processed. 2. AT-LAST: This event is used when we want to execute the statements after all records are processed. 3. AT-NEW: This event is used when we want to execute the statement before group of records are processed. 4. AT-END: This event is used when we want to execute the statements after processing of group of records.

  44. 43.ABAP Query tool is used to: a) Enquire about a running-program status b) Automatically generate code for reporting c) Perform database operations for user-written programs d) None of the above Ans: b.

  45. 44.What is TMG? TMG stands for Table Maintenance generator. It is a tool available in abap by which we can add or delete multiple records at a time and it is executed or triggered by the transaction code SM30.

  46. 45.In ABAP Query tool.. a) Each user can be assigned to several user-groups b) Each user can be assigned to several functional areas c) Each functional area can be assigned to several user-groups d) One user can be assigned only to one user-group. Ans: a, b, c

  47. 46.Difference between select option and ranges ? The main difference between select option and ranges is that ranges implicitly or automatically creates internal table with fields like OPTION,LOW,HIGH,SIGN,etc . Where as in case of select option we have to explicitly create internal table. When u declares a select options it will implicitly declare an internal table (ranges) for you. While using RANGES syntax u can declare internal table explicitly. The only need of declaring ranges is when you r not taking input from the user but you want make limit based selection at that time it will be use full e.g. SELECT ** from ** where MATNR in val_range. here u can use select-option or ranges : val_range.