SAP ABAP Interview Questions And Answers For Freshers and Experienced (Beginners Tutorial) 2016

SAP ABAP Interview Questions and Answers

Here is the list of SAP ABAP Interview Questions and their answers. We have tried to assemble all types of SAP ABAP interview questions on this site. Please read them before you appear for any SAP ABAP interview.


What is SAP?

SAP is the name of software company founded in Germany in 1972 by five ex-IBM engineers. SAP stands for Systems, Applications, Products in Data Processing.Important products of SAP are SAP ERP, SAP BW, SAP Business Objects software and SAP HANA. SAP has many modules from logistic, financial and human resources domain.

What is SAP ABAP?

Full form of SAP ABAP is Advanced Business Application Programming. SAP ABAP is the development language used in SAP to develop RICEFW objects like Reports, Interfaces, Conversions, Extensions, Forms and Workflows. SAP ABAP has 3 main components.
  • Development Workbench
  • Data Dictionary
  • Repository Information
What are different modules in SAP?

SAP has many modules as listed below.
  • Sales and Distribution (SD)
  • Material Management (MM)
  • Warehouse Management (WM)
  • Production Planning (PP)
  • General Logistics (LO)
  • Quality Management (QM)
  • Financial Accounting (FI)
  • Controlling (CO)
  • Enterprise Controlling (EC)
  • Investment Management (IM)
  • Treasury (TR)
  • Personnel Administration (PA)
  • Personnel Development (PD)
What are the components in SAP ABAP?

SAP ABAP has following applications/sub-modules/screens:
  • ABAP Workbench
  • Menu Painter
  • Screen Painter
  • Data Dictionary
  • SAP Script
  • Business Workflow (BC - WF)
  • ALE
  • EDI
  • Business Connector
  • Business Server Pages
  • Internet Application Server
  • Mercator Report Painter
  • ALV reporting
  • Report writer
  • Dialog Programming
  • Repository Information System
  • IDOCS
  • LSMW
  • Smartforms
What is PBO event?

Long form of PBO is Process Before Output. It determines the flow logic before displaying the screen.

What is PAI event?

Long form of PAI is Process After Input. It determines the flow logic after the display of the screen and after receiving inputs from the User.

What are the types of programs in SAP ABAP?

Here is the list of types of program in SAP ABAP.
  • 1 REPORT
  • M PROGRAM
  • F FUNCTION-POOL
  • K CLASS-POOL
  • J CLASS-POOL
  • S PROGRAM
  • T TYPE-POOL
  • I -
What do you mean by Transaction Codes in SAP ABAP?

A transaction code is four-character code that guides you directly to the screen for the task we want to perform. The following transaction codes are useful for Basis, ABAP, MM and SD modules. For examples - ABAPDOCU -> Example Library, ABAPHELP -> Keyword Documentation, AL03 -> Operating system Alert Monitor.

What is SAP ABAP Editor?

ABAP Editor is a source-code editing tool designed to handle the specifics of ABAP coding. It is the components of the ABAP Workbench. ABAP Editor to write and edit ABAP programs, class methods, function modules, screen flow logic, type groups, and logical databases. The ABAP Editor has the following different modes:
  • Front-End Editor (source code mode - new)
  • Front-End Editor (plain text mode)
  • Back-End Editor (line-based mode)
How to get current year in SAP ABAP?

CALL FUNCTION 'GET_CURRENT_YEAR'
EXPORTING

  • BUKRS = '1100' " Company Code
  • DATE = SY-DATUM " Date to find fiscal year for
IMPORTING
  • CURRM = w_currm " Current Fiscal Month
  • CURRY = w_curry " Current Fiscal Year
  • PREVM = w_prevm " Previous Fiscal Month
  • PREVY = w_prevy. " Previous Fiscal Year
How to debug background job?

Steps to debug background job.
  • Go to transaction SM37
  • Select any job that you want to debug
  • Enter 'jdbg' as or code in command box
  • Press ‘Enter’
Note: You can do the same from transaction SM50 as well

How to concatenate in sap ABAP?

There are many Options which you can try Option 1:
data: l_cr(1) type c value cl_abap_char_utilites=>cr_lf,
l_lf(1) type c value cl_abap_char_utilities=>linefeed.
CONCATENATE str1 str2 INTO out SEPARATED BY l_cr.
CONCATENATE str1 str2 INTO out SEPARATED BY l_lf.
If your Version is 4.6C, do like this
DATA: NEWLINE(2) TYPE X VALUE '0D0A'
DATA: V_CHAR(50).
CONCATENATE 'LINE1' 'LINE2' INTO V_CHAR SEPARATED BY NEWLINE.
Option 2:
DATA: NEWLINE(2) TYPE X VALUE '0D0A'
DATA: V_CHAR(50).
CONCATENATE LINE1 LINE2 INTO V_CHAR SEPARATED BY NEWLINE.
(OR)
DATA: test1 TYPE String,
test2 TYPE String,
test3 TYPE string.
test1 = 'Hallo'.
test2 = 'du da'.
CONCATENATE test1 sy-uline(5) test2 INTO test3 SEPARATED BY space.
WRITE test3.

What is SAP ABAP Editor?

Comments are texts that you can write between the statements of your ABAP program to explain their purpose to a reader. Comments are distinguished by the preceding signs * (at the beginning of a line) and " (at any position in a line). If you want the entire line to be a comment, enter an asterisk (*) at the beginning of the line. The system then ignores the entire line when it generates the program. If you want part of a line to be a comment, enter a double quotation mark (") before the comment. The system interprets comments indicated by double quotation marks as spaces.
**********************************************
*  PROGRAM SAPMTEST                            *
*  WRITTEN BY CHARLIE BYTE, 06/27/1995         *
*  LAST CHANGED BY RITA DIGIT, 10/01/1995      *
*  TASK:    DEMONSTRATION                      *
************************************************
PROGRAM sapmtest.
************************************************
* DECLARATIONS                                 *
************************************************
DATA: flag(1) TYPE c,   " global flag
      number TYPE i.    " counter
......
************************************************
* PROCESSING BLOCKS                            *
************************************************
......
How to create a SAP ABAP package?

Go to SE21 Transaction.
Give Package name, short description, and fill all the attributes fields and click on create button.
Save it under the Workbench TR.

How to create foreign key in sap ABAP?

Open the table in Data Dictionary (SE11) for which you want to create a foreign key.
Select the field for which you want to create the foreign key and press Foreign Keys button.
In the popup window enter the check table name and press Generate proposal button.
The system proposes the foreign key relation based on the domain.
Check that the foreign key relationship proposed by the system and press copy Button.
Save and activate the table.

How to debug a sap ABAP program?

You can debug a program by entering ' /h ', before executing.
You can also set break points. When you set a break point at a particular place, the program execution stops at the place where you have set the break point.
Use the keys F5, F7, F8 to proceed thru the debugging mode.
Using F5 executes one statement at a time.
F7 is used to come out thru a PERFORM or a Standard Funtion module.
F8 is used to navigate thru to next break point.
You can always check the values of all variables and contents of various internal tables as well.
By setting watchpoints you can find easily when a particular variable is changing etc.
There are many other things as well, but this will be very helpful initially and you will learn further as you go on.
How to maintain single table entry at a time without coding or debugging ?
  • Go to SE16 transaction
  • Give any table name and press Enter , Ex: MARA
  • Now execute (F8) this screen
  • Choose the record you want to manipulate and display (F7)
  • Go to Debug mode (/H) and press ‘Enter’ 2 times
  • Change the value of the variable ‘CODE’. By default, it is 'SHOW'
  • Change the code value as 'EDIT' for modifications, 'INSR' for insert and 'DELE' for delete.

Why you must read SAP ABAP interview questions and answers listed on this site?

This site contains all frequently asked SAP ABAP interview questions and their answers. These are the most important SAP ABAP questions asked in any SAP ABAP interview for freshers. So knowing answers to these SAP ABAP interview questions is must if you want to crack the SAP ABAP interview. So do read all answers before you appear for any SAP ABAP interview.