Part 4 : SAP ABAP Interview Questions and Answers

6/17/2010 No Comment
95) What are the differences between SE01, SE09 and SE10?
Ans SE01 - Correction & Transport Organizer
SE09 - Workbench Organizer
SE10 - Customizing Organizer

96) How to set destination?

97) What are the function module types?

98) What are tables?
Ans Tables : ZREKHA_EMP.

It creates a structure – the table work area in a program for the database tables, views or structure ZREKHA_EMP. The table work area has the same name as the object for which we created it. ZREKHA_EMP must be declared in the ABAP dictionary. The name and sequence of fields in the table work area ZREKHA_EMP corresponds exactly to the sequence of fields in the database table, view definition in the ABAP dictionary.

99) What are client-dependant tables and independent tables?

100) How to distinguish client-dependant tables from independent tables?

101) What is the use of Table maintenance allowed?
Ans Mark the Table maintenance allowed flag if users with the corresponding authorization may change the data in the table using the Data Browser (Transaction SE16). If the data in the table should only be maintained with programs or with the table view maintenance transaction (Transaction SM30), you should not set the flag.

102) How to define Selection Screen?
Ans Parameters, Select-options & Selection-Screen

103) What are the check tables and value tables?
Ans Check Table: The ABAP Dictionary allows you to define relationships between tables using foreign keys . A dependent table is called a foreign key table, and the referenced table is called the check table. Each key field of the check table corresponds to a field in the foreign key table. These fields are called foreign key fields. One of the foreign key fields is designated as the check field for checking the validity of values. The key fields of the check table can serve as input help for the check field.
Value Table: Prior to Release 4.0, it was possible to use the value table of a domain to provide input help. This is no longer possible, primarily because unexpected results could occur if the value table had more than one key field. It was not possible to restrict the other key fields, which meant that the environment of the field was not considered, as is normal with check tables.
In cases where this kind of value help was appropriate, you can reconstruct it by creating a search help for the data elements that use the domain in question, and using the value table as the selection method.
Check table will be at field level checking.
Value table will be at domain level checking ex: scarr table is check table for carrid.
104) What is the difference between tables and structures?
Ans Tables:
1) Data is permanently stored in tables in the database.
2) Database tables are generated from them.


Structure:
1) It contains data temporarily during program run-time.
2) No Database tables are generated from it.

105) How to declare one internal table without header line without using structures?
Ans No, we cannot declare internal table without header line and without structure because it gives error “ITAB cannot be a table, a reference, a string or contain any of these object”.

Code with Header without Structure

TABLES : ZREKHA_EMP.
DATA : ITAB LIKE ZREKHA_EMP OCCURS 0 WITH HEADER LINE.

SELECT * FROM ZREKHA_EMP INTO CORRESPONDING FIELDS OF ITAB.
APPEND ITAB.
ENDSELECT.

LOOP AT ITAB.
WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO.
ENDLOOP.

Code without Header with Structure

TABLES : ZREKHA_EMP.

DATA : BEGIN OF ITAB OCCURS 0,
EMPNO LIKE XREKHA_EMP-EMPNO,
EMPNAME LIKE XREKHA_EMP-EMPNAME,
DEPTNO LIKE XREKHA_EMP-DEPTNO,
END OF ITAB.

SELECT * FROM ZREKHA_EMP INTO CORRESPONDING FIELDS OF ITAB.
APPEND ITAB.
ENDSELECT.

LOOP AT ITAB.
WRITE : / ITAB-EMPNO, ITAB-EMPNAME,ITAB-DEPTNO.
ENDLOOP.

106) What are lock objects?
Ans Reason for Setting Lock: Suppose a travel agent want to book a flight. The customer wants to fly to a particular city with a certain airline on a certain day. The booking must only be possible if there are still free places on the flight. To avoid the possibility of overbooking, the database entry corresponding to the flight must be locked against access from other transactions. This ensures that one user can find out the number of free places, make the booking, and change the number of free places without the data being changed in the meantime by another transaction.
The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules (see Function Modules for Lock Requests). These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.
Two types of Lock: Shared and Exclusive

107) What are datasets? What are the different syntaxes?
Ans The sequential files (ON APPLICATION SERVER) are called datasets. They are used for file handling in SAP.

OPEN DATASET [DATASET NAME] FOR [OUTPUT / INPUT / APPENDING]
IN [BINARY / TEXT] MODE
AT POSITION [POSITION]
MESSAGE [FIELD]

READ DATASET [DATASET NAME] INTO [FIELD]

DELETE DATASET [DATASET NAME]

CLOSE DATASET [DATASET NAME]

TRANSFER [FIELD] TO [DATASET NAME]

108) What are the events we use in dialog programming and explain them?
Ans There are two events in Dialog Programming i.e. screen:

1. PBO (Process Before Output) – Before the screen is displayed, the PBO event is processed.
2. PAI (Process After Input) – When the user interacts with the screen, the PAI event is processed.
3. POH (Process On Help) - are triggered when the user requests field help (F1). You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.
4. POV (Process On Value) - are triggered when the user requests possible values help (F4). You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.


109) What is the difference between OPEN_FORM and CLOSE_FORM?
Ans OPEN_FORM – This module opens layout set printing. This function must be called up before we can work with other layout set function like WRITE_FORM.

WRITE_FORM – Output text element in form window. The specified element of the layout set window entered is output. The element must be defined in the layout set.

CLOSE_FORM – End layout set printing. Form printing started with OPEN_FORM is completed. Possible closing operations on the form last opened are carried out. Form printing must be completed by this function module. If this is not carried out, nothing is printed or displayed on the screen.


110) What are the page windows? How many main windows will be there in a page window?
Ans Page Window: In this window, we define the margins for left, width, upper and height for the layout of Header, Logo, Main, & Footer.



111) What are control events in a loop?
Ans Control level processing is allowed within a LOOP over an internal table. This means that we can divide sequences of entries into groups based on the contents of certain fields.
AT .

ENDAT.
You can react to the following control level changes:
Meaning
FIRST First line of the internal table
LAST Last line of the internal table
NEW Beginning of a group of lines with the same contents in the field and in the fields left of
END Of End of a group of lines with the same contents in the field and in the fields left of

112) How to debugg a script?
Ans Go to SE71, give layout set name, go to utilities select debugger mode on.

113) How many maximum sessions can be open in SAPgui?
Ans There are maximum 6 sessions open in SAPgui.

114) SAP Scripts and ABAP programs are client dependent or not? Why?


Related Posts


No comments :

 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer