SAP ABAP Interview Questions and Answers | Top 40 Transaction Codes in SAP ABAP Interview Questions and Answers in 2022 | sap interview questions on Transaction Codes | Transaction Codes interview questions | Top 40 SAP ABAP Interview Questions and Answers on T Codes | internal tables in SAP ABAP
SAP ABAP Interview Questions and Answers on T Codes
1.) What is ABAP Queries and it’s Transaction codes?
By using an ABAP Queries, we can generate the report, we don’t need to write any program to generate report. By using ABAP query we can also find the link between SAP Tables.
Transaction Codes we used in process ABAP Queries are:
- SQ01: It is used to maintain ABAP Queries.
- SQ02: It is used to maintain info set of ABAP Queries.
- SQ03: It is used to maintain user group of ABAP Queries.
2.) What is the difference between Like and Type statement of ABAP?
TYPE: By Using TYPE keyword, we can use elementary data types, Structure, and other data dictionary objects.
Syntax: DATA: <Variable_name> TYPE <DDIC_Object>.
LIKE: By Using Like keyword, we can only refer the existing data objects.
Syntax: DATA: <Variable_Name> LIKE <Table_field>
3.) Explain about Types and Data.
Types: Types is used to create a set of multiple fields from multiple tables to use in program to declare variable, work area and internal table etc. from this reference.
Data: Data is used to declare variables, work area, internal table etc in our application program.
4.) What is the difference between internal table and work area?
Internal Table: Internal table has a body which holds the multiple records, Internal table can be created using with header line or without header line, if Internal table created with header line, then record will process with header line.
Syntax: Data Internal_Table type table of <Types or Structure Name>.
Work Area: Work Area store only single record, Record is process in internal by using work area if internal table doesn’t have header.
Syntax: Data Work_Area type <Types of Structure Name>.
5.) How to Declare internal table?
Internal table can be declared by Two ways:
- Data Internal_Table type standard table of <Types/ Structure Name >.
- Data Internal_Table type table of
6.) What are the Difference between Parameters and Select Options?
Parameters: Parameters are used to declare check box, radio button and input field which can ask only for single value. Parameter can be declared by using type and like and when we use parameter variables with select query in where conditions must be used with EQ or ‘=’ operator.
Select Options: Select Options are used to declare variable which can take input as multiple values. Select option declaration is defined as internal table which have Sign, Option, High and Low fields. When we use Select option’s variable in select query with where conditions it must be use with “IN”. Select option declare with “FOR” keyword.
7.) Explain the different types of internal tables in SAP ABAP ?
Internal table are the table which holds the records at run time.
There are 3 types of internal tables in SAP ABAP
- Standard Table: Standard Table is filled using the ABAP statement ‘APPEND’ and ’INSERT’. Standard tables accept the duplicate records. Searching of a record in standard table is Linear Searching. Standard table is by default index table. Standard table can be sorted explicitly either Ascending or Descending order.
Syntax: – DATA TYPE STANDARD TABLE OF <Structure_Name>.
- Sorted Table: Sorted table is by default a sorted table either ascending or descending order. Sorted table accept the duplicate records. Searching in Sorted table is binary search. Sorted table declare with additional statement with “UNIQUE/ NON-UNIQUE” key must be added.
Syntax: – DATA: TYPE SORTED TABLE OF <Structure_Name> WITH UNIQUE/NON-UNIQUE KEY <Field_name1 ><Field_name2>.
- Hashed Table: Hashed Table is non-Index table. Hashed Internal Table holds large amount of data than Standard and Sorted internal tables. The ABAP statement ‘WITH UNIQUE KEY’ must be used to declare Hashed Table. It holds large amount of data than standard and sorted internal table.
Syntax: – DATA: TYPE HASHED TABLE OF <Structure_Name> WITH UNIQUE KEY <Field_name1>.
8.) Explain keywords which we used with Parameters and Select Option statements.
No-Extension: -No extension is used with select option to hide multiple selections button of select option variable in selection screen.
No-Interval: – No interval is used with select option to hide range option in selection screen of select option variable.
Default: – Default keyword is used to declare default value for a variable which is a default value of variable we declare with parameter or select option.
As Checkbox: – As checkbox is used to declare checkbox in selection screen.
Obligatory: – Obligatory keyword is used to declare field as mandatory field for variable in selection screen.
Radio Button group: – Radio Button group is declared to radio button in selection screen.
As list box: – As list box is used to declare drop down list in the selection screen.
Modifid: – Modifid is used to assign all the screen elements to the modification group to format the Selection fields dynamically.
9.) What is Clear, Refresh and Free statements of SAP ABAP?
Clear: Clear statement is used to clear the variable, work area and inter table with header line.
Refresh: Refresh clear the data of internal table.
Free: Free is used to clear the data of internal table as well as internal table allocation memory.
9.) Explain some important systems fields which we used frequently.
Some frequent used system fields are:
|Field Name||Short text|
|UZEIT||Current system time|
|SUBRC||Written code of the ABAP keywords|
|TABIX||Index of an internal table|
|REPID||Current program name|
|INDEX||Index of the loop|
|DATUM||Current system date|
10.) Explain String Comparison operators in ABAP.
CA: CA Stands for Contain any, CA condition return true when the source string contains any one of the characters in the target string.
NA: NA Stands for Contains not any, NA condition return true in case of string comparison operators CA (Contains Any) is false or return true in case of source string doesn’t contains any one of the characters in the target string.
CO: CO Stands for Contains only, CO condition return true when the source string contains only the similar string in the target string.
CN: CN Stands for Contains not only, CN condition return true in case of string comparison operators CO is false or return true when the source string does not contain similar string in the target string.
CP: CP Stands for Contain pattern, CP condition return true when the source string contains the specified pattern in the target string.
NP: NP Stands for Contains not pattern, NP condition return true in case of Logical expressions with a string operator CP is false or return true when the source string does not contain the specified pattern in the target string.
CS: CS Stands for Contains string, CS condition return true when the source string contains similar string in the target in both Upper & Lower case it’s not a case sensitive.
NS: NS Stands for Contains not string, NS condition return true in case of string operator CS is false or return true when source string does not contain similar string in the target string.
11.) Explain some important string operation keywords.
SPLIT: Split is used to split the source string into different targeted strings.
CONCATENATE: Concatenate is used to combine the multiple strings into targeted string.
CONDENSE: Condense is used to compress the string without any gaps.
STRLEN: Strlen is used to return length of string.
REPLACE: Replace is used to replace source string to target string.
FIND: Find is used to find the specified string.
SHIFT: Shift is used shift specified character and number of places to right and left.
12.) What is Modularization technique?
Modularization technique we used to make our code more understandable or more readable. Modularization is used to make a program in block wise and the same block can be used many times as required.
Some of the Modularization techniques are Includes, Function, Subroutines, Message class, Macros and text symbols & constants.
13.) What is the difference between Subroutine and Function Module?
Subroutine is local we can use it on same not from the outside of the same program while function module is global we can call it in any of the program. Function module can be executed independently while subroutine can’t be executed independently.
14.) What are the events triggering in reports programming?
LOAD-OF-PROGRAM: Load of program event trigger at the time of loading of the program into memory.
INITIALIZATION: Initialization event is triggered before the selection screen. initialization is used to clear and refresh the data variables and used to pass the default values to the selection fields.
AT SELECTION-SCREEN: At selection screen event is triggered after providing the input in the selection screen.
START-OF-SELECTION: Start of selection even is the default event and necessary to execute any executable program. This even is used to fetch the data from the database. If no event is used in the executable program then entire program will be triggered under start of selection event.
END-OF-SELECTION: End of selection event is triggered after Start-Of-Selection event is processed. End of selection event is used to specify the data process statements.
TOP-OF-PAGE: Top of page is used to display the column headings. Top of page event is triggered with the first ULINE/WRITE/SKIP/NEW PAGE statement in start of selection event in the program
END-OF-PAGE: End of page event is triggered at the end of each page. End of page is used to display the footer details of a page such as totals etc.
15.) What are the control break statements in SAP ABAP?
Control Break statements: – Control break statement is used to control the data flow of internal table in the loop. Control break statement start with AT keyword and ends with ENDAT keyword. Control break statement must be used within the loop only.
AT FIRST: – This event is triggered at the first record of an internal table in loop. It can be used to display the Header information.
AT NEW: – This event is triggered at the first record of each new record of internal table in loop. It could be used to display the individual headings.
AT END OF: – This event is triggered at the last record of internal table in loop. It could be used to display the total and sub totals in the internal table.
AT LAST: – This event is triggered at the last record of an internal table in loop.
ON CHANGE OF: – ON Change of is a special control break statement which can be used outside of the loop statement. It is like AT NEW statement. It can be used on the multiple fields using SET operators and & or & between.
16.) What are the difference between Classical report and ALV reports in SAP ABAP?
ALV reports generated with calling function resuse while classical report generated by using write statement. Performance of ALV report is good in comparison of classical report because alv report generated just by calling a function while classical will generated using write statement in loop. We can’t edit the classical report while we can make changes in alv report.
17.) How to make editable an ALV reports in SAP ABAP?
To make editable ALV report we just need to pass “X” in field EDIT to slis_t_fieldcat_alv.
Wa_fcat type slis_fieldcat_alv.
Wa_fcat-edit = ‘X’.
18.) How to add color in each row of ALV reports in SAP ABAP?
Add 4 Character field to the final internal table form which the data should be displayed then Populate color code dynamically and Pass color code field name to the field ‘info_fieldname’ of the layout.
19.) Events of Module Pool programming.
1. PBO (PROCESS BEFORE OUTPUT): PBO event is triggered before the screen is displayed. PBO can also be triggered while performing any action on the screen. PBO is used to provide the default values to the screen fields. PBO can also be used to format the screen elements dynamically.
2. PAI (PROCESS AFTER INPUT): PAI event is triggered after the Input values are provided to the screen. PAI event is used to validate the input data on the screens. PAI can also be used to process the screen data based on the performed action.
3.POH (PROCESS ON HELP-REQUEST): POH event is triggered when the function key F1 or help icon is pressed. POH event is used to provide the help documentation on the screen fields. The Transaction code SE61 and SO72 is used to maintain help documentation. The standard function module ‘HELP_OBJECT_SHOW’ is used to display the maintain help documentation.
4. POV (PROCESS ON VALUE-REQUEST): POV event is triggered in case of in case of function key F4 or search help icon is pressed. POV event is used to populate & display the custom search help on screen input fields. The standard function module “F4IF_INT_TABLE_VALUE_REQUEST” is used to display the populated internal table data as search help.
20.) What is the difference between SAP Scripts and Smart forms?
Smartforms are client independent while sap scripts are client dependent. In smartforms we can use background images while in sap scripts we can’t use.
SAP ABAP Interview Questions and Answers on T Codes
21.) Transaction codes related with Smart form?
Transaction codes are used in Smartforms are:
22.) What are main components of smart forms?
2.Pages & Window
23.) What are the Smart form events?
Only Before end of main window: To print and display the corresponding contents of the node or text node before the main window is ended.
Not on first page: The corresponding contents are not to print and display on the 1st page.
Only after end of main window: To print and display the corresponding contents after the main window is processed.
Only on first page: To print and display the data on the 1st page only.
Only on page: To print and display the data on the specified page.
24.) What is the difference between template and table in smart form?
Template is used to print static data means single record while the table is used to print dynamic data.
25.) How to get system generated function module of smart form?
1. Enter the transaction code Smartforms.
2. Enter the smartform name in text box and click on display button.
3. Go to the Environment menu and click on function module name.
26.) What are the system fields in smart forms?
SFSY is the structure of system fields for smart forms.
|PAGE||Page Number/Number of Pages|
|FORMPAGES||Total Number of Form Pages|
|JOBPAGES||Total Number of Pages of Print Job|
|COPYCOUNT||Copy counter (1 = original, 2 = 1st copy, …)|
|COPYCOUNT0||Copy counter (0 = original, 1 = 1st copy, …)|
|PAGENAME||Page name + variant|
|WINDOWNAME||Window name + variant|
|XSF||XSF Output active/inactive|
|XDF||SAP Smart Forms: XDF Output Active|
|XDF2||SAP Smart Forms: XDF Output Active|
27.) Which Function module used in drive program to get function module of smart form?
Function module is “SSF_FUNCTION_MODULE_NAME”.
28.) How many data migration technique we use in SAP?
LSMW and BDC.
29.) What is LSMW?
LSMW (Legacy System Migration Workbench): LSMW is the system provided tool to convert the legacy system data in SAP standard data.
30.) What are the functions module used in BDC?
Function module we used in BDC session method are
- BDC Open Group: Used to create the session method by transaction code SM35.
- BDC Insert: Used to insert the data in structure.
- BDC Close Group: Used to close the open batch input session.
31.) How many method used in BDC?
1. Call transaction Method
2. Session Method.
32.) What is the syntax of Call transaction method?
Call transaction <Transaction Code> Using <IT_BDCDATA> Mode <A/N> Update <S/A> Messages into <IT_BDCMSGCOLL>
IT_BDCDATA is internal table where batch data is stored.
IT_BDCMSGCOLL is internal table where message will handle.
<A/N> is mode tell us for forground process or background process means all screen or no screen.
<S/A> Synchronous and Asynchronous mode.
33.) Fields of BDCMSGCOLL structure.
|Field Name||Shot Description|
|TCODE||BDC Transaction code|
|DYNAME||Batch input module name|
|DYNUMB||Batch input screen number|
|MSGTYP||Batch input message type|
|MSGSPRA||Language ID of a message|
|MSGID||Batch input message ID|
|MSGNR||Batch input message number|
|MSGV1||Variable part of a message|
|MSGV2||Variable part of a message|
|MSGV3||Variable part of a message|
|MSGV4||Variable part of a message|
|ENV||Batch input monitoring activity|
34.) Fields of BDC DATA structure.
|Field Name||Short Description|
|PROGRAM||BDC module pool|
|DYNPRO||BDC Screen number|
|DYNBEGIN||BDC screen start|
|FVAL||BDC field value|
35.) What are the joins and how many types of joins we have?
Inner Join: Inner join is used to fetch data from multiple database table to any internal table by creating join.
For all entries: For all entries statement is used to fetch data from the database table based on the entries of the Base internal table.
36) how to debug background jobs?
- Enter Transaction Code SM37 in command box
- Select the required background job to be debugged.
- Enter JDBG in the Command field and Press Enter
- Press F7 until the required program is stopped.
- Use the Function keys F5/F6/F7 to check the program Line by line once it is reached
37) by how many ways we can execute our transaction code?
1. Foreground: foreground is used to execute the transaction code directly by pressing execute icon or F8 function key.
2. Background: Background execution mode is used to execute the transaction codes periodically such as Hourly, Daily, Weekly, Monthly in background.
38.) What is Pretty Painter?
Pretty painter is used to formating our porgram. Used to allign our program and convert the keyword and source code into upper case.
39.) What is RICEFW?
RICEFW stands for Report interface conversion enhancement forms and workflow. RICEFW objects are required in all sap projects.
40.) Selection Screen Events list.
AT SELECTION-SCREEN: At selection screen event is triggered after providing Input to the selection screen.
AT SELECTION-SCREEN OUTPUT: At Selection screen output event is triggered while performing any action in the selection screen. It is used to modify the selection screen
AT SELECTION-SCREEN ON: At Selection screen on event is triggered after input values provided in the selection screen. It is used to validate input data of the selection screen.
AT SELECTION-SCREEN ON VALUE REQUEST FOR: At Selection screen on value request for event is triggered when the user press F4 button. The standard function module “F4IF_INT_TABLE_VALUE_REQUEST” can be used to display the possible entries as search help.
AT SELECTION SCREEN ON HELP-REQUEST FOR: At selection screen on help request for event is triggered when the user press F1 button. The standard function module ‘HELP_OBJECT_SHOW’ can be used to provide the Help document to the input variable. The T-code SE61/SO72 is used to maintain the Help documentation as per the specification.
This post is related to “SAP ABAP Interview Questions and Answers on T Codes” in this post we are working on Top 40 SAP ABAP Interview Questions which is related to Report and Conversion and Forms. Other SAP ABAP Interview Questions we will discuss on our final part.
SAP ABAP Interview Questions and Answers on T Codes
These mentioned transaction codes are related to SmartForms, Reports and Conversions.
|Transaction Code||Short Description|
|LSMW||Legacy System Migration Workbench|
|SE01||Transport Organizer (Extended)|
|SE03||Transport Organizer Tools|
|SE11||ABAP Dictionary Maintenance|
|SE16N||General Table Display|
|SE18||Business Add-Ins: Definitions|
|SE19||Business Add-Ins: Implementations|
|SE24||ABAP Class Builder|
|SE32||ABAP Text Element Maintenance|
|SE35||ABAP/4 Dialog Modules|
|SE37||ABAP Function Modules|
|SE73||SAPscript Font Maintenance|
|SE85||ABAP/4 Repository Information System|
|SE93||Maintain Transaction Codes|
|SHDB||Batch Input Transaction Recorder|
|SMARTFORMS||SAP Smart Forms|
|SMARTFORM_TRACE||SAP Smart Forms: Trace|
|SMARTSTYLES||SAP Smart Styles|
You can also check our other articles on SAP ABAP Interview Questions and Answers
This article is the second part of SAP ABAP Interview Questions and Answers. it is related to SAP ABAP Interview Questions and Answers on T Codes . For the next part please connect with us wait for the next article and follow us on twitter.com/einfonett