SAP ABAP Interview Questions and Answers
Question - 51 : - How do we debug sapscript?
Answer - 51 : - First we need to put Break point in Print program where ever you want to stop the execution.
After in SE71 give your form name and go to Utilities-->Active De-bugger.
Then go to your transcation like VF03(for Invoice or Credit memo) etc to see the print preview or print the form execute it.
When you execute it the the form Debugging will get activated and you can see your Form execution step by step.
Question - 52 : - What are the different types of data dictionary objects?
Answer - 52 : - Data Dictionary Objects
* Tables
* Views
* Domain
* Data Element
* Type Groups
* Search Helps/Matchcode Objects
* Lock objects
* Structures
* Table Types
the dictionary objects are:
domain
dataelements
tables
views
structures
typegroups
search helps
lock objects etc which are data base related objects in sap
Question - 53 : - What are the domains and data elements?
Answer - 53 : - domains:
___________
domains are the dictionary objects that are assigned with constants and data types
data elements:
______________
data elements are dictionary objects that are assigned with the domains.
uses:'
* data elements are used to create relation between tables.
* data elements are used to transfer the data from one R/3 to another R/3.
* to create search helps.
Question - 54 : - What is a collect statement? How is it different from append?
Answer - 54 : - APPEND :
IT IS USED TO GET THE RECORD FROM THE INTERNAL TABLE HEADER TO THE BODY AREA
IT ALLOWS DUPLICATION
COLLECT:
IT IS USED TO A GET A RECORD FROM HEADER TO THE BODY AREA BUT IT WILL NOT ALLOW ANY DUPLICATION EXCEPT IF THERE IS ANY NUMERIC FIELS IT ADDS THAT FIELDS DATA BUT NOT AS A NEW RECOR
Question - 55 : - On ABAP: Did you set up a workflow? Are you familiar with all steps for setting up a workflow?
Answer - 55 : - Yes.
Execute the Txn SWDD(Creating a new Workflow).
In the header of the Workflow, define the Business Object and Event you refer to for triggering the Wf.
Create the Steps required for your workflow(Activity).
Inside the Activity, Create the task and assign the Business Object and the related method for that business object.
Activate the Workflow.
Question - 56 : - In the ‘select’ statement what is “group by”?
Answer - 56 : - Group by clause is used to fetch the data from the table by the specified field
ex.select count (*) from emptable group by deptno where deptno = 1.
It is used to find the number of employees present in the specified department no.
Question - 57 : - How can I copy a standard table to make my own z_table?
Answer - 57 : - WE CAN CREATE A STRUCTURE LIKE THE SAME STRUCTURE AS DATABASE TABLE AND WE CAN USE
SELECT* FROM DATABASE TABLE INTO TABLE ITAB
OR
INSERT INTO ITAB VALUES DATABASE TABLE
Question - 58 : - From Excel to ABAP - Is batch mode possible ?
Answer - 58 : - DATA w_file TYPE string.
* Convert the file path into string
w_file = p_input.
* Internal Table should have same field sequence as EXL File.
CLEAR t_upload.
REFRESH t_upload.
* Call function to upload the data into internal table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = w_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = t_upload
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc NE 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE.
* Delete the first row of heading from the uploaded table
DELETE t_upload INDEX 1.
ENDIF. " IF sy-subrc EQ 0.
Question - 59 : - What is the difference between Table and Template in Smartforms?
Answer - 59 : - The difference between Table and Template is that Table is dynamic in nature and Template is static in nature.
Question - 60 : - Explain the concept of BADIs?
Answer - 60 : -
BADI is called Business Add-in. There are two types of BADIs – Classical BADI and New BADI.
- BADI is reusable
- BADI can be implemented many times.
- BADI enables each party in software delivery chain to offer enhancements.
Components created when you define BADI as follows: