Wednesday, July 03, 2013

Workflow interfaces ( Runtime )

SAP_WAPI_ASYNC_RULE_COMPLETE
SAP_WAPI_CREATE_EVENTWorkflow interfaces: Create event
SAP_WAPI_CREATE_EVENT_EXTENDED
SAP_WAPI_DECISION_COMPLETE
SAP_WAPI_DECISION_READ
SAP_WAPI_GET_EXCLUDED_FUNCTION
SAP_WAPI_GET_PROPERTY
SAP_WAPI_GET_TASK_CNT_SCHEMA
SAP_WAPI_GET_WI_CNT_SCHEMA
SAP_WAPI_READ_CONTAINERWorkflow Interfaces: Read Container
SAP_WAPI_SET_ERROR
SAP_WAPI_SET_MESSAGE
SAP_WAPI_START_WORKFLOWWorkflow interfaces: Start workflow
SAP_WAPI_WORKITEM_COMPLETE
SAP_WAPI_WORKITEM_CONFIRM
SAP_WAPI_WORKITEM_DELETE
SAP_WAPI_WRITE_CONTAINERWorkflow Interfaces: Write Container

WORKFLOW - Work item related function modules

SWW_WI_AGENTS_CHANGEChange Agents of Work Item
SWW_WI_BACKAgent Returns Work Item
SWW_WI_DEADLINES_CHANGEChange Deadline Attributes of Work Item (Types W, E, F, and B)
SWW_WI_DEADLINES_READRead Deadline Data of Work Item
SWW_WI_DELETEInternal: Work Item Deletion -> SAP_WAPI_WORKITEM_DELETE
SWW_WI_DISABLELock Work Item Against Execution
SWW_WI_ENABLERemove Lock Against Execution for Work Item
SWW_WI_EXECUTE_NEW
SWW_WI_FEASIBLE_METHODS_GETTest for Which FMs Are Allowed for the WI Depending on Status and Type
SWW_WI_FORWARDForward Work Item (All Types)
SWW_WI_LANGUAGE_CHANGEChange Language of Work Item (Types W, F, and B)
SWW_WI_PRIORITY_CHANGEChange Priority of Work Item (Types W, F, and B)
SWW_WI_REJECTReject Work Item (Only Type W)
SWW_WI_RESUBMISSION_ENDEnd Resubmission of Work Item
SWW_WI_RESUBMIT
SWW_WI_RETURN_READRead Return Data of Work Item
SWW_WI_SELECTAgent Selects Work Item
SWW_WI_STATUS_SET_READYDeadline: Activate Work Item (Types W, E, F, and B)
SWW_WI_TEXTS_CHANGEChange Deadline/Notification Texts of Work Item (Types W, E, B, and F)

Tuesday, June 25, 2013

System Fields for Date and Time

  • SY-DATLO - Local date of user, for example 19981129, 19990628.
  • SY-DATUM - Current (application server) date, for example 19981130, 19990627.
  • SY-DAYST - During daylight saving time X, otherwise empty.
  • SY-FDAYW - Factory calendar weekday, Sunday 0 ... Saturday 6.
  • SY-TIMLO - Local time of user, for example 154353, 225312.
  • SY-TZONE - Time difference to Greenwich Mean Time (UTC) in seconds, for example 3600, 10800.
  • SY-UZEIT - Current (application server) time, for example 164353, 215312.
  • SY-ZONLO - Time zone of user, for example CET, UTC.

System fields for SCREENS

  • SY-CUCOL - Horizontal cursor position Counting starts at column 2
  • SY-CUROW - Vertical cursor position Counting starts at row 1
  • SY-DATAR - Set to X at time of PAI if at least one screen input field was changed by the user or other data transfer, otherwise empty.
  • SY-LOOPC - Number of rows currently displayed in a screen table (table control).
  • SY-SCOLS - Number of columns in current screen.
  • SY-SROWS - Number of rows in current screen.
  • SY-STEPL - Index of current row in a screen table (table control). Is set at every loop pass. Outside a loop, for example during the POV(Process On Value Request) event for a table row, SY-STEPL is not set appropriately.
  • SY-TITLE - Text that appears in the title bar of the screen. For selection screens and lists this is the program name, otherwise SAP R/3. Can be set during PBO (Process Before Output) using SET TITLEBAR.
  • SY-UCOMM - Function code that triggered the event PAI. Every user action that triggers PAI is assigned a unique function code, with one exception: Choosing Enter triggers PAI and different function codes can be transferred to SY-UCOMM:

System Fields in Interactive reporting

  • The SY-LSIND - system field contains the index of the list currently created. While creating a basic list, SY-LSIND equals 0. 
  • SY-LINCT total line count of a list. 
  • SY-LINNO current line no where cursor is placed. 
  • SY-LSIND Index of the list currently created during the current event (basic list = 0).
  • SY-LISTI Index of the list level from which the event was triggered. 
  • SY-LILLI Absolute number of the line from which the event was triggered 
  • SY-LISEL Contents of the line from which the event was triggered 
  • SY-CUROW Position of the line in the window from which the event was triggered (counting starts with 1) 
  • SY-CUCOL Position of the column in the window from which the event was triggered(counting starts with 2) 
  • SY-UCOMM Function code that triggered the event 
  • SY-PFKEY Always contains the status of the current list.
  • SY-LOOPC - Number of rows currently displayed in a screen table (table control).
  • SY-CPAGEPage number of the first displayed page of the list from which the event was triggered. Counting starts at 1

  •  SY-LSTAT - ID for list levels within the program. SY-LSTAT can be filled with values during list creation in the ABAP program. The value valid when the list is completed is saved with the list. In the case of an interactive list event, SY-LSTAT is set to the value it was assigned during the creation of the list from which the event takes place. SY-LSTAT is no longer maintained and should therefore no longer be used.

     

VIEWS - ABAP Dictionary


VIEWS

Data on the application object is often distributed on the several database tables. Database systems therefore provide you with a way of defining application-specific views on data in several tables. These are called views.

Four different view types are supported. These differ in the way in which the view is implemented and in the methods permitted for accessing the view data.

1. Database views:
are implemented with an equivalent view on the database.
  • Database views implement an inner join. The other view types implement an outer join.
  • A database view is defined in the ABAP Dictionary and automatically created on the database during activation.
  • Accesses to a database view are passed directly to the database from the database interface .
  • The database software performs the data selection.
  • The definition of a database view is changed in the ABAP Dictionary, the view created on the database must be adjusted to this change.
  • view does not contain any data, this adjustment is made by deleting the old view definition and creating the view again in the ABAP Dictionary with its new definition.
  • The maintenance status defines whether you can only read with the view or whether you can also write with it.
  • If a database view was defined with more than one table, this view must be read only.
  • The data read with a database view can be buffered.
  • View data is buffered analogously to tables.
  • The technical settings of a database view control whether the view data may be buffered and how this should be done.
  •  The buffered view data is invalidated when the data in one of the base tables of the view changes.
  • In database views, the join conditions can be formulated using equality relationships between any base fields. 
  • In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys. 
  • It can include entire tables in database views . 
  • All the fields of the included table become fields of the view (whereby you can explicitly exclude certain fields).
  • If new fields are included in the table or existing fields are deleted, the view is automatically adjusted to this change.
  • A new or deleted field is therefore automatically included in the view or deleted from it.
  • To include a table in a view, you must enter the character '*' in field View field in the view maintenance, the name of the table to be included in the field Table and the character '*' again in the field name.
  • If you do not want to insert a field of the included table in the view, you must enter a '-' in field View field, the name of the included table in field Table and the name of the field to be excluded in field name.
 2. Projection views: 
 are used to hide fields of a table (only projection).

  • Projection views are used to hide fields of a table. This can minimize interfaces.
for example,
when you access the database, you only read and write the field contents actually needed.
  • A projection view contains exactly one table.
  • We cannot define selection conditions for projection views. 
  • There is no corresponding object in the database for a projection view. 
  • The R/3 System maps the access to a projection view to the corresponding access to its base table. 
  • We can also access pooled tables and cluster tables with a projection view. 
  • The maintenance status of the view controls how the data of the table can be accessed with the projection view.
