Wednesday 4 February 2015

SAP ABAP Interview Questions and Answers pdf (Part3)

Below are some important SAP ABAP interview questions which are asked in most MNC company interviews for beginners or professionals.
21. How to upload data using CATT ?
These are the steps to be followed to Upload data through CATT: Creation of the CATT test case & recording the sample data input. Download of the source file template. Modification of the source file. Upload of the data from the source file.

22. What is Smart Forms?
Smart Forms allows you to create forms using a graphical design tool with robust functionality, color, and more. Additionally, all new forms developed at SAP will be created with the new Smart Form solution.

23. How can I make a differentiation between dependent and independent data?
Client dependent or independent transfer requirements include client specific or cross client objects in the change requests. Workbench objects like SAPscripts are client specific, some entries in customizing are client independent. If you display the object list for one change request, and then for each object the object attributes, you will find the flag client specific. If one object in the task list has this flag on, then that transport will be client dependent.

24. What is the difference between macro and subroutine?
Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. Subroutines (FORM) can be called from both the program the are defined in and other programs . A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. Since debugging a MACRO is not really possible, prevent the use of them (I’ve never used them, but seen them in action). If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.

25. What is the differences between structure and table in data dictionary in ABAP?
Structure and table both are 2/2 matrices but there are many differences between table and structure.
1. Table can store the data physically but a structure dose not store.
2. Table can have primary key but a structure dose not have.
3. Table can have the technical attribute but a structure dose not have.
structure doesn't contain technical attributes.
structure doesn't contain primary key.
structure doesn't stores underline database level.

26. What is the difference between collect and sum?
SUM.
When processing an internal table in a block starting with LOOP and concluded by ENDLOOP , SUM calculates the control totals of all fields of type I , F and P (see also ABAP/4 number types ) and places them in the LOOP output area (header line of the internal table or an explicitly specified work area).
When you use SUM in a LOOP with an explicitly specified output area, this output area must be compatible with the line type of the internal table.When using LOOP to process a sorted extract (see SORT ), the control total of f at the end of the group appears in the field SUM(f) - - if f is type I , F or P .

COLLECT.
COLLECT is used to create unique or compressed datsets. The key fields are the default key fields of the internal table itab .

If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields.

If, besides its default key fields, the internal table contains number fields,the contents of these number fields are added together if the internal table already contains an entry with the same key fields.

If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line.

If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab .

After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed.

COLLECT can create unique or compressed datasets and should be used precisely for this purpose. If uniqueness or compression are unimportant, or two values with identical default key field values could not possibly occur in your particular task, you should use APPEND instead. However, for a unique or compressed dataset which is also efficient, COLLECT is the statement to use.

If you process a table with COLLECT , you should also use COLLECT to fill it. Only by doing this can you guarantee that the internal table will actually be unique or compressed, as described above and COLLECT will run very efficiently.

If you use COLLECT with an explicitly specified work area, it must be compatible with the line type of the internal table.

27. How we format the data before before write statement in report ?
We can format the reports output by using the loop events like:
1.at first
2.at new
3.at last
etc check docu

28. What is the difference between Table and Template?
table is a dynamic and template is a static

29. When do we use End-of-selection?
End-of-selection event are mostly used when we are writing HR-ABAP code. In the HR-ABAP code, data is retrived in the Start-of-selection event and Printing on the list and all will be done in End-of-selection event.

30. In events start-of-selection is default event. When we have to use this event explicitly? Why?
The default event in the ABAP is Start-of-selection.We have to call explicitely this event when you are writing other than ths event , that is when you write AT SELECTION-SCREEN EVENTS OR INITIALIZATION EVENT etc,you have to explicitely mention the Start-of-selection event while you are writing the logic.
Before these events called ,all the code you have written come into this default Start-of-selection screen event.
More Questions & Answers :-

No comments:

Post a Comment