Thursday, 16 January 2014

SAP ABAP QUESTIONS & ANSWERS-2



SAP ABAP QUESTIONS & ANSWERS-2 :-


Q. What is a function group ? 
ANS:-

Group of all related functions. 

Q. How are the date and time field values stored in SAP ? 
ANS:-
DD.MM.YYYY.  HH:MM:SS 

Q. Name a few data dictionary objects ?
ANS:-
Tables,views,structures,lock objects,matchcode objects.

Q. What happens when a table is activated in DD ? 
ANS:-
It is available for any insertion,modification and updation of records by any user.

Q. What is a check table and what is a value table ? 
ANS:-
Check table will be at field level checking.
Value table will be at domain level checking ex: scarr table is check table for carrid.

Q. What are match codes ? describe ? 
ANS:-
It is a similar to table index that gives list of possible values for either primary keys or non-primary keys.

Q. What are ranges ? What are number ranges ? 
ANS:-

Max,min values provided in selection screens.

Q. What are select options and what is the diff from parameters ? 
ANS:-
select options provide ranges where as parameters do not. 
SELECT-OPTIONS declares an internal table which is automatically filled with values or ranges of values entered by the end user. For each SELECT-OPTIONS , the system creates a selection table.
SELECT-OPTIONS <SEL> FOR <field>.
A selection table is an internal table with fields SIGN, OPTION, LOW and HIGH. 
The type of LOW and HIGH is the same as that of <field>. 
The SIGN field can take the following values: I Inclusive (should apply) E Exclusive (should not apply) The OPTION field can take the following values: EQ Equal GT Greater than NE Not equal BT Between LE Less  than or equal NB Not between LT Less than CP Contains pattern GE Greater than or equal NP No pattern.
Diff:-
PARAMETERS allow users to enter a single value into an internal field within a report. 
SELECT-OPTIONS allow users to fill an internal table with a range of values. 
For each PARAMETERS or SELECT-OPTIONS statement you should define text elements by choosing 
Goto - Text elements - Selection texts - Change. 
Eg:- Parameters name(30).
when the user executes the ABAP/4 program,an input field for 'name' will appear on the selection screen.You can change the comments on the left side of the input fields by using text elements as described in Selection Texts.

Q. How do you validate the selection criteria of a report ? And how do you display initial values in a selection screen ? 
ANS:-
validate :- by using match code objects.
display :- Parameters <name> default 'xxx'. select-options <name> for spfli-carrid.

Q. What is CTS and what do you know about it ? 
ANS:-
The Change and Transport System (CTS) is a tool that helps you to organize development projects in the ABAP Workbench and in Customizing, and then transport the changes between the SAP Systems and clients in your system landscape.
This documentation provides you with an overview of how to manage changes with the CTS and essential information on setting up your system and client landscape and deciding on a transport strategy. Read and follow this documentation when planning your development project.
For practical information on working with the Change and Transport System, see Change and Transport Organizer and Transport Management System.

Q. Are programs client dependent ? 
ANS:-
Yes. Group of users can access these programs with a client no.

Q. Name a few system global variables you can use in ABAP programs ? 
ANS:-
sy-subrc,sy-dbcnt,sy-lilli,sy-datum,sy-uzeit,sy-ucomm,sy-tabix.....
sy-lilli is absolute no of lines from which the event was triggered.

Q. What are internal tables ? How do you get the number of lines in an internal table ? How to use a specific number occurs statement ? 
ANS:-
i)It is a standard data type object which exists only during the runtime of the program.
They are used to perform table calculations on subsets of database tables and for re-organising the contents of database tables according to users need.
ii)using SY-DBCNT.
iii)The number of memory allocations the system need to allocate for the next record population.

Q. How do you take care of performance issues in your ABAP programs ? 
ANS:-
Performance of ABAPs can be improved by minimizing the amount of data to be transferred. 
The data set must be transferred through the network to the applications, so reducing the amount OF time and also reduces the network traffic.
Some measures that can be taken are: 
- Use views defined in the ABAP/4  DDIC (also has the advantage of better reusability).
- Use field list (SELECT clause) rather than SELECT *.
- Range tables should be avoided (IN operator)
- Avoid nested SELECTS. 

Q. What are datasets ? 
ANS:-
The sequential files(ON APPLICATION SERVER) are called datasets. They are used for file handling in SAP.

Q. How to find the return code of a statement in ABAP programs ? 
ANS:-
Using function modules.



No comments:

Post a Comment