Sie sind auf Seite 1von 7

Question 1: What is Component Controller?

Component Controller is the King of all Controllers. It is the backbone of your Web Dypro
Component . It is like a Global or Top Include for you program . It controls the entire activity of your
Web Dynpro Component.
Question 2: What is an Interface Controller?
Whenever we want views , nodes or methods of a particular web dynpro component to be available to
other the outside world ( i.e. other webdynpro components) , we make use of Interface controller .
Interface Controller is created by default when a webdynpro component is created.
Interface Controller would generally come into picture when you are doing component usage of some
sort in web dynpro i.e. re-using views/methods/nodes of one WD component in another.
Question 3: What is a Custom Controller?
When your Component Controller grows big in size ( say more than 10-15 views and corresponding
context nodes , methods , events , event handlers etc) , it might become tough to handle everything in
the Component Controller . In such a scenario , you can create one or more custom controllers and
modularize or segregate the logic into separate parts using Custom Controller.
Question 4: Would you prefer creating multiple Custom Controllers OR would you go for separate Web
Dynpro components and then do Component usage.
This would actually depend on the requirement , but ideally separate Web dynpro components should
be created and reused.One can also use the assistance class for segregating business logic.
Question 5: How many component controllers can a Web Dynpro Component have ?
Component Controller is only one . You can create multiple controllers , but those are called Custom
Controllers.
Note: If you are asked about the Web Dynpro architecture , you should talk about both the MVC
framework and the controllers.
Question 6: When do views become available in the interface Controller ?
Whenever we embed any view in a window , at the moment that view becomes automatically available
to the Interface Controller and shows up as an interface view in the Interface Controller. You do not
have to declare a view as an interface view as is the case with interface nodes.
Question 7: Is it true that each controller has its own Context node ?
Yes , Each controller has its own context , methods , and Events.
Question 8: At design time how do you decide whether to declare a node in the Component Controller
or in the View Controller?
This again depends on the requirement: If the node is going to be accessed in multiple views , it should
be declared at the Component Controller level . However , If the node is absolutely specific to only one
view , it can be defined in the View Controller. As the size of Webdynpro development grows , it starts
becoming complex and the need to define attributes,nodes,methods etc. at the Component Controller
increases.
Question 9: What is Cardinality of a context node?
Cardinality simply indicates the minimum and the maximum no. of entries the node can have.
The 4 cardinalities are 0:1, 0:n, 1:1, and 1:n .

Question 10: Is there any relation between Cardinality and Lead selection?
Yes , If the cardinality is set to 0:1 or 1:1 , the user cannot select multiple records on the view.
So if you want the user to be able to select multiple records on the screen , the cardinality of that
particular node must be set to 0:n or 1:n.
Question11: Some important Web Dynpro attributes that you should know:
Some attribute in webdynpro that are used very frequently and some of those that you must know are :
Wd_this
Wd_context
Each controller has the above two mentioned attributes.
To elaborate, if you are using the above two attributes say in a method of a View Controller, then
WD_CONTEXT is the reference to the Context node of the View and WD_THIS is the reference to the
View Controller itself.
Wd_comp_controller is the reference to the Component Controller. View and Window controller have
this attribute defined by default and methods/attributes of the Component Controller can be accessed by
using this attribute.
For example:
Wd_assist: This attribute is created when the assistance class is saved and activated for a web dynpro
component. All the methods of the assistance class can be accesses by using this attribute.
Question 12: Can you use multiple layouts in one view?
Layouts can be assigned at the container level. For example, you define the layout for your view at the
ROOTUIELEMENT container level.
So if at all you want to use multiple layouts in one view, you can create multiple transparent containers
and assign different layouts to them.
Question 13: How do you introduce line break for a UI element in any layout?
Say if you are using matrix layout, you will say Matrix Head data for the UI element for which you
need a line break.
Question 14:Can you call/launch one web dynpro application from another webdynpro application?
Yes, you can launch one webdynpro application from another webdynpro application.
First, you should get the URL of the web dynpro component that you want to launch and second, call
that URL in an external window.
To get the URL of any web Dynpro component, you use the FM
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = ZDEMO
IMPORTING
out_absolute_url = str.
Once you get the URL in str, you can call this web dynpro using str and fm:
create_external_window.

Question 14: Can you run a Webdynpro Application in background?


This is a tricky question. It doesnt make sense to run a webdynpro application in background because
in that case you are beating the purpose of the MVC controller architecture for webdynpro. However,
you can build logic to create background jobs from a Web Dynpro Application.
Question 15: What is the Web Dynpro Phase model?
Whenever a roundtrip occurs from the client (browser) to the server, a sequence of processing steps is
executed. This sequence of processing steps in web Dynpro is called the Phase Model.
Executing all the tasks in the phase model is the responsibility of the Web Dynpro framework.
Each step is executed only once and errors if any are captured.
Question 16: How will you delete selected rows in a Table / ALV?
Get the Table / ALV data in an internal table.
Delete the row selected by the user from the internal table.
Re-bind the internal table to the node bound to the Table/ALV.

LAYOUTS:
Form is latest with enhancement(out of 5 form included)
Flow layout:
Flow layout is default
Left to right
If we do not SET the property WRAPPING
The TEXT WILL NOT WRAP and The scroll-bar will appear at the bottom of the explorer window.
Else as shown below the text will get WRAPPED and NO scroll-bar will appear

WRAPPING Property exists for each UI element individually. In the above screenshot the SECOND
ELEMENT has wrapped if we uncheck the checkbox for second UI element the individual elements
will not wrap.

ROW Layout
Row Beginning with element set as ROWHEADDATA, followed by elements set as ROWDATA

Matrix Layout
Row Beginning with element set as MATRIXHEADDATA, followed by elements set as
MATRIXDATA
Matrix is similar to ROW but with vertical data alignment added. Properties like COLSPAN

Working with the Assistance Class


For each Web Dynpro component, you can create a uniquely assigned assistance class. This class
should inherit from the abstract class CL_WD_COMPONENT_ASSISTANCE

Demo Applications in Package SWDP_DEMO

Das könnte Ihnen auch gefallen