Real-Time SAP ABAP Interview Questions and Answers for Beginners and Experience
All SAP ABAP Interview questions are real time questions which had been asked in many interview sessions in 2019 & 2020. So, We have organized all the questions & published here for the help. It will help those person who want to prepare SAP ABAP Interview in very short time period.
Table of Contents
Answer – ABAP/4 Data Dictionary describes the logical structures of those objects which are used in the application development and shows how they are mapped to the underlying relational databases in tables/views.
Answer – Domains: Domain is the central object that describes the technical characteristics of an attribute of business objects. It tells the value range of the field.
Data Element: Data Element that describes the semantic definition of the table fields like description the field.
It describes how a field can be displayed to end-user.
3. What is foreign key relationship in SAP Table?
Answer –A Foreign Key Relationship defines the relations between two different tables. Using this we can easily create value checks for the input fields. Foreign key allows us to link several tables to a View or a Lock Object.
4. What is Data Classes in Technical Setting.
Answer – Data Class are similar to a physical area(Tablespace or DatabaseSpace) in which all the tables assigned to the respective data class are stored.
There are different data classes :
Master data: It is a type of data which is rarely changes.
An instance of master data is name, address and telephone number.
Transaction data: It is a type of data which is often changed.
An instance of transaction data is the goods in a warehouse, which changes after every purchase.
Organization data: It is a type of customizing data which is entered in the system when the system is configured and is then rarely changed.
An instance of Organization data is the table with country codes.
System data: It is the data which R/3 system needs for itself.
5. What is Indexes in SAP ABAP Data Dictionary?
Answer – In simple words Indexes can be said a copy of a database table that has been reduced to certain fields. It is always in sorted form, as sorting provides faster access to the data records of the table. We use indexes to speed up the searching of a table for data records.
6. Difference between transparent table and pooled table.
Answer – Transparent tables: This type of table has one-to-one relation in the database, means it has relation to its own. It has same name in the database as in the dictionary. It is used to store master data, transnational data as well as organizational data. All the business and application data are stored in this type of SAP tables. Each transparent table corresponds to a physical database table.
Pooled tables: Pooled table has a many-to-one relation with the table in database. Table in the database has the different name as in the data-dictionary. Pooled tables are stored in table pool at database level.
7. What is ABAP/4 Query?
Answer – ABAP/4 Query is a tool to generate simple reports without any need of code. ABAP/4 Query can generate the following reports:
Basic List: It is the most simple reports.
Statistics List: This is a report with statistical functions like Average, Percentages.
Ranked Lists: This is for analytical report. To create an ABAP/4 Query, programmer has to create user groups and functional groups.
These functional groups can be created with or without using logical database tables. Finally, assign the user group to functional group and create the required query on the functional group generated.
8. What is BDC programming?
Answer –It is a process of transferring of large data or from an external system into SAP system using Batch Input programming. This is an automatic procedure referred to as BDC(Batch Data Communications). The main component of the transfer is a queue file which gets the data via batch input programs and groups associated data into “sessions”.
9. What are the function modules used in sequence in BDC?
Answer –There are 3 function modules which are being used in a sequence to perform a data transfer successful using BDC programming:
BDC_OPEN_GROUP – The Parameters in this function group like Name of the client, sessions and user name are specified.
BDC_INSERT – This function group is used to insert the data for one transaction into a session.
BDC_CLOSE_GROUP – This function group is used to close the batch input session.
10. What is internal table in SAP?
Answer – Internal tables are standard data type object which exists only during the runtime of the program. It used to perform table calculations on fields of database tables and for re-organizing the contents of database tables according to users need.
11. What is ITS? What is benefits of ITS?
Answer –ITS is an Internet Transaction Server. ITS creates an interface between HTTP server and R/3 system, which converts the screens with data by the R/3 system into HTML files and vice-versa.
Benefits of ITS:
A. A complete web transaction can be developed and tested on the R/3 system.
B. Every transaction components, including those used by the ITS outside the R/3 system at runtime, can be stored on the R/3 system.
C. The benefit of automatic language processing in the R/3 system can be utilized to understand language dependent HTML file at runtime.
12. What is SAP WebDynPro?
Answer – WebDynPro is a combination of screen and the associated flow logic Screen is also called as DynPro.
13. What is use of screen painter and menu painter in SAP?
Answer – Screen painter: Screen painter is a tool to design and maintain screen and its elements. It allows the user to create GUI screens for the transactions. Layout, Attributes, flow logic and filled attributes are the important elements of Screen painter.
Menu painter: Menu painter is a tool to design the interface components. menu lists, F-key settings, Status, titles, functions and menu bars are the main components of Menu painters. Screen and menu painter both are the graphical interface of an ABAP/4 application.
14. What are the components of SAP Scripts?
Answer – SAP scripts is a word processing tool in SAP ERP which has the following components:
Standard text- This is similar to a normal documents.
Layout sets – This consists of the following components: Character formats, Paragraph formats, Windows and pages. Every layout set consists of character string, paragraph and Header.
Function Modules : Start Form, Write Form End Form Etc.
ABAP print program.
15. What is ALV programming in ABAP and What is ALV Grid?
Answer – ALV is Application List viewer. SAP has provided a set of ALV (ABAP LIST VIEWER) function modules which can be used to enhance the output of a report. It is used to enhance the readability and functionality of any report output.
It is used when cases arise in sap when the output of a report contains columns which are extending more than 255 characters in length. In such cases, ALV functions can help choose selected columns and arrange them in different positions on a report output and also save those different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns according to the user. The report output can contain up to 90 columns in the display with the wide array of display options.
SAP ABAP Smartforms Real-Time Interview Questions
1. How to break a page within table loop forcefully in smartforms?
Ans: First create a loop around the table and then put a command node before the starting of Table Loop that creates a NEWPAGE on whatever condition you want. Then just loop through the subsets of internal tables in the Table node
2. How to create Font Styles and Font sizes in Smartforms?
Ans: First Go to T-code SMARTSTYLES.
There we can create Paragragh formats etc. Then back to your Smartform Window under OUPUT OPTIONS include the SMARTSTYLE and use the Paragraph and character format as you want.
3. What is the difference between GLOBAL DEFINITION and FORM INTERFACE in global settings of smartforms?
Ans: In simple words, Global Definitions is where we can declare data types or variables that will be used within the smartform on global scope i.e; anything you declare here can be used in anywhere in the form.
Form Interface is where we declare data types or variable whose values to be passed from smartfrom or passed to the smartform
4. What is the reason behind the output difference in Smartforms?
Ans: In certain cases of form two differently configured printers seems to be making differences in the output of characters per inch which leads to layout problem. So to resolve this go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Controls and then make the same Printer Control Setting for both the printers, then it will be working fine.
5. How to find the name of the Function Module for Smartform? When is this function module gets created?
Ans: The function module of Smartform is generated when smartform is activated. To find the name of the Function Module for Smartform is by going to ENVIRONMENT —> Function Module Name.
6. You have created a smartform on Development Server. Then you transported that smartform to the Production Server. Now will the name of the Function Module be the same in both servers or it will change?
Ans: The Smartform that is created in the Development Server may not have the same Function Module Name in the Production Server. So it is always a right approach to use the Function Module ‘SSF_FUNCTION_MODULE_NAME’ to get the function module name by passing the Smartform name.
DATA: f_name TYPE rs38l_fnam.
CALL FUNCTION ‘SSF_FUNCTION_MODULE_NAME’
formname = ‘ZSMARTFORMS’
fm_name = f_name
no_form = 1
no_function_module = 2
others = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
CALL FUNCTION f_name
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
7. How to print a Smartforms Output to PDF?
Ans: The Way to download the smart form in PDF Format is:
- Print the smartform to the spool.
- Now note the spool number of it.
- Download a PDF file (Acrobat Reader) by running Program
RSTXPDFT4 and enter the noted spool number.
8. How to avoid page breaks for line types?
- Firstly, double-click on your table node and select the Table tab page.
- Now go to Details pushbutton.
- Now select the “No Page Break” checkbox for the relevant line type.
Due to this line type are output on one page.
9. How to insert symbols in Smartforms?
- Select the text node in which you want to enter the symbol.
- Open it in Edit mode.
- Go to menu Include->Characters-> SAP Symbols
Now you can choose the SAP Symbol of your choice.
10. How to print both sided on a Smartform?
Ans: At Page Level go to Output Options, then in “Print Mode”. Select the Print Mode to “D” duplex to print on both sides.
11. How to display Smartform in a print preview by default without displaying the print popup first.
Ans: In the SSF_OPEN function module, set the OUTPUT OPTIONS parameter TDDEST to your printer name.
12. How to make smart forms to choose a printer name by default?
Ans: Just set the output options parameters to set the printer name in the CALL FUNCTION of the smartform function module (CALL FUNCTION f_name).
The output option is of type SSFCOMPOP which contains the field TDDEST, just set this field to your default printer name.
OUTPUT_OPTIONS-TDDEST = ‘Printer Name’.
13. How to display the total number of pages in smartforms?
Ans: SFSY-FORMPAGES is used to display the total number of pages in smartform.
&SFSY-PAGES&: Current Page Number
&SFSY-FORMPAGES&: Total number of pages in currently formatted layout set.
&SFSY-COPYCOUNT&: Value of this variable : Original-1, Duplicate-2, Triplicate-3
&SFSY-JOBPAGE&: Total number of pages in the currently formatted print request.
14. How to resolve this issue: While using SFSY-FORMPAGES or SFSY-PAGE, we get a star ‘*’ instead of the total Number of Pages or Current Pages?
Ans: Might happen due to the reason that there may not be enough space in the window to display the value.
To resolve this issue try the following steps:
- Increase the window dimensions.
- Reduce the spaces by using the ‘C’ , ‘ZC’ or ‘4ZC’ along with the variables like &SFSY-FORMPAGES(C)& or using &SFSY-FORMPAGES(ZC)& or &SFSY-FORMPAGES(4ZC)&.
- ‘4′ reserves a four character wide output.(It can be set to any value)
- ‘Z’ eliminates the leading zeroes.
- ‘C’ Compress Spaces.
15. What is Page Protection in Smart forms? How achieve Page Protection in Smart Forms?
Ans: To avoid displaying the broken contents of the page and allow it to display on the next page from the beginning.
To activate Page Protection, click on TEXT file —> Output Options —> select the checkbox Page Protection.
But you have Page Protection property only for Text Elements in the Main Window.
16. Can Smart Form be moved from one system to another without transports?
Ans: Yes, this can be done by using Upload/Download feature for Smart Forms. We can download Smart Form from the system in XML file. After this XML file can be uploaded back in another system.
17. How to use Barcode in Smart Form?
Ans: First we have to go to T-Code SE73 SAP Script Font Maintenance to create or display the bar codes.
Then go to SMARTSTYLES transaction, create a new character format and assign the barcode name that you have created in it. Then we can use that character format in your smart form wherever we want the barcode to be displayed.
18. In Program Lines I have defined a global variable GL_TEXT, on activating the smartform i am getting an error “GL_TEXT” is not defined. How to resolve this issue?
Ans: Whenever you are using a Global Variables in Program Lines, make sure to enter the variable name in Input Parameters if you are going to only read that variable. If you are going to read/write the variable value, enter it in the Output Parameters.
19. Suppose, in SAP R/3 system has 2 clients 300 & 302. You have created an SAP Script Z_SCRIPT and SAP Smartform Z_SMARTFORM in client 300. Will both be available in client 302 as well?
Ans: Client 302 will only have the smartform Z_SMARTFORM and will not have the SAP Script Z_SCRIPT.
SMARTFORM is client independent whereas SAP-Script is client dependent.
20. How to add a Watermark Or a Background Image for Smartforms?
Ans: When you double click on PAGE node in Smartform, you will see a tab for Background Image.
There just provide the credentials of Image and it can be used as background image/Watermark in Smartform.
21. What is the difference between a Template and a Table in Smartforms?
Ans: A Table can have variable rows and columns whereas a Template has fixed number of rows and columns.
A Template should be used when the tabular output is fixed!
22. Is it possible to have a Smartform without a main window?
Ans: Yes, it is possible to create a Smartform without a Main Window. But there is no need to do such things.
23. What is Copies Window in Smartform?
Ans: Copies Window is used to define an output area for the print output whenever we want the content to be appeared either on copy or original. This allows us to set a flag of copy on when the copies of forms are printed.
You can define wherever you want to print the nodes of copies Window.
Both on the original and on the Copies (Original and Copies)
Only on the original (Only Original)
Only on the copies (Only Copies)
You can use system fields SFSY-COPYCOUNT to check whether the current output is original or copy.
24. What is Final Window in Smart forms?
Ans: Final Window is called at the last after calling the other windows in a Smartform.
25. In a form for two differently configured printers, there can be found differences in the output of characters per inch or different layouts can be found. How to resolve this issue?
Ans: It usually happens when there are two printers with different Printer Controls. Now when you will go to T-code SPAD Menu (Spool Administrator Menu) you will see the difference in the Printer Control and when you make the Printer control setting for both the printers as same then it will be OK. Also check what device type has been used by both the output devices.