Your Ad Here

25 May 2008

SAP ABAB Interview Questions 2

71) Brief about Testing of programs.

Ans









72) How do u move on to the next screen in interactive reporting?

Ans Write code of the following:



1) Top-of-Page during line-selection

2) At line-selection



73) Create any functions? How to go about it?

Ans Steps for creating the Functions:



First Procedure:



1) /nSE37

2) Goto

3) Function Group (FG)

4) Create Group

5) Name of FG (ZREKHA_FG)

6) Short Text

7) Save

8) Local Object



Second Procedure



1) Environment

2) Inactive Object

3) Function Group (ZREKHA_FG)

4) Activate

5) Back



Third Procedure



1) Name of Function Module (ZREKHA_FM)

2) Create

3) Write FG Name (ZREKHA_FG)

4) Short Text

5) Save



Fourth Step:



Call function ‘ZREKHA_FM’.



74) Advanced topics?

Ans









75) Function modules used in F4 help.

Ans There are two types of function modules used in F4 help:



1) F4IF_FIELD_VALUE_REQUEST

2) F4IF_INT_TABLE_VALUE_REQUEST



76) Work most on which module: Name a few tables.

Ans Sales & Distribution Module



1) Sales Document: Item Data – VBAP

2) Sales Document: Partner – VBPA

3) Sales Document: Header Data – VBAK

4) Sales Document Flow – VBFA

5) Sales Document: Delivery Item Data - LIPS

6) Customer Master – KNA1

7) Material Data – MARA

8) Conditions (Transaction Data) - KONV



77) System Table used

Ans

1) Sales Document: Item Data – VBAP

2) Sales Document: Partner – VBPA

3) Sales Document: Header Data – VBAK

4) Sales Document Flow – VBFA

5) Sales Document: Delivery Item Data - LIPS

6) Customer Master – KNA1

7) Material Data – MARA

8) Conditions (Transaction Data) - KONV





78) From a table how do u find whether a material is used in another material BOM?

Ans













79) What is read line?

Ans READ LINE and READ CURRENT LINE – These statements are used to read data from the lines of existing list levels. These statements are closely connected to the HIDE technique.



80) How u used logical database? How is data transferred to program? Corresponding statement in LDB.

Ans









81) How do u suppress fields on selection screen generated by LDB?

Ans









82) Can there be more than 1 main window in SAP Script?

Ans No, there cannot be more than 1 main window in SAP Script because in WRITE_FORM, it asks for the parameter Window that will create the problem.



WRITE_FORM –

Exporting

Element

Window



83) Global and local data in function modules.

Ans









84) What are the differences between SAP memory and ABAP memory?

Ans ABAP Memory is a memory area in the internal session (roll area) of an ABAP program. Data within this area is retained within a sequence of program calls, allowing you to pass data between programs that call one another. It is also possible to pass data between sessions using SAP Memory.

SAP Memory is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session (as with ABAP memory) or to pass data from one session to another.

85) What are differences between At selection-screen and At selection-screen output?

Ans AT SELECTION-SCREEN event is triggered in the PAI of the selection screen once the ABAP runtime environment has passed all of the input data from the selection screen to the ABAP program.

AT SELECTION-SCREEN OUTPUT - This event block allows you to modify the selection screen directly before it is displayed.

86) What are the events?

Ans









87) What is get cursor field?

Ans GET CURSOR statement transfers the name of the screen element on which the cursor is positioned during a user action into the variable .

GET CURSOR FIELD [OFFSET ] [LINE ] [VALUE ] LENGTH ].

88) What is the inside concept in select-options?

Ans Select-options specify are displayed on the selection screen for the user to enter values.



Different Properties of Select-options:



1) Visible Length

2) Matchcode Object

3) Memory ID

4) Lowercase

5) Obligatory

6) No Display

7) Modify ID



89) What is the difference between occurs 1 and occurs 2?

Ans









90) What is the difference between Free and Refresh?

Ans Free - You can use FREE to initialize an internal table and release its memory space without first using the REFRESH or CLEAR statement. Like REFRESH, FREE works on the table body, not on the table work area. After a FREE statement, you can address the internal table again. It still occupies the amount of memory required for its header (currently 256 bytes). When you refill the table, the system has to allocate new memory space to the lines.



Refresh - This always applies to the body of the table. As with the CLEAR statement, the memory used by the table before you initialized it remains allocated. To release the memory space, use the statement



91) What are elements?

Ans









92) Can we have more than one selection-screen and how?

Ans Yes, we can have more than one selection screen.



Selection-screen begin of block honey with frame title text-101.

Select-options : deptno for zrekha_deptt-deptno.

Selection-screen end of block honey.



Selection-screen begin of block honey1 with frame title text-102.

Select-options : dname for zrekha_deptt-dname.

Selection-screen end of block honey1.



93) How to declare select-option as a parameter?

Ans SELECT-OPTIONS: specify are displayed on the selection screen for the user to enter values.



Parameters: dname like dept-dname.



Select-options: dname for dept-dname.



94) How can u write programmatically value help to a field without using search help and

match codes?

Ans By using two types of function modules to be called in SAP Script:



1) HELP_OBJECT_SHOW_FOR_FIELD

2) HELP_OBJECT_SHOW



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?

Ans













97) What are the function module types?

Ans









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?

Ans









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

Ans









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:



PBO (Process Before Output) – Before the screen is displayed, the PBO event is processed.
PAI (Process After Input) – When the user interacts with the screen, the PAI event is processed.
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.
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?

Ans



115) What are System Variable?

Ans System variables have been predefined by SAP. We can use these variables in formulas or, for example, to pass on certain pieces of information to a function module. How the function called by the function module behaves depends on the type of information passed on.

At present, we can use the following system variables:

System Variable Use Meaning
SY_MODE In function modules Current mode of the PI sheet
SY_TEST In function modules Status of the PI sheet (test or active)
SY_ROW In function modules Current table line
SY_VALUE or X Generally Refers to the immediately preceding input value

No comments: