SAP ABAP Interview Questions and Answers

6/10/2011 No Comment
SAP ABAP Interview Questions asked in top companies 

Why sapscripts are client dependent and smartforms are client independent.?
Ans-: 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 stroed in side the client depended table as a TEXT.so sapscripts are client dependent and smartforms are client independent.

Difference between user exit and BADIs?
Ans: 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.

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.

I am uploading 100 records out of which say 59th record has error so what will happen if i am using synchronous or asynchronous method of BDC? Can we update the database using local update mode how?

Suppose i am writing following code then what will be output?
LOAD-OF-PROGRAM.
WRITE:/”HELLO”.
Ans:  HELLO
(Explain the importance of LOAD-OF-PROGRAM Event.If you dont know Tell the interviewer as this event is used in such cases when you want to clear sum buffers or something Before calling that Program)

What is TMG?
Ans. 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.

Difference between select option and ranges ?
Ans. 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.


Is it possible to bring select option in module pool screens?
Ans.Create a SELECT-OPTIONS in module pool screen using two methods as shown.
Method 1:—-
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING
This CALL SUBSCREEN statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2:——-
a) Create 2 separate fields in your screen layout – one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
continued ……
struc_tab_and_field-fieldname = con_cust. ” ‘KUNNR’
struc_tab_and_field-tablename = con_kna1. ” ‘KNA1′.
CALL FUNCTION ‘COMPLEX_SELECTIONS_DIALOG’ EXPORTING*
TITLE = ‘ ‘
text = g_titl1 ” ‘Customers’
tab_and_field = struc_tab_and_field
TABLES RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
* Read the very first entry of the range table and pass it to
* dynpro screen field
*READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.

how we can retrive data using secondary index.explain with simple example
Ans:  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.

How can we handle table control in BDC?
Ans.We can handle table control using line index
Line index indicates which line of Table control is to be use for BDC transaction
Ex -
perform bdc_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

If i want to execute a BDC program only in background not in foreground is there any option for this?
Ans.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.
How Can We upload a text file having Delimiters in to Legacy System
Ans.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.
What is the land scape in sap.
Ans. 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.
Workbench request are client dependent or client independent
Ans. Workbench request are client independent.
(Common Man Workbench request holds the Program , FM etc…. How it can be Client Dependent!!!!)
Tell me about workbench request and customization requests.
Ans.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.
Related Posts


No comments :

 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer