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

Loading in 2 Seconds...

play fullscreen
1 / 90

Top 10 Sap abap faqs - www.bigclasses.com - PowerPoint PPT Presentation


  • 3 Views
  • Uploaded on

For regular Updates on SAP ABAP please like our Facebook page:-\n Facebook:- https://www.facebook.com/bigclasses/\nTwitter:- https://twitter.com/bigclasses\nLinkedIn:-https://www.linkedin.com/company/bigclasses/\n Google :https://plus.google.com/ Bigclassesonlinetraining\nSAP ABAP Course Page:-https://bigclasses.com/sap-abap-online-training.html\nContact us: - India 91 800 811 4040 \n USA 1 732 325 1626\nEmail us at: - info@bigclasses.com

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Top 10 Sap abap faqs - www.bigclasses.com' - bigclasses9


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
sap abap

SAP ABAP

FREQUENTLY ASKED INTERVIEW QUESTIONS & ANSWERS

1 can we write the code both call transaction and session method in single program
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.

2 when using open sql statements in an abap 4 program you must ensure the following
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

3 which bdc you prefer
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)

4 which of the following statements are correct
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

5 when u prefer lsmw
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.

6 which of the following are true
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

7 difference between include and append
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.

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

a) True b) False

Ans. b

9 preformance techniques
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 how to debug sapscripts
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.

12 how do you create a batch input session for a transaction
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

13 what is partner selection
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.

14 what is the alternative to batch input session
14.What is the alternative to batch input session?

a) Load module

b) Call transaction

c) BAPI

d) Idoc segment

Ans. b

15 what is occurs in internal table
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.

16 the following are true about exec sql
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

17 what is page window
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 …

18 the following are true about database locking
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

19 what is the difference between scrolling a table horizontally and vertically
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.

20 what are field symbols
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

21 what are field groups
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.

22 extract statement
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

23 list the events in abap 4 language
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.

slide25
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

25 how the values will be passed to rfc function module pass by value or pass by reference
25.How the values will be passed to RFC Function module Pass by Value orPass by reference?

always Pass by Value.

RFC is Remote Function call so it can’t access the values with Pass by reference.

26 which of the following are true
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

27 buffering concept usage
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.

28 which of the following are true
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

29 select up to 1 row and select single difference
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)

30 a logical unit of work luw or transaction begins
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.

31 what are the different buffering methods
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.

32 a database commit is triggered by
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

33 different types of locks
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.

34 the following are true about sapscript control commands
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

35 chain end chain
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.

36 how to debug rfc function module
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.

37 to output sapscript layout sets in the print program
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

38 whysapscripts are client dependent and smartforms are client independent
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.

39 the transaction cmod and smod are
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

40 difference between user exit and badis
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 control break events in abap
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.

43 abap query tool is used to
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.

44 what is tmg
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.

45 in abap query tool
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

46 difference between select option and ranges
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.

48 how we can retrieve data using secondary index explain with simple example
48.how we can retrieve data using secondary index.explain with simple example?

First create secondary indexes on required fields of a particular database table.

We can create one primary index and 15 secondary indexes.Once the respective secondary indexes are created write select queries and within select queries specify secondary indexes field name with where clause.

49 in a bdc program how would you handle errored records would you
49.In a BDC program, how would you handle errored records? Would you…

a) Rerun the program

b) Report the errored records

c) Generate a batch-input session with errored records

d) Create an output file, to be run again after corrections

Ans: b, c, d

50 how can we handle table control in bdc
50.How can we handle table control in BDC?

We can handle table control using line index

Line index indicates which line of Table control is to be use for BDC transaction

Ex -

performbdc_field using ‘RC29K-AUSKZ(01)’

Indicates 1st line of table control is going to be used for transaction which is Line index of Table

Control

51 what are idocs
51.What are IDocs?

a) Documentation of executable programs

b) Documents used for data-transport between SAP and non-SAP s/w.

c) Documents used for data-transport between two different SAP systems

d) Documents used for one-time data-migration activities.

Ans: b, c

slide56
52.If i want to execute a BDC program only in background not in foreground is there any option for this?

The sm37 transaction can be used for running a program in the background. Also in the session method while processing the session you can specify the processing type as background or foreground.

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

a) UPLOAD

b) WS_UPLOAD

c) FILE_UPLOAD

d) DATA_UPLOAD

Ans: a, b

54 how can we upload a text file having delimiters in to legacy system
54.How Can We upload a text file having Delimiters in to Legacy System?

For up loading text file we use the pre-defined FM gui_upload. in that FM we have the parameter

has_field_seperator for that we assign the default delimiter ‘x’. HAS_FIELD_SEPERATOR ‘X’

‘X’ can provide the Whatever delimiter we used in flat file for separation.

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

a) BDC

b) LSMW

c) Direct table update

d) Idocs

Ans: a, b

56 what is the land scape in sap
56.What is the land scape in sap?

In every organisation sap landscape involves three servers viz, Development server, Quality server and Production server. Whatever new development we do as per clients requirement is done in development server. Later to test the developed object we move it to quality server for testing and finally once everything goes clear then the object is moved to production server ,production server data is ready for final business use.

57 workbench request are client dependent or client independent
57.Workbench request are client dependent or client independent

Workbench request are client independent.

(Common Man Workbench request holds the Program , FM etc…. How it can be Client Dependent!!!!)

58 in an abap program the initialization event is invoked
58.In an ABAP program, the INITIALIZATION event is invoked

a) Before the AT-SELECTION-SCREEN event

b) After the AT-SELECTION-SCREEN event

c) Could be either way

d) Cannot be predicted

Ans: a

59 tell me about workbench request and customization requests
59.Tell me about workbench request and customization requests.

Workbench (ABAP Dev) request is client independent when you import it into one system it reflact it in all client in same system, but customized request has to import in that client perticular client where it is created, actually it is client dependent.

slide64
60.The statement to check whether an internal table itab_test has no records, is: IF itab_test is initial.

a) TRUE

b) FALSE

Ans: b.

61 what is an internal table
61.What is an internal table?

Internal table is a temporary table stored in the RAM of the application server. It gets created during the program execution and gets deleted once the program ends.

Different types of internal table. Standard table

Sorted table

Hashed table

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

a) CLEAR itab.

b) REFRESH itab.

c) FREE itab.

d) DELETE itab.

Ans: b, c

63 what is the difference between collect and append statements
63.What is the difference between COLLECT and APPEND statements?

APPEND statement adds a new record to the end of the internal table. COLLECT statement adds a new record to the end of the internal table if there is no record already exists in the internal table with the same key. If a record exits in the internal table with the same key then COLLECT adds the numeric values in the work area to the existing record.

64 the at selection screen event is triggered when
64.The AT-SELECTION-SCREEN event is triggered when…

a) ENTER key is hit on the selection-screen

b) F8 key is hit on the selection-screen

c) Any field on selection-screen is populated

d) F4 key is hit on the selection-screen

Ans: a, b

65 how do you delete duplicate records from internal table
65.How do you delete duplicate records from internal table?

Use SORT and DELETE ADJACENT DUPLICATES statements to delete the duplicate records from internal table.

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

a) SE37

b) SM37

c) SM35

d) SM30

Ans: b

slide75
68.SY-BATCH can be used to determine whether a program is being run in batch-mode, within theAT-SELECTION-SCREEN event.

a) TRUE

b) FALSE

Ans: b

69 what is the difference between refresh and free statements
69.What is the difference between REFRESH and FREE statements?

REFRESH clears the contents of the internal table but the memory remains allocated. FREE clears the contents of the internal table and releases the memory space.

70 the following statements will clear the header line of an internal table
70.The following statements will clear the header-line of an internal table:

a) DELETE ITAB.

b) FREE ITAB.

c) REFRESH ITAB.

d) CLEAR ITAB.

Ans: d

71 what are the different control break statements available inside a loop
71.What are the different control break statements available inside a loop?

AT FIRST / ENDAT AT LAST / ENDAT

AT NEW / ENDAT

AT END OF / ENDAT SUM

ON CHANGE OF / ENDON

73 what is the purpose of at first and at last
73.What is the purpose of AT FIRST and AT LAST?

AT FIRST is used to write headings and loop initialization process. AT LAST is used to write grand totals and loop termination processing.

slide81
74.Data: BEGIN OF ITAB OCCURS 0, FIELD1(10),FIELD2(10), END OF ITAB.DO 20 TIMES.ITAB-FIELD1 = ‘Field1’. ITAB-FIELD2 = ‘Field2’. ENDDO.

a)The internal table has 20 entries.

b)The internal table has one entry.

c)The internal table has no entry.

d) Unpredictable.

Ans: c

75 what is the purpose of sum statement
75.What is the purpose of SUM statement?

SUM statement is used to calculate the totals for the rows of a control level.

slide83
76.READ TABLE ITAB_TEST WITH KEY VBELN = k_vbeln. If multiple records in table ITAB satisfy the condition, then

a) All records are fetched

b) The last record is fetched

c) The first record is fetched

d) Compilation error

Ans: c

77 can we use on change of between select and endselect
77.Can we use ON CHANGE OF between SELECT and ENDSELECT?

Yes. It can be used in any loop construct. It can be used within LOOP AT/ENDLOOP, SELECT/ENDSELECT, DO/ENDDO and WHILE/ENDWHILE.

78 if itab has 1000 entries and dbtab is a large

78.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.

a) (i) is better than (ii), and (ii) is better than (iii).

b) (ii) is better than (iii), and (iii) is better than (i).

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

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

Ans: d

79 data begin of itab occurs 0 fld1 1 fld2 1 fld3

79.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:

a) 1 2 2 2 3

b) 1 2 3

c) 1 1 2 2 2

d) 1 1 1 2 2

Ans: a

80 when is top of page event executed
80.When is Top-of-page event executed?

a) Triggered by a New-page statement

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

c) Before outputting the first line on a new page.

Ans: b, c

for regular updates on sap abap please like

For regular Updates on SAP ABAP please like our Facebook page:- Facebook:- https://www.facebook.com/bigclasses/Twitter:- https://twitter.com/bigclassesLinkedIn:-https://www.linkedin.com/company/bigclasses/Google+:https://plus.google.com/+BigclassesonlinetrainingSAP ABAP Course Page:-https://bigclasses.com/sap-abap-online-training.htmlContact us: - India +91 800 811 4040                                              USA +1 732 325 1626Email us at: - info@bigclasses.com