You are on page 1of 17

Introduction to Work Flow & Web Forms

Table of Contents
Introduction to Work Flow & Web Forms .................................................................................................... 1
Web Forms - Introduction ............................................................................................................................. 2
Overview ................................................................................................................................................... 2
Concepts in Web forms ............................................................................................................................. 3
Structure of BSP Application ..................................................................................................................... 4
Controller .............................................................................................................................................. 5
View ...................................................................................................................................................... 5
Accessing BSP Application: ....................................................................................................................... 6
Processing BSP Application: ...................................................................................................................... 7
Work Flow - Introduction .............................................................................................................................. 9
Overview ................................................................................................................................................... 9
Concepts in Work flow .............................................................................................................................. 9
Work flow Terminology .......................................................................................................................... 11
Event ................................................................................................................................................... 11
Object .................................................................................................................................................. 11
Task ..................................................................................................................................................... 12
Business Workplace & Work Item ...................................................................................................... 14
SAP Workflow Agent ........................................................................................................................... 15
SAP Workflow Step ............................................................................................................................. 16
Rule ..................................................................................................................................................... 17



Web Forms - Introduction

Overview
Web Forms are nothing but BSP applications in SAP.
Business Server Pages (BSPs) are HTML pages that contain the actual application logic and
presentation logic. BSPs define the Web user interface and determine the elements of user
interaction.
A Business Server Page (BSP) application is a complete functional application, like a classic SAP
transaction. However, this application is executed in a Web browser rather than in the SAPGUI.
BSP applications can be accessed from transaction SE80.






Concepts in Web forms
A BSP application consists of a user interface and business logic that is assigned to a logical unit.
The user interface of BSP applications includes:
Static Web sites
Dynamically generated Web sites, which are BSPs or templates that contain server-side scripting
that is executed dynamically at runtime to generate a static Web site BSPs can either be pages
with flow logic or views.
Various MIME objects, such as pictures, icons, sound files, style sheets, and so on, that are parts
of a typical Web application



BSP application class is used to encapsulate the business logic functionality in BSP application. The
business logic can be accessed from the BSP application using the typical methods, such as BAPIs,
function modules, or class libraries.






Structure of BSP Application
A BSP application can consist of one or more controllers and Business Server Pages, as well as known
elements such application classes, MIME objects and themes.

A BSP can have different characteristics. It is either a page with flow logic or a view or a page fragment.
Within a BSP application, there can be several controllers, several views and several pages with flow
logic.







Controller
A controller is the instance of a central controller class. There is a URL for every controller that can be
addressed externally, such as using a browser. A controller can therefore be used as the initial point of
entry to a BSP application. The mapping of the URL to the controller class is determined in the BSP
application.


A controller is the controlling instance in the MVC design pattern, where it also acts as the controlling
mechanism. It carries out the following tasks:
It provides the data
It is responsible for selecting the correct layout
It triggers data initialization
It executes input processing
It creates and calls a view instance

View
Views are only responsible for the layout; they visualize the application data. Views are very much like
pages, although they do not have event handlers, auto-page attributes, or their own URL. Unlike auto-
page attributes, normal page attributes can be used that are then filled by the controller. Controllers
should control calling views and communicate with a model.





Accessing BSP Application:

A BSP application is addressed and executed through HTTP using a Uniform Resource Locator (URL).
HTTP or HTTPS is the protocol used to access the application across the network, thus allowing the use
of standard products like firewalls and proxy servers.









Processing BSP Application:
When a BSP application is being processed, the individual BSPs and their components are run, and the
corresponding processing steps are executed according to the code.


Every controller class automatically inherits all methods and attributes from central basic class
CL_BSP_CONTROLLER2. Among all the methods inherited, some methods needs overwriting for
processing the HTTP request.

Method Description
DO_REQUEST central method in a controller class
handles both input and output processing

DO_INIT

This method is called once at the start and is used for initialization.
This method behaves like a constructor method.

DO_HANDLE_DATA Reacts to user input.
Processes data input for this component.
DO_HANDLE_EVENT Reacts to user input.
Processes events if the component contains them.
Exactly one view controller is called to handle the event, which contains
an event such as a save button, for example.
DO_FINISH_INPUT Ends the input processing.

In Method, DO_REQUEST, WORK FLOW for Down payment will be triggered by passing all the Data
entered by the User in Web form after validations.

Work Flow - Introduction

Overview
SAP Business Workflow can be used to define business processes that are not yet mapped in the R/3
System. These may be simple release or approval procedures, or more complex business processes such
as creating a material master and the associated coordination of the departments involved.

SAP Business Workflow is particularly suitable for situations in which work processes have to be run
through repeatedly, or situations in which the business process requires the involvement of a large
number of agents in a specific sequence.

Concepts in Work flow
Workflow Builder: It is for displaying and making changes to workflows. You can make small extensions
directly to the original workflows supplied by SAP, such as carrying out your own agent assignments or
changing deadline monitoring. Transaction SWDD


Business Object Build: In order to make the functions of the R/3 Systems available to a workflow, you
use business objects, which you can define and analyze in the Business Object Builder. These business
objects are made available to the workflow in reusable tasks. The Business Wizard Explorer gives you an
overview of all existing tasks. Transaction SWO1

Business Workplace: The end user receives information about the activities they are to carry out in their
Business Workplace. This provides them with a central overview of all the activities that they are
authorized to carry out. They can commence the activities from here. Transaction SBWP



Work flow Terminology


Event
An event represents an action in the system.
For example, Creating Down payment is an ACTION. For this action the SAP Application creates an
event. This even in turn triggers a workflow.
Object
An OBJECT is a specific instance of the OBJECT TYPE.
Workflow routes the document among different persons. Each person performs certain activities.
Whatever goal the workflow is intended to achieve, can be put inside an object type. Consider an Object
as a Structure (Abstract Enclosure) with certain data and some logic.
For example, we have Object type ZZBFSEG for Down payment. This is used for Creating Down
payments. It has certain data and some logic.
Data is passed by
KEY FIELDS
ATTRIBUTES

Logic is defined in
METHODS
EVENTS


Task
An SAP workflow task represents an Activity. It serves a purpose here.
Some examples of tasks are Create Down Payment via BDC, Get dates for deadlines, Specify Rejection
Reason etc.
The task Create Down Payment via BDC performs a business function Create Down Payment in
Background via BDC.
Now, how does it perform this function? It follows the logic created inside the method of an object type.
So, in simple terms, a workflow TASK refers to the method of an object type.





Different task types for a Work flow are:
Customer Task
Task Group
Standard Task
Workflow Task
Workflow template
Transaction PFTC, will take us through different types of Tasks available.

A Workflow can be combination of multiple tasks or a single task, the task type is to differentiate a
workflow from a single step Task or Multiple steps joined together to form a Workflow template.


Business Workplace & Work Item
Business Workplace is a work area that an SAP user can use to carry out business Processes. The
business workplace of a user could be his inbox.
Let us take the example of the Down payment. Once, the Down payment request is submitted, selected
approver receives the request in his inbox to approve. The Approver opens it, checks the details and
approves the same. The request that the Approver receives in this inbox is called a WORK ITEM.

In technical terms work item is a run time request of a task in real time. Inbox contains not just the work
items it may as well contain simple text message. Examples include Notification messages that need
not be acted upon and are just used to inform the Approver.










SAP Workflow Agent
An Agent is a person who executes a work item.
Possible agent is the person who is eligible to execute the work item. The name of the possible
agent is mentioned in the workflow task.
Responsible agent is the person who should execute the work item, or who is responsible for
acting on the work item. Name of the responsible agent is mentioned in the workflow step.
Excluded agent is the person who should not execute the work item, name of the excluded
agent is mentioned in the workflow step.














SAP Workflow Step
Steps are the building blocks of a workflow. In other words, a workflow consists of steps arranged in a
sequence. A step in general refers to a business activity. A step can therefore refer to an activity where it
refers to a task.


Steps that can be inserted in a Workflow.


Rule
As discussed earlier, in the workflow task, as a responsible agent, we need to mention the name of the
person who should execute the work item of approving absence notification. This method of specifying
directly, the user name or job or position is called fixed agent assignment.

But in some cases, we may want to determine the agent at run time, i.e. when the workflow task is
actually executed. Then, instead of specifying the manager's name, we specify a RULE 'superior of
workflow initiator'.

What does this rule perform?
It takes the employee as input, refers to the organizational plan, checks that the superior of the
employee is, at that point in time, and sends the work item to his inbox. This method is called RULE
RESOLUTION.

You might also like