Sie sind auf Seite 1von 4

You want to use SORT command on the internal table.

Is it possible to use SORT


command on a hashed internal table?
Ans : Sort command can be used on a hashed internal table as well as a standard
internal table.
2.. How to monitor the change of content of individual variables?
a .Code for a watch point in the program against the particular variable
X
( Not
Possible)
b.You can set the watch point only in the debugger mode against the variable.
c.You can create multiple watch-points
d.Create watch-point based on the combination of AND/OR operators
3. Any change in sap standard code
Ans : modification
4. How to implement a BADI definition ?
Need to implement the interface defined in BADI. BADI s are based on OOPS concept
.
Notes:
1.Execute Business Add-In(BADI) transaction SE18
2.Enter BADI name i.e. HRPBSGB_HESA_NISR and press the display button
3.Select menu option Implementation->Create
4.Give implementation a name such as Z_HRPBSGB_HESA_NISR
5.To access already created implementations simple select menu option Implementa
tion->display or Implementation->change. You can also access existing BADI imple
mentations via transaction SE19
6. You can now make any changes you require to your BADI within the implementati
on, for example choose the Interface tab
7.Double click on the method you want to change, you can now enter any code you
require.
8.Please note to find out what import and export parameters a method has got ret
urn the original BADI definition (i.e. HRPBSGB_HESA_NISR) and double click on th
e method name for example within HRPBSGB_HESA_NISR contract is a method
9.When changes have been made activate the implementation
5) How to access private attributes of a class ?
Ans:
a. Private attributes can be changed/accessed only by the methods of the class.
b. All the users (classes) specified as friends can also access PROTECTED and P
RIVATE components of the class (If modelled flag is not set while defining frien
ds). The friends relationship is always one-sided and is not inherited. This mea
ns that friends of a superclass are not automatically friends of the subclasses.
6) Widening Cast and Narrowing Cast.
1)created an object for subclass say sub1 (its type is subclass )
2)assing that to superclass : super1 = sub1 (super1 is superclass type) >this
is called upcasting or narrow..ur access is limited to
super class attri o
nly
3) now ur assigning back agin to subclass type sub1 ?= super1 (sub1 is subclass
type) > this is called downcast or widening
casting..ur access to now
not limited only to superclass ,u can also access sub class attri and methods.
WIDENING CAST (down cast) subclass_ref ?= super class obj
u will get ques on this concept .
7) There exists an error in one of the mandatory fields and you want to exit the
application or cancel the transaction without entering the mandatory field. Wha
t will you have to code in the module pool programming to achieve this functiona
lity
Ans : In the PAI Event, MODULE EXIT_TRANSACTION AT EXIT-COMMAND.
The function code for the button should be E .

8 ) You have to write the logic for a custom transaction such that a different
logic is followed for each click on button on the Menu. How is this handled in t
he Dialog Programming?
Ans: The buttons function code is captured in system variable sy-ucomm. You hav
e to define a screen attribute ok_code of type sy-ucomm as a global variable. I
n the PAI Event, write a module as below. Sample code can be as below in the PAI
Event Module.
MODULE user_command_1000.
Ok_code = sy-comm.
CASE SY-COMM.
WHEN SAVE .
Perform save_Date.
WHEN CANCEL .
PERFORM exit_data.
ENDCASE.
ENDMODULE.
9) You have been given to analyse a report program where the events are written
in alphabetical order. What will the series of events executed?
Events are executed by the runtime environment. No matter in which order the eve
nts are written below is the flow of events
1. LOAD-OF-PROGRAM
2. INITIALIZATION
3. AT SELECTION-SCREEN.
4. START-OF-SELECTION.
Ans: TOP-OF-PAGE will be triggered before the first WRITE statement.
10) How to display an ALV grid in the module pool program, say in a custom tran
saction user will enter the material and click on execute, then an ALV report is
to be generated in the next screen.
Step 1: Create a Custom Control screen element say with name CCONT .
In the PBO module of the screen.
Step2: Create the container object and the corresponding grid object.
DATA : g_custom_container TYPE REF TO cl_gui_custom_container,
g_grid TYPE REF TO cl_gui_alv_grid,
CREATE OBJECT g_custom_container
EXPORTING
container_name = CCONT .
CREATE OBJECT g_grid
EXPORTING
i_parent = g_custom_container.
Step3: Build the field catalog and layout as required.
DATA : gt_fieldcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo.
Step4: Perform the display of data using
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
i_save = c_a
CHANGING
it_fieldcatalog = gt_fieldcat[]
it_outtab = output_data.
11) What will the sequence to declare data in a program?
Ans : TYPES: BEGIN OF TY_CHARDATA,
NAME TYPE CHAR32,
ENDOF TY_CHARDATA.
DATA: LT_CHARDATA TYPE TABLE OF TY_CHARDATA Internal Table without header line
WA_CHARDATA LIKE LINE OF LT_CHARDATA Workarea for lt_chardata.

PARAMETERS: NAME TYPE LT_CHARDATA.


12 ) In which event, will you write the code to perform an authority-check?
Ans : AT SELECTION-SCREEN.
Check for the authority.
AUTHORITY-CHECK OBJECT XXX .
IF SY-SUBRC <> 0.
MESSAGE TYPE E.
ENDIF.
13)You want to make user to reenter the field value if entered wrong how u do
E message or W messag in at selection screen event or PAI EVENT
14) What are the various options to make sql query to fetch the results faster?
Ans:
a. Use Buffering while creating the table. (To be maintained in the technical se
tting of the table creation . But this option should be used, if the query retri
eves the same set of data and the table is mainly used for read access.
b. Create an index to the table, based on the fields being retrieved.
15) Which of the following are valid Web Dynpro of controller.
1. Window Controller
2 .Component Controller
3. View Controller
4. Custom Controller
5. Configuration Controller
Ans: All the above are correct.
16)Which of the following uses gui interface
a) webdynpro -FALSE
B) bsp -FALSE
c) selection screen
TRUE
d) alv TRUE
i think i got this question wrong.am not sure about ans
17)Which of following are true about the Windows and Views for Web Dynpro ABAP?
There are two correct answers
a. A Window can be embedded in multiple views.
b. Multiple views can be embedded into single window .
c. Single view can be embedded in Multiple views.
d. Multiple window can be embedded in single view.
Ans : b and c.
18)Which of the following statements are true about Unicode?
All of the below are correct.
a. It doesnot translates
b. It support users of different culture
c . Easy to send date from unicdoe to non Unicode sys or vice versa
19)value table is defined in
domain
20) How to display documentation/F1 help for a element placed on a screen painte
r
a. If you place a field on the screen in the Screen Painter by copying a ABAP D
ictionary field, the corresponding data element documentation from the ABAP Dict
ionary is automatically displayed when the user chooses field help (as long as t
he help has not been overridden in the screen flow logic)
b. The text appearing in the field help for a field comes from the data element.

21)There is a scenario to create two tables, the first table containing all the
material data then the other table containing all the material descriptions. A r
estriction has to be placed such that the second table should have only the mate
rial numbers present in the first table. How to achieve this functionality ?
Ans : The second table field should have a foreign key, pointing to the one in
the first table.
22) What are the possiblities using Append Structure to modify a standard table
definition ?
a. An append structure is a structure which is assigned to exactly one table. Th
ere can be several append structures for a table.
b. If a long field (data type LCHR or LRAW) occurs in a table, it cannot be exte
nded with append structures. This is because such long fields must always be in
the last position of the field list, i.e. they
must be the last field of the
table.
c. If you as a customer add an append structure to an SAP table, the fields in t
his append structure should be in the customer namespace for fields, that is the
y should begin with YY or ZZ. This
prevents name collisions with new fields
inserted in the standard table by SAP.
d. No append structures may be created for pooled and cluster tables.