Thursday, August 1, 2013

Webdynpro ABAP Controller Methods Attributes

SAP Webdynpro ABAP Controller Methods and Attributes, Methods and Attributes are available for all webdynpro abap controllers. These methods are Hook Methods, Instance Methods, and Attributes. Refer this post for more details on  Webdynpro ABAP Controller Methods and Attributes. Click on read more.



SAP Webdynpro ABAP Controller Methods and Attributes


SAP Webdynpro ABAP Controller Methods and Attributes, Methods and Attributes are available for all webdynpro abap controllers. These methods are Hook Methods, Instance Methods, and Attributes. Refer this post for more details on  Webdynpro ABAP Controller Methods and Attributes.

Hook Methods

For all controllers, there exist methods that are called by the Web Dynpro framework in a predefined order. These are called hook methods. Depending on the controller type, there are different hook methods available.

Instance methods 


These methods are defines explicitly using the Methods tab.

Attributes 


Attributes not related to the value or property of UI elements can be declared using the Attributes tab. These attributes are then visible in all methods of this controller.

Common Controller Entities


The context root node already exists. All other nodes and attributes have to be defined statically or by source code.

Two hook methods are contained in all controller types : 

wddoinit( )


wddoexit( ) 


Two pre-defined attributes are contained in all controller types : 


WD_THIS


WD_CONTEXT



At least two hook methods are contained in all controller types. These methods are processed only once during the lifetime of a controller instance: 


when a controller instance is created (wddoinit( )) and 

when a controller instance is deleted (wddoexit( )).



Attributes not related to the value or property of UI elements can be declared using the Attributes tab. These attributes are then visible in all methods of this controller. 

There are two predefined attributes, which are used to access the functionality of the controller (WD_THIS) and of the context (WD_CONTEXT).


For information to be shared between different controllers, one controller must declare the use of another controller. 


This is done on the Properties tab of the controller that needs to access another controller. 

The most frequent requirement for this kind of data sharing is when you wish to create a mapped context node or you wish to access another controller's instance methods.


Special Entities of Component / Custom Controllers

Events

For both component and custom controllers, events can be defined with arbitrary parameters. 

Any method of any other controller (also view and window controllers) can register to these events if this method is defined as an event handler method



Additional standard hook methods  



wddobeforenavigation( )

These are processed directly before the navigation requests are processed


wddopostprocessing( )

After all views of the view assembly to be sent have been processed

A typical use of such events is the invocation of processing in a view controller after processing in the component controller has been completed.

This can be achieved when a method in the view controller subscribes to an event raised by the component controller.

Using your design time declarations, the Web Dynpro framework will automatically manage the definition, triggering, and handler subscription to such events for you. You also have the additional option of dynamic event subscription at runtime.


The component controller and only the component controller has additional standard hook methods. These are processed directly before the navigation requests are processed (wddobeforenavigation( )) and after all views of the view assembly to be sent have been processed (wddopostprocessing( )).


Attributes, methods, context elements, and events can be marked as interface elements. These elements are then exposed to other components by means of the interface controller.


Special Entities of View Controllers

Navigation plugs

 A navigation event is raised when an outbound plug is fired

Any An inbound plug is the navigation event handler that can be registered to a navigation request 


Actions

An action links a client-side event to an event handler method defined in the corresponding view controller


Special hook methods


wddobeforeaction( )

Wddobeforeaction()

wddomodifyview( )


Using the generic name <Outbound plug> for an outbound plug, its declaration will cause a method to be generated in the view.s component controller, called FIRE_<Outbound plug>_PLG. 


This method is only visible for the Web Dynpro framework; it is not visible to the developer.

An inbound plug is the navigation event handler that can be registered to a navigation request. 

Using the generic name <Inbound plug> for an inbound plug, its declaration will cause a method to be generated in the views component controller, called HANDLE<Inbound plug>. 


A static registration of an inbound plug (method HANDLE<Inbound plug>) to the navigation event raised by an outbound plug (method FIRE_<Outbound plug>_PLG) is called a navigation link. 


Navigation links are not part of a view but are defined in a window embedding the view. Thus, in different windows, the event registration can be defined differently.


When defining an action having the name <Action>, an event handler method (ONACTION<Action>) is automatically generated. 

If a view will be replaced as a result of a client event, the related outbound plug can be fired in this action event handler method.



There are two special hook methods found in view controllers


wddobeforeaction( ) is processed if a client event is fired in any view. Before the action event handler methods are processed.


wddobeforeaction() methods are executed for all views that are part of the last view assembly.


wddomodifyview( ) is a method that allows you to programmatically manipulate the layout of the view. This event can be used to define the UI dynamically.


Special Entities of Window Controllers


Each Web Dynpro window contains outbound plugs and inbound plugs, like views. You can use the plugs to set up cross-component navigation.


The window controller also has the special attribute WD_COMP_CONTROLLER, which holds the reference to the component controller.



The Window controller contains following special attributes 



WDDOONOPEN() Handling For Opening of Window


WDDOONCLOSE() Handling For Closing of Window



Each Web Dynpro window contains outbound plugs and inbound plugs, like views. You can use the plugs to set up cross-component navigation. 


To expose the plugs to the component interface, select the property Interface for each plug.


These plugs will then be part of the related interface view.


The window controller also has the special attribute WD_COMP_CONTROLLER, which holds the reference to the component controller.



"You found the information helpful and want to say thanks? Your donation is enough to inspire us to do more. Thanks a bunch!"

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Categories

ABAP (1) ABAP Interview Questions (112) ABAP Open SQL Statements (1) ABAP Syntax Rules (6) ABAP WORKBENCH (2) ABAP-Interview-Questions (52) ALE IDOC (6) ALE IDOC Interview Questions (6) ale-idoc (6) ALE-IDOC-Interview-Questions (19) ALV Interview Questions (5) ALV-Interview-Questions (22) BADI (2) BAPI (1) BAPI Interview Questions (1) BAPI-Interview-Questions (14) BDC (6) BDC Interview Questions (6) BDC-Interview-Questions (9) big data (2) big data interview questions (1) Classical Reports Interview Question (3) Classical-Reports-Interview-Questions (22) Conditional Statements (1) Cross Applications (3) Cross-Applications (14) Data Dictionary (22) Data Type Questins (1) Data types (1) Data-Dictionary (48) Data-Type-Questins (6) Dialog programming (5) Dialog Programming Interview Questions (4) Dialog-Programming (30) DOMAIN Interview Questions (1) Domain-Interview-Questions (8) Function Module (2) hadoop (2) hadoop interview questions (2) hdfs (1) IDoc Tutorials (6) Interactive Report Interview Questions (4) Interactive-Reports-Interview-Questions (22) Internal Tables (1) interview questions (1) Lock Object Interview Questions (1) Lock-Objects-Interview-Questions (10) Logical Database (1) Modularization Interview Questions (4) Modularization-Interview-Questions (25) Module Pool Programming (5) Module-Pool-Programming (39) modules in sap (1) Object Oriented ABAP (19) Object Oriented ABAP Interview Questions (15) object-oriented-abap (2) Object-Oriented-ABAP-Interview-Questions (34) OOABAP (9) Reports (14) Reports Interview Questions (9) Reports-Interview-Questions (19) RFC (1) RFC Interview Questions (1) RFC-Interview-Questions (14) RICEF (1) RICEF Objects (1) SAP (4) SAP ABAP (4) SAP ABAP Interview Questions (42) SAP ABAP Introduction (46) SAP ABAP Message Types (2) SAP BADI Interview Questions (2) SAP Basics (71) SAP Books (2) SAP Certification (1) SAP CONSULTANTS (5) SAP CRM (1) SAP ENHANCEMENTS (3) SAP EXITS (2) SAP EXITS ( SAP ENHANCEMENTS ) Interview Questions (1) SAP Free Books (1) SAP HR (2) SAP Lock Object (1) sap modules (2) SAP Open SQL Statements (1) SAP R/3 Architecture (4) SAP Search help (1) SAP Smartforms (1) SAP Smartforms Interview Questions (2) SAP Tables (5) SAP Tcodes (10) SAP Views (1) SAP Webdynpro ABAP (12) SAP Work Processors (2) SAP Workflow (3) SAP-BADI-Interview-Questions (11) SAP-Enhancements (39) SAP-Exits (39) SAP-Exits-Enhancements-Interview Questions (3) SAP-HANA (1) SAP-HANA-Interview-Questions (1) SAP-Smartforms-Interview-Questions (2) SAP-Workflow (3) Scripts (3) Scripts Interview Questions (2) Scripts-Interview-Questions (32) Search Help Interview Questions (1) Search-Help-Interview-Questions (9) Smartforms (1) Table Maintenance Generator (1) Table-Maintenance-Generator (4) Tables in SAP (2) Tables Interview Questions (3) Tables-Interview-Questions (3) Type Group Interview Questions (1) Type-Group-Interview-Questions (7) Variable Declaration (1) Views Interview Questions (1) Views-Interview-Questions (5) Webdynpro (12) what is big data (1)

Protected Blog

 
This blog is not affiliated to SAP AG |SAP is trademark of SAP AG |The information collected from various sources use information with your own risk.