SAP Webdynpro ABAP Interview questions 1. What is the difference between narrowing cast and widening cast? If we copy an instance of sub class to super class its called narrowing cast and the vise versa of it is widening cast. 2. Is model used in Webdynpro ABAP? The webdynpro ABAP Graphical tool set doesn’t give any option to create model. We can define a class in transaction SE24 and the instance of that class can be used as model within the Wedbynpro code. 3. What are the different ways of getting data from a table and pass it to Webdynpro context node? 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 4. 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. 5. What is an Application? An application forms as the link between a component and URL. 6. What is a faceless component? Faceless components are webdynpro components without window or view 7. 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. 8. Interface View of a component has 1:1 relationship with ..? The window of the component 9. What are actions in a view controller? The methods that can be linked to the UI elements of a view are called actions. 10. What is role of plugs in views?
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
SAP Webdynpro ABAP Interview questions
1. What is the difference between narrowing cast and widening cast?
If we copy an instance of sub class to super class its called narrowing cast and the vise versa of it is widening cast.
2. Is model used in Webdynpro ABAP?
The webdynpro ABAP Graphical tool set doesn’t give any option to create model. We can define a class in transaction SE24
and the instance of that class can be used as model within the Wedbynpro code.
3. What are the different ways of getting data from a table and pass it to Webdynpro context node?
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
4. 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.
5. What is an Application?
An application forms as the link between a component and URL.
6. What is a faceless component?
Faceless components are webdynpro components without window or view
7. 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.
8. Interface View of a component has 1:1 relationship with ..?
The window of the component
9. What are actions in a view controller?
The methods that can be linked to the UI elements of a view are called actions.
10. What is role of plugs in views?
Plugs in views help the navigation between views. Navigation happens through the linkcreated between outbound plug of a
view to the inbound plug of next view.
SAP Webdynpro JAVA Interview questions
1. Webdynpro framework is based on which design pattern?
MVC design pattern.
2. What is a component?
A component is the unit of project which contains the actual functionality and it can be reused
3. What is a model?
A model is any layer of code that encapsulates some business functionality external to the
Web Dyn-pro environment.
4. What is the difference between component controller and view controller?
Component controller is the main controller of the entire component and it’s a global controller. View controller is the
controller associated with a view.
5. Which all are the global controllers
Component controller and custom controller
6. What does the component interface contains?
The Web Dynpro component interface consists of two parts: a visual one and a programmatic one, and defines the set of
publicly accessible entry points to the component. Visual part is interface view which corresponds to a window in component
and the programmatic part is Interface controller.
7. What is a context?
All controllers, whether view controllers, custom controllers or component controllers, have a dynamic data storage area
known as a context. Context contains nodes and attributes where data is stored
8. What is cardinality of a node?
Cardinality represents the number of elements a node has at the start of the applicationand maximum number of elements it
could have during its life time
9. What is a singleton node?
Singleton nodes are represented by a single node instance, whose content – that is, its node collection - changes each time
the lead selection of the parent node changes.
10. What is the purpose of supply function in a node?
Supply Function is used to populate the values in a node on demand. The supply function is called by the runtime when the
data of the context node is used. This is the case when a UI element is to be displayed for the first time with the data of the
corresponding context
Difference between Webdynpro ABAP and Webdynpro JAVA
Webdynpro for ABAP and Webdynpro JAVA use the same declarative metamodel concept based on MVC pattern
to create web applications. Everything about Webdynpro ABAP is same as Webdynpro JAVA, except that it uses ABAP as
programming language instead of JAVA. It also has a graphical interface tool that is integrated with the ABAP Workbench
(Transaction Se80). Both Webdynpro ABAP and Webdynpro JAVA applications are run in the Enterprise Portal.
What is the difference between Webdynpro JAVA and Webdynpro ABAP?
The main difference between Webdynpro JAVA and Webdynpro ABAP is that Modeldoesn’t have much significance in
Webdynpro ABAP. In fact there is no option formodel available in the Graphical tool set to develop Webdynpro ABAP
application. But we still have the option of defining an ABAP class which helps to read data and save data back to table. The
instance of this class should be used as model within the component and this is the proper design. Webdynpro ABAP gives
new option called Service Call. In Service Call a wizard creates a custom controller based on the BAPI or Web Service that
we give. Context of this controller will be generated based on the import – export parameters of BAPI or Web Service. The
wizard will also automaticallycreate methods in the controller to execute the BAPI or Web service and pass the data to
Context. This Custom controller can be used within other controllers to read and update data.
Other main difference in Webdynpro ABAP is that code is stored centrally in the ABAP server, so it relieves the load from
developer’s client machine where code is stored in the case of Webdynpro JAVA. Webdynpro ABAP has much more
powerful Version control system than Webdynpro JAVA as the code is stored centrally in the server. In webdynpro JAVA as
each developer is checking out and checking in the code, there are chances of conflicts. Webdynpro ABAP uses the same
Transport Management system as R/3, so there is no need to maintain parallel Transport Management system which is the
case in Webdynpro JAVA. Webdynpro JAVA runs on sun’s proven web server (J2EE engine) which can support large
number of web users at a time. But the ABAP server is yet to prove its credential as a reliable Web Server. So if the number
of users are large, its better to go for Webdynpro JAVA and if the number is medium or manageable, you can go for
Webdynpro for ABAP. Performance and scalability should be the major criteria while choosing between Webdynpro JAVA
and Webdynpro ABAP.
How to create a three level tree node in Webdynpro ABAP
The purpose of this example is to create a three level tree node in Webdynpro ABAP. First level will be all distinct Carrier
ids. Under carrier id there will be Connection id as second level. And under Connection id there will be Plane types as third
level.
1. Create a Webdynpro component with one view
2. Create a Node FLIGHT with cardinality 1:1. Create sub node CARRID_NODE within FLIGHT, sub node CONNID_NODE
within CARRID_NODE and sub node PLANETYPE_NODE within CONNID_NODE. All the sub nodes should be non
singleton and should have cardinality 0:n. Create attribute CARRID type SFLIGHT-CARRID, CONNID type SFLIGHT-
CONNID and PLANETYPE type SFLIGHT-PLANETYPE within CARRID_NODE, CONNID_NODE and PLANETYPE_NODE