3. Help views:
can be used as selection method in search helps.
  • Create a help view if a view with outer join is needed as selection method of a search help.
  • The selection method of a search help is either a table or a view.
  • If you have to select data from several tables for the search help, you should generally use a database view as selection method.
  • All the tables included in a help view must be linked with foreign keys.
  • Only foreign keys that have certain attributes can be used.
  • The first table to be inserted in the help view is called the primary table of the help view.
  • The tables added to this primary table with foreign keys are called secondary tables.
  • Help views are used to output additional information when the online help system is called.
  • When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field .
  • If this is not the case, the help view is displayed in which the check table of the field is the primary table.
  • Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
4.  Maintenance views: 
permit you to maintain the data distributed on several tables for one application object at one time

  • Data that is distributed on more than one table often forms a logical unit, called an application object .
  • It can be able to display, change and create the data of such an application object together . 
  • All the tables used in a maintenance view must be linked with a foreign key . 
  • The join conditions are always derived from the foreign key in the maintenance view. 
  • We cannot enter the join conditions directly as in a database view. 
  • A maintenance interface with which the data of the view can be displayed, changed and created must be generated from the definition of a maintenance view in the ABAP Dictionary. 
  • When the maintenance interface is created, function modules that distribute the data maintained with the view on the underlying tables are automatically generated. 
  • The maintenance interface is generated with the Transaction Generate Table View (Transaction SE54) or from the view maintenance screen with Utilities -> Tab.maint.generator. 
  • Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. 
  • Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.


Monday, June 24, 2013

HOOK Methods in webdynpro

COMPONENT CONTROLLER  - Hook Methods:

  • WDDOAPPLICATIONSTATECHANGE   -  Handling for Suspending and Resuming an Application
  • WDDOBEFORENAVIGATION  -     Error Handling Before Navigation Through Application
  • WDDOEXIT   -  Controller Clean-Up Method
  • WDDOINIT    -   Controller Initialization Method
  • WDDOPOSTPROCESSING    -   Prepare Output

VIEW CONTROLLER  - Hook Methods:
  • WDDOAFTERACTION   -    Method for non-action specific operations before navigation
  • WDDOBEFOREACTION    -   Method for Validation of User Input 
  • WDDOEXIT   -  Controller Clean-Up Method 
  • WDDOINIT  -  Controller Initialization Method 
  • WDDOMODIFYVIEW   -    Method for Modifying the View Before Rendering 
  • WDDOONCONTEXTMENU   -   Method for Modifying the Context Menu

WINDOW CONTROLLER  - Hook Methods:
  • WDDOEXIT   -  Controller Clean-Up Method
  • WDDOINIT    -    Controller Initialization Method 
  • WDDOONCLOSE    -  Handling For Closing of Window 
  • WDDOONOPEN   -  Handling For Opening of Window

Life time of webdynpro controllers

Component Controller:
  • As Web Dynpro is stateful technology, the lifetime of the component controller equates to the lifetime of the Web Dynpro component. 
  • It is tied directly to the Web Dynpro runtime and is instantiated when the service is initiated.
View Controller:
  • The view controller is instantiated when the view is first called into action. 
  • In the view properties, you can set the lifetime to be tied to the Component Controller (Framework Controlled) or only when it is visible. 
  • In the when visible case, the view controller is released when the view is no longer part of the view assembly in the window.
Window Controller:
  • Window controllers are instantiated when they are called into action by the Web Dynpro framework. Their lifetime is controlled by the Web Dynpro framework.
Custom Controller
  •  Custom Controllers are also managed by the Web Dynpro framework, and they are instantiated once called into action.
  • Their lifetime is controlled by the Web Dynpro framework. 
Configuration Controller :
  • The configuration controller is tied directly to the lifetime of the Component Controller.

Web Dynpro - Controllers

Component Controller:
  • This is the parent controller for the Web Dynpro component.
  • Only one component controller can exist, and it is visible to all other controller types of the Web Dynpro component.
  • It handles the functionality of the entire Web Dynpro component.
View Controller:
  • The view controller handles the flow-logic of the specific view of which it is a part. 
  • There is a single view controller for each view. 
  • A view controller is used, for example, to verify a user's input to a field on
    the View Layout.
Window Controller:
  • The window controller manages the navigation between the views via plugs.
Custom Controller:
  •  The custom controller is optional and is created by the developer. 
  • It can be used to add functionality to the Component Controller. 
  • You can create multiple custom controllers for a given Component Controller.
Configuration Controller:
  • Configuration controller is a special case of the custom controller, which allows for personalization
    functionality. 
  • There can only be one of these per Component Controller.
Interface Controller:
  • The interface controller is used in conjunction with an interface view, which allows view assemblies to be presented through the generic Web Dynpro Framework and the sharing of a visual interface
    between components, along with context, methods, attributes, and events.

Workflow - Tables

  • SWW_CONT     Workflow Runtime: Work Item Data Container
  • SWW_CONTOB   Workflow Runtime: Work Item Data Container (Only Objects)
  • SWW_EVENTCRL Workflow: Correlations for Events in Workflow
  • SWW_EVENTS   Workflow: Events in Workflow
  • SWW_OUTBOX   DB View for Selection of Outbox
  • SWW_WI2OBJ   Workflow Runtime: Relation of Work Item to Object
  • SWW_WIREGIS  Workflow:  Registration of a Work Item
  • SWWBINDEF    Obsolete 6.1/ Workflow Runtime - Save Bindin...
  • SWWCNTP0     Workflow Container: XML Database (P0)
  • SWWCNTPADD   Workflow Runtime: Persistence for Additional Container (XML)
  • SWWCUSTOM    Workflow Runtime: WIM Customizing Data
  • SWWDHSTEXT   Workflow: Status Texts for Work Item Deadline Status
  • SWWEI        Workflow Runtime: Work Items of Type E (Event Items)
  • SWWFBATEXT   Workflow: Short Texts for WIM History
  • SWWHRINDEX   Time Stamp for Indices in OrgManagement Workflow Environment
  • SWWINDX      Obsolete 6.1/ INDX Table for SWW Internal Runtime Constructs
  • SWWLOGHIST   Workflow Runtime: History of a Work Item
  • SWWLOGPARA   Obsolete 4.6/ WIM Log Table: Actions on WIs - Parameters
  • SWWORGTASK   Workflow Runtime: Assignment of WIs to Org. Unit/Task
  • SWWREPSTATUS Table for Status of Workflow Runtime Background Jobs
  • SWWRUNMETH   Obsolete 6.1/ Workflow Runtime - Save Methods
  • SWWSTATEXT   Workflow: Status Texts for Work Item Status
  • SWWSTATUS    Workflow: Properties of a Work Item Status
  • SWWSWPRET    Obsolete 6.1/ Workflow Runtime - Save Modele...
  • SWWTYPTEXT   Workflow: Type Texts for Work Item Types
  • SWWUSERWI    Current Work Items Assigned to a User
  • SWWVCONTWI   Deprecated: Read View of Container Objects and WI Header
  • SWWVDAGENT   Deadline agents for work items (latest end)
  • SWWVEAGENT   Excluded Agents of a Work Item
  • SWWVHEARET   Joint view of SWWWIHEAD and SWWWIRET (types B,F,P,W)
  • SWWVHISTHEAD Read View Using SWWLOGHIST and SWWWIHEAD (Tasks)
  • SWWVLAGENT   Deadline agents for work items (latest start)
  • SWWVNAGENT   Notification Agents for Work Items
  • SWWVPUBLIC   Public attributes from table SWWWIHEAD
  • SWWVSTATUS   Properties of a Work Item Status
  • SWWVSTATXT   Maintenance View for Status Texts of a Work Item
  • SWWVTMPERR   View of Temporarily Incorrect Background Steps
  • SWWVTMPRUN   View of background steps running
  • SWWVTYPTXT   Maintenance View for Type Texts of a Work Item
  • SWWVWAGENT   Deadline agents for work items (requested end)
  • SWWWIAGENT   Workflow Runtime: Agents for Execution of a Work Item
  • SWWWIDEADL   Workflow Runtime: Deadline Data for Work Items
  • SWWWIDH      Workflow Runtime: Deadline Monitoring of Work Items
  • SWWWIHEAD    Workflow Runtime: Header Table for All Work Item Types
  • SWWWIRET     Workflow Runtime: Return Values of Method Call

Lock Objects


Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.

SAP Provide three type of Lock objects.
·      Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to the locked area of the table

·      Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to the locked area of the table.

·      Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the same transaction.

 

When you create a lock object System automatically creat two function module.
1. ENQUEUE_. to insert the object in a queue.
2. DEQUEUE_. To remove the object is being queued through above FM.

  

 

Function Codes of The PushButtons in Standard Lists