Sie sind auf Seite 1von 8

Webdynpro Abap

1. MVC Architecture Concepts and usage of the same in ABAP Webdynpro 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. 2. What does a Model Class Consists of? 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. 3. What is an Assistance Class and How is it Instantiated in Webdynpro 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. 4. Design Patterns in Webdynpro (GAF, OIF, QAF Etc.) Guided Activity Floorplan (GAF) ----A design template that dictates the structure and behaviour of a user interface of a guided activity. You can use a Floorplan to model an application interface that guides the user through an activity step-by-step. The activity is one that is generally very complex and not carried out by the user on a regular basis but can, however, be divided into logical steps (for example, creating an employee or conducting a change of employees). Quick Activity Floorplan (QAF) ---- A design template that dictates the structure and behaviour of a user interface of a quick activity. You can use this Floorplan to model an application interface allowing the user to create, delete, display, and change the attributes and

associations of business objects. For quick activities, only the fields of a business object are shown that generally suffice for creating an object instance. 5. How do you create a ALV Report/Editable ALV in Webdynpro ->Add the Standard ALV component to the webdynpro 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). 6. Usage of Webdynpro Component Controller 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. 7. Message Areas in Webdynpro Message areas are created in views to display messages (Error, Success, Warning, and 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)

8. 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 9. 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 reusability of the views.

10.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) 11. 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. 12.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.

13.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. 14.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.

15.Standard ALV Component required to create ALV Reports in Webydnpro SALV_WD_TABLE 16.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 17.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

18.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. 19. What is the use of Interface views/nodes in Webdynpro? Interfaces nodes and views are created to use them in other webdynpro components. 20. How do you navigate between different Webdynpro applications Create a navigation class and trigger the target application to be called. 21. 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, 22.How are 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 23.What is the use of Road Map UI element Roadmap UI element is used to display step-by-step workflows. It can used to clearly define a process. 24.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 interface if_wd_context_node_info and the method set_attribute_value_help 25. How do Webdynpro Upload and download functions work, explain. Fileupload UI element is used upload files from desktop the application. There is also restriction on the max data volumes that can be uploaded. Filedownload UI element is used to download files to the client. 26.Explain the concept of Road Map UI element in Webdynpro. The RoadMap UI element displays the steps followed in a wizard. Each step is represented by a separate RoadMapStep Object or MultipleRoadMapStep. You can use various symbols to mark the start points and the end points of this UI element. If you assign the value more to the property startPointDesign or endPointDesign, this indicates to the user that there are other steps before the first visible step, or after the last visible step.

The RoadMap UI element is used to display step by step workflows. This enables an application development team to display small steps of a clearly defined work process. 27. How to create popups in webdynpro. Create a view and embed the view in the window and call the window to trigger the popup. 28. 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. 29. Using Radio Buttons/Checkboxes/Dropdown lists in webdynpro Radio buttons/Checkboxes are used for objective selection similar to what is available in SAP GUI. An event is associated with each UI element for onclick action. 30.What is internationalization 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. 31. What is Cardinality of a context node in webdynpro Cardinality refers to no 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

32. 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. 33.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. Rowheaddata 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. Matrixheaddata is used to insert a line break. Usage of the appropriate layout to build a webdynpro application is determined during the UI design. 34. what is supply function method in SAP ->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 35.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. 36.How to default a value to the context attribute In the context attribute there is a property to set the default value. Use the same, however the default value can be overwritten using the set_attribute method of the interface if_wd_context_element. 37.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-systemlogin-basic_auth=X&sap-client=800&sap-language=E

Here the parameter values are passed for sap-system-loginbasic_auth,sap-client and sap-language.

Das könnte Ihnen auch gefallen