You are on page 1of 14

WEB DYNPRO QUESTIONS

1) What are the Types of ABAP UI Technologies?


Ans: Webdynpro for ABAP, BSP
2) What are the MVC Architecture Concepts and usage of the same in ABAP Webdynpro
programming?
Ans: As per the MVC Architecture there is a clear separation between flow logic, view and the
Business Logic.
View holds all the UI elements that are visible in the UI, Controllers have the flow logic.
Controllers are of different kind (Component Controller, View Controller, and Window Controller).
Business logic is held in the Model which is in the form of Assistance class in webdynpro context.
3) Tell me what is the Difference Between the View Container and the Transparent? Container
Ans: View Container holds the views, there can be multiple views assigned to the view container but
only one view can be active (viewed) at a time.
Transparent holds the webdynpro UI elements, A layout type can be associated with it.
4) What does a Model Class Consists?
Ans: Model Class is the Assistance class in webdynpro.
It contains the Business logic in the form of methods, Global data & Constants in the form of Class
Attributes.
The Model class can be accessed in webdynpro component using the attribute wd_assist
Note: All the visibility properties of the Class are applicable when accessing the class using the object
wd_assist.
5) What is an Assistance Class and How it is instantiated in Webdynpro?
Ans: Assistance Class is the model class which would act as the data provider for the webdynpro
component and it is instantiated by the webdynpro component during the run time and no explicit
instantiation is required.
6) What are the Design Patterns in Webdynpro ABAP?
(GAF, OIF, QAF Etc)Refer to the link:
FPM Concepts in Webdynpro
7) How do you debug an web based Application (It Could be from ABAP Webdynpro, BSP or
CRM Web UI)?
Ans: External break-points should be used to debug web UI's.
8) How do you create a ALV Report/Editable ALV in Webdynpro?
Ans:
->Add the Standard ALV component to the web dynpro Component.
->Use Components tab: Ex: ALV_MATS type SLV_WD_TABLE
->Create a context node with the table field information to be displayed
->Write the ALV Default Code for table display
->Set the read only attribute to false to switch to editable mode using the method set_read_only of
the interface IF_SALV_WD_TABLE_SETTINGS implementing class CL_SALV_WD_CONFIG_TABLE).
9) Explain how do you navigate between Views in Webdynpro?
Ans: Navigation between Views is through Plugs (Inbound and Outbound),
9) What is the usage of Plugs in Webdynpro ABAP?
Ans: Plugs are used to Navigate between the views.
Parameters can be passed using the plugs similar to interface parameters of function module or a
class method.
10) Describe usage of Webdynpro Component Controller?
Ans: Component controller is used to the store the Global attributes and Methods of the
component.
Attributes/methods declared in the component controller are visible throughout the component and
they are accessed using the attribute wd_comp_controller outside of component controller (like
views,windows etc).
All the context nodes defined in the component controller are visible in all the views and windows of
the component.
Ex: if a variable called gv_count is defined in the component controller, it can be accessed in the
view using the syntax wd_comp_controller->gv_count.
11) How do you access a Context Nodes and Elements programmatically, Code required for
accessing the Context Nodes can be written using the webdynpro code wizard.
For Ex:
if there exists a Node Node1 with cardinality 1:1 and has 3 Attributes to it Att1, Att2,Att3.
The attributes can be accessed using the below code.
data: lo_nd_node1 type ref to if_wd_context_node.
data: lo_el_node1 type ref to if_wd_context_element.
data: ls_node1 type wd_this->element_node1.lo_nd_node1 = wd_context ->get_child_node( name
= wd_this->wdctx_node1 ).lo_el_node1 = lo_nd_node1 ->get_element( ).**Read Node1lo_el_node1
->get_static_attributes(importingstatic_attributes = ls_node1 ).
**Write to Node1lo_el_node1->set_static_attributes(exportingstatic_attributes = ls_node1 ).
12) Message Areas in Webdynpro Message areas are created in views to display messages
(Error, Success, Warning, and Info).
WD allows having multiple Message errors in a view but throws an error when the view is displayed.
Use the code wizard to get code for raising error messages.
Few of the message classes and methods are: Interface: if_wd_message_manager.methods:
report_t100_message.(used to report message from the message class)
13) What is the concept of OTR (Online Text Repository) and its Usage?
OTR's are similar to text elements in ABAP.
OTR's are created for UI texts and texts can be maintained in multiple language.
OTR's can be created using the transaction: SOTR_EDIT
14) What is the concept of Interface Views?
If the views of a different components are need to be used in a webdynpro component mark the
view as interface view and use it in another component.
It's similar to using a, include in a program.
An Interface view of the component can be used in any number of components. This concept
supports the re usability of the views.
15) Explain the Sequence of Webdynpro?
Events:
Ex:
WDDOINIT,
WDMODIFYVIEW,
WDAFTERACTION,
WDBEFOREACTION etc
Sequence:
WDDOINIT of the component controller,
WDDOINIT of the Window Controller,
WDDOINIT of the View Controller,
WDMODIFYVIEW (On Input/Display on any UI Element).
WDBEFOREACTION (Method for validation of user input, Once the user action happens on the UI)
WDAFTERACTION (Method for non-action specific operations before Navigation)
WDDOEXIT (Exit from the View/Window/Component Controller)
WDPOSTPROCESSING (used to perform exception handling for supply function methods)

16) Can a Component have Multiple Applications?
Yes, for a given webdynpro component any number of applications can be created.
Applications are similar to transactions in SAP.
You can associate different Interface views of the component to create different applications using
the same component.
18) How do you launch a Webdynpro Application from a Transaction?
19) How do you Navigate between two Webdynpro Components?
You can use Interface views to navigate between components or create a navigation class and do a
explicit call.
20)Explain how do you create a tree in Webdynpro?
Tree UI element is used to create Tree in Webdynpro.
Tree can be defined as part of the table column.
21)What is the usage of Exit Plug in a Webdynpro?
Window Exit plugs are outbound plugs used to close the webdynpro application.
They can be called from the view, which are embedded in the window Note: Exit plugs
won't work in portal environment.
Exit plugs can also be used to pass the call to another URL. Here is the sample code
snippet of the exit plug call:
method onexit .
data url type string.data close_window type wdy_boolean.url = 'url_name'.
close_window = abap_false.
wd_this->fire_to_exit_plg( url = urlclose_window = close_window ).
endmethod.

22) Why FQDN? What is the necessary of FQDN?
FQDN (Frequently Qualified Domain Name) is necessary for running
webdynpro Applications

23)What is the standard ALV Component required creating ALV Reports in Webydnpro?
SALV_WD_TABLE
24) How do you build Select Options in Webdynpro?
Using the standard webdynpro component WDR_SELECT_OPTIONS
You can refer to the example
WDR_TEST_SELECT_OPTIONS
25) How do you build F4 Search Help in Webdynpro?
A F4 help for an input field can be made available by attaching the search help to the
table field.
Usage of standard help component WDR_OVR.Creating a component for help and
attaching it to the node element as freely programmed value help

26) Explain how are Plugs (Inbound/Outbound) bounded in the Window?
Plugs are created in the view and bounded in the window by using the drag drop option
in the window view.
27) How do you Control the visibility of the Webdynpro UI elements programmatically?
Create a context element of type wdui_visibility and bind to the visibility property of the
UI element.
28) What is the use of Interface views/nodes in Webdynpro?
Interfaces nodes and views are created to use them in other webdynpro components.
29) How do you navigate between different Webdynpro applications?
create a navigation class and trigger the target application to be called.

30) What are the webdynpro init events and what is the sequence of trigger Sequence?
WDDOINIT of the component controller,
WDDOINIT of the Window Controller,
WDDOINIT of the View Controller.

31) How the Error messages created and handled in webdynpro?
Create a message UI element in the view and trigger the message required (Error,
warning, status) using the code generation wizard.

32) What is an OTR and mention its usage in Webdynpro?
Online Text Repository is the central storage for texts for webdynpro applications.
An OTR can be fetched in the program using the below mentioned code.
data: lv_string type string.lv_string = cl_wd_utilities=>get_otr_text_by_alias( alias =
'PACKAGE/OTR_NAME' ).
33) Can text elements be used in webdynpro? If yes how?
Yes text elements can be used in webdynpro.Refer to the below code snippet.
data: lv_string type string.lv_string = wd_assist->
if_wd_component_assistance~get_text( '025' ).
34) What is the use of Road Map UI element?
Roadmap UI element is used to display step-by-step work flows.It can used to clearly define a
process.
35) What are exit plugs? How are they created?
Exit plugs are used to exit from the webdynpro page or a webdynpro window.Exit plugs
are created in the window.
36) Is it possible to hide F4 function for an Input element programmatically?
Yes it is possible to hide F4 function attached to an input field.
Use the interfaceif_wd_context_node_info and the method
set_attribute_value_help


40) Explain the concept of OVS and its usage?
WDR_OVS is the standard webdynpro component to generate F4 helps for the input field. OVS
refers to Object value selector.
41) How can you use Radio Buttons/Checkboxes/Dropdown lists in webdynpro?
Radio buttons/Checkboxes are used for objective selection similar to what is available in SAPGUI.
An event is associated with each UI element for on click action.
42) Explain FPM concept and its usage in webdynpro?
->>>>Refer to the link
43) What is internationalization? What is the use of it in webdynpro abap application?
Internalization refers to creation of texts used in webdynpro application in a specific language and
providing option to translate to multiple languages if necessary.
This is achieved by using OTR's or text elements for static texts and performing translation when
required.
44) What is Cardinality of a context node in webdynpro?
Cardinality refers to number of elements a node can accommodate during run time.
When a node is created the cardinality is assigned to it. Cardinality is of the following kinds:
0:1 --> At run time, no element or maximum one element can be instantiated
0:n --> At run time, no element or maximum of n elements can be instantiated
1:n --> At run time, minimum one element or maximum of n elements can be instantiated
1:1 --> At run time, only one element should always be instantiated if you try violating the cardinality
there would be a short dump saying Number of elements of the collection of node node_name
violates the cardinality
45) What is Personalization in abap webdynpro application?
Personalization refers to changing the properties of UI elements at runtime.
Personalization settings are user specific. Configuration controller is used for personalization
function.
ex: Changing the order of columns in a table display.
46) What are the controller types in webdynpro ABAP?
-Component Controller
->Component Controller is global part of the component and each component has only one
component controller.
Global Attributes and methods required by the component can be defined here.
-Custom Controllers
->Custom controllers are defined during design time and these are optional.
The visibility Custom controllers are in the entire component and have the life time equal to life time
of the component.
Custom controllers are used if a set of views have to be grouped to perform special function or hold
a set of data.
-View Controller
->Flow logic of the views is in view controller and a view can have only one view controller.
The visibility of View controller is specific to view only.
-Configuration Controller
->Configuration controller is used achieve personalization function.
-Window Controller
->A window controller exists for each window and can also have methods to write coding
10/14/2014 Web Dynpro ABAP Interview Questions Answers
http://www.sapabapiq.com/2013/07/webdynpro-abap-real-time-interview.html 4/8
logic.
Every window will have the default method and it is used to receive parameters.
The windows controllers are visible in entire component and also in the custom controller.
47) What are Layout types in Webdynpro and its usage?
->Flow Layout:
Used for sequential display of WD UI elements.
->Row Layout:
here each UI element is displayed on its own column and the width differs from row to row. Row
head data is used to insert a break.
->Grid Layout:
UI elements are arranged based the no of columns. line breaks are inserted based on the size.
->Matrix Layout:
Matrix layout arranges UI elements in columns. Matrix head data is used to insert a line break.
Usage of the appropriate layout to build a webdynpro application is determined during the UI
design.
48) What is supply function method in SAP Webdynpro?
->Supply function method is used to populate the context node or to default values to the context
node elements.
Supply function method is called before the node is accessed for first read.
->Using supply function method is optional
49) What is singleton property of context node?
->Singleton property is one of the attributes of the context node if this is set there can be only one
instance of the respective context node at runtime.
50) How to default a value to the context attribute?
In the context attribute there is a property to set the default value.
10/14/2014 Web Dynpro ABAP Interview Questions Answers
http://www.sapabapiq.com/2013/07/webdynpro-abap-real-time-interview.html 5/8
Use the same; however the default value can be overwritten using the set_attribute method of the
interfaceif_wd_context_element.
51) Is it possible to pass parameters to webdynpro URL?
Yes you can pass parameters to webdynpro URL and it is passed as below.
For ex: your url is
http://server.com/wd_url_name?sap-system-login-basic_auth=X&sap-client=800&sap- language=E
Here the parameter values are passed for
sap-system-login-basic_auth,
sap-client and sap-language.
52).What is the difference between narrowing cast and widening cast?
If we copy an instance of sub class to super class it is called narrowing cast and the vise versa of it is
widening cast.
53).Is model used in Webdynpro ABAP?
The webdynpro ABAP Graphical tool set doesnt give any option to create model.
We can define a class in transaction SE24and the instance of that class can be used as model within
the Wedbynpro code.
54). What are the different ways of getting data from a table and pass it to Webdynpro context
node?
Ans.
a. select the data to an internal table and pass it to the node using bind table method
b. use a model class instance to get data
c. use the service call option provided by webdynpro framework
55). What is the Service call option in Webdynpro ABAP?
Webdynpro ABAP Graphical toolset gives a wizard which automatically generates the code for calling
a BAPI or Web service.
This wizard will create a custom controller which has context nodes or attributes similar to the
parameters of BAPI and a method which calls the BAPI and pass the value to the context.
We only need to use this custom controller within another controller, map the context
and call the method.
56).What is an Application?
An application forms as the link between a component and URL.
57).What is a faceless component?
Faceless components are webdynpro components without window or view
58). In case of a component used within a component, how does parent component communicate to
child component?
Parent component communicate with the child component through Interface controller and
Interface view of the child component.
59). Interface View of a component has 1:1 relationship with what?
The window of the component
60).What are the actions in a view controller?
The methods that can be linked to the UI elements of a view are called actions.
61).What is role of plugs in views?
Plugs in views help the navigation between views. Navigation happens through the link created
between outbound plug of a view to the inbound plug of next view.


Webdynpro Interview Questions


1) Types of ABAP UI Technologies
Ans: Webdynpro for ABAP, BSP


2) MVC Architecture Concepts and usage of the same in ABAP Webdynpro Ans: As per the MVC
Architecture there is a clear separation between flow logic,
view and the Business Logic. View holds all the UI elements that are visible
in the UI, Controllers have the flow logic. Controllers are of different kind
(Component Controller, View Conroller,Window Controller).
Business logic is held in the Model which is in the form of Assistance class
in webdynpro context.


3) Difference Between the View Container and the Transparent Container
Ans: View Container holds the views, there can be multiple views assigned to the
view container but only one view can be active(viewed) at a time.
Transparent holds the webdynpro UI elements, A layout type can be
associated with it.


4) What does a Model Class Consists of
Ans: Model Class is the Assitance class in webdynpro. It contains the Business
Logic in the form of methods, Global data & Constants in the form of
Class Attributes. The Model class can be accessed in webdynpro component
using the attribute wd_assist->. Note: All the visibility properties of the
Class are applicable when accessing the class using the object wd_assist.


5) What is an Assistance Class and How is it Instantiated in Webdynpro
Ans: Assistance Class is the model class which would act as the data provider
for the webdynpro component and it is instantiated by the webdynpro
component during the run time and no explicat instantation is required.


6) Design Patterns in Webdynpro(GAF,OIF,QAF Etc)
Refer to the link:
FPM Concepts in Webdynpro


7) How do you debug an web based Application
(Could be from ABAP Webdynpro, BSP or CRM Web UI)
Ans: External break-points should be used to debug web UI's.


8) How do you create a ALV Report/Editable ALV in Webdynpro
Ans: ->Add the Standard ALV component to the web dynpro Component.
->Use Components tab: Ex: ALV_MATS type SLV_WD_TABLE
->Create a context node with the table field information to be displayed
->Write the ALV Default Code for table display
->Set the read only attribute to false to switch to editable mode using
the method set_read_only of the interface
IF_SALV_WD_TABLE_SETTINGS implementing class
CL_SALV_WD_CONFIG_TABLE).



9) How do you Navigate between Views in Webdynpro
Ans: Navigation between Views is through Plugs(Inbound and Outbound),


10) Usage of Plugs in Webdynpro
Ans: Plugs are used to Navigate between the views. Parameters can be
passed using the plugs similar to interface parameters of function module
or a class method.


11) Usage of Webdynpro Component Controller
Ans: Component controller is used to the store the Global attributes and
Methods of the component. Attributes/methods declared in the component
controller are visible through out the component and they are accessed
using the attribute wd_comp_controller outside of component
controller(like views,windows etc)
All the context nodes defined in the component controller are
visible in all the views and windows of the component.
Ex: if a variable called gv_count is defined in the component controller,
it can be accessed in the view using the syntax
wd_comp_controller->gv_count.


12) How do you access a Context Nodes and elements Programmatically
Code required for accessing the Context Nodes can be written using
the webdynpro code wizard.
For Ex: if there exists a Node Node1 with cardinality 1:1 and has
3 Attributes to it Att1, Att2,Att3. The attributes can be accessed
using the below code.

data: lo_nd_node1 type ref to if_wd_context_node.
data: lo_el_node1 type ref to if_wd_context_element.
data: ls_node1 type wd_this->element_node1.

lo_nd_node1 = wd_context->get_child_node
( name = wd_this->wdctx_node1 ).
lo_el_node1 = lo_nd_node1->get_element( ).

**Read Node1
lo_el_node1->get_static_attributes(
importing
static_attributes = ls_node1 ).

**Write to Node1
lo_el_node1->set_static_attributes(

exporting

static_attributes = ls_node1 ).


13) Message Areas in Webdynpro
Message areas are created in views to display messages
(Error,Success,Warning,Info).
WD allows to have multiple Message errors in a view but throws an
error when the view is displayed.
Use the code wizard to get code for raising error messages.
Few of the message classes and methods are:
Interface: if_wd_message_manager.
methods: report_t100_message.(used to report message from the
message class)


14) Concept of OTR(Online Text Repository) and its Usage
OTR's are similar to text elements in ABAP. OTR's are created for
UI texts and texts can be maintained in multiple language.
OTR's can be created using the transaction: SOTR_EDIT


15) Concept of Interface Views
If the views of a different components are need to be used in a
webdynpro component mark the view as interface view and use it in
another component. It's similar to using a include in a program.
A Interface view of the component can be used in any no of components.
this concept supports the reusuability of the views.


16) Sequence of Webdynpro Events:
Ex: WDDOINIT,WDMODIFYVIEW,WDAFTERACTION,
WDBEFOREACTION etc
Sequence: WDDOINIT of the component controller,
WDDOINIT of the Window Controller,
WDDOINIT of the View Controller,
WDMODIFYVIEW(On Input/Display on any UI Element).
WDBEFOREACTION(Method for validation of user input,
Once the user action happens on the UI)
WDAFTERACTION(Method for non-action specific operations
before Navigation)
WDDOEXIT( Exit from the View/Window/Component Controller)


17) Can a Component have Multiple Applications
Yes, For a given webdynpro component any no of applications can be
created. Applications are similar to transactions in SAP.
You can associate different Interface views of the component to
create different applications using the same component.

19) How do you Navigate between two Webdynpro Components
You can use Interface views to navigate between components or create a navigation class and
do a explicit call.


20) Creating a tree in Webdynpro
Tree UI element is used to create Tree in Webdynpro.
Tree can be defined as part of the table column.


21) Usage of Exit Plug in a Webdynpro Window
Exit plugs are outbound plugs used to close the webdynpro application.
they can be called from the view which are embedded in the window
Note: Exit plugs won't work in portal environment.
Exit plugs can also be used to pass the call to another URL.
Here is the sample code snippet of the exit plug call:
method onexit .

data url type string.
data close_window type wdy_boolean.
url = 'url_name'.
close_window = abap_false.
wd_this->fire_to_exit_plg( url = url
close_window = close_window ).
endmethod.

You might also like