Sie sind auf Seite 1von 9

ABAP WebDynPro Case Study

By: Vinod Durairaj


Under the guidance of Mrs Vadivukarasi Dharmaraj

Contents
Aim: To create a sales order program that is able to create, read, update or delete
(CRUD) sales orders................................................................................................ 2
Creation of Database Tables.................................................................................... 2
Header Table........................................................................................................ 2
Item Table............................................................................................................. 3
Partner Table........................................................................................................ 3
WebDynPro Interface............................................................................................... 4
Program start Screen........................................................................................... 4
Search for sales order.......................................................................................... 5
Sales order details................................................................................................ 6
Create sales order................................................................................................ 7
E-Mail................................................................................................................... 7
Limitations............................................................................................................... 8
Failure in implementation of Adobe Forms...........................................................8
Concluding remarks................................................................................................ 8

Aim: To create a sales order program that is able to create, read,


update or delete (CRUD) sales orders.

1 | Page

The aim of this case study was to develop a familiarity with the ABAP programming
language and the WebDynPro web application technology through the
implementation of a sample program. A sales order program was chosen to be
created in the sandbox system CL2. The following tasks were planned to be carried
out in order to complete this requirement:
1. Creation database tables maintaining sales order records.
a. Tables for header, partner and the item details had to be created.
b. Creation of relevant data elements and domains for the various fields
in the table
2. Creation of a WebDynPro user interface and relevant methods that would
allow a user to:
a. View list of existing sales orders based on search requirements
b. Download the list in excel format
c. Get a detailed view of chosen sales order
d. Edit the fields in the chosen sales order
e. Create a new sales order
f. Download/Print a PDF file containing the details of the chosen sales
order

Creation of Database Tables


Header Table
ZSO_VINOD_HEADER
The header table table had to have the main details pertaining to the sales order.
The following fields and related data elements and domains were created as
described in the table.
Here the ORDER_NO field was selected as the key field as the order number has to
be unique for each sales order.
Field

Description

ORDER_NO

Order Number

CUSTOMER

Customer Name

CREATED_BY
CREATED_ON
CHANGED_BY

Name of creator
Creation Date
Name of user
who last edited
Last Changed
Date
Order Status

CHANGED_ON
STATUS

Data
Element
ZSALENUMBE
R
ZSO_CUSTNA
ME
ZSO_CRSU
ZSO_CRDAT
ZSO_CHUSR

Data
Domain
ZSALENUMB
ER
ZSO_CUSTNA
ME
USNAM
CRDAT
USNAME

Data Type in
Domain
INT4

ZSO_CRDAT

CRDAT

DATUM

ZSO_STATUS

ZSO_STATUS

INT1
Range:
0 - NEW
1 - INPROCESS

CHAR (80)
CHAR (80)
DATUM
CHAR (80)

2 | Page

ORDER_DESCRIP
TION

Order
Description

ZSO_SALEDTE
XT

2
COMEPLETE

ZSO_SALEDT
EXT

CHAR (80)

Table 1 Header Table Details

Item Table
ZSO_VINOD_ITEM
Below we see the details of the item table. The item table contains records of the
individual items comprised in a sales order. Here the key fields were chosen to be
the sale order number (ORDER_NO) and the item number (ITEM_NO).
Field

Description

ORDER_NO

Order Number

ITEM_NO

Item number
in list
Product ID
number
Product
Description
Product
Quantity
Expected
Amount

PRODUCT_ID
PRODUCT_DESCRIP
TION
QUANTITY
EXPECTED_AMT

Data
Element
ZSALENUMBE
R
ZSO_ITEMNO

Data Domain
ZSALENUMBER

Data Type in
Domain
INT4

ZSO_ITEMNO

INT4

ZSO_PRODUC
TID
ZSO_PRODDT
EXT
ZSO_QUANTIT
Y
ZSO_EXPECTA
MT

COM_PRODUCT
_ID
ZSO_SALEDTEX
T
ZSO_QUANTITY

CHAR (40)

ZSO_EXPECTA
MT

INT4

CHAR (80)
INT4

Table 2 Item Table Details

Partner Table
ZSO_VINOD_PART
Below we see the details of the partner table. The item table contains records of the
partners involved in a sales order. Here the key fields were chosen to be the sale
order number (ORDER_NO), partner role (PARTNER_ROLE) and partner name
(PARTNER_NAME).
Field
ORDER_NO
PARTNER_ROLE

Descriptio
n
Order
Number
Role of
Partner

Data Element
ZSALENUMBER
ZSO_PARTNERRO
LE

Data
Domain
ZSALENUMB
ER
ZSO_PARTNE
RROLE

Data Type in
Domain
INT4
INT1
Range:
0 Sold to
3 | Page

PARTNER_NO
PARTNER_NAME
PARTNER_TYPE

Partner
Number
Partner
Name
Partner
Type

ZSO_PARNTER
ZSO_PARTNERNA
ME
ZSO_PARTNERTY
PE

BU_PARTNE
R
ZSO_PARTNE
RNAME
BU_TYPE

party
1 Employee
2 Contact
Person
CHAR (10)
CHAR (80)
CHAR (1)
Range:
1 Person
2
Organization
3- Group

Table 3 Partner Table Details

WebDynPro Interface
We can see the user interface created in WebDynPro that will be presented to the
user in the following images.

Program start Screen

Figure 1 Start Screen

The Program loads with the above screen. The user is presented with two buttons.
The view sales orders button allows the user to open a search view that would let
them view and edit existing sales orders.
The create sales order button would open a view with a blank form to allow the
user to enter details of the new order which they wish to create.

4 | Page

Search for sales order

Figure 2 Sales order search

5 | Page

Clicking the view sales order button brings the user to a search view where they
can search for sales orders based on the order number, user who created the sales
order or by the status of the order.
The results of the search are displayed in a ABAP List Viewer (ALV) table directly
below the search area. Each record the in the results table shows the order number
and other relevant details from the header table.
At this screen, the user has the option of returning back to the start view, or have a
detailed look at each order by clicking on the order number.
The Sales order number is made to be a hyperlink that brings the user to a new
screen with further details about the sales order, items and partners involved in the
sale.
Lastly, an excel sheet containing the results can be downloaded by clicking the
export button. This was a built function provided by the ALV table.

Sales order details

Figure 3 Sales order details

6 | Page

In the above screen, the user can see all the details pertaining to a particular sales
order. All fields are editable except for key fields such as order number and item
number.
The user can also add entries to both the item table and partner table by clicking on
add row button. Likewise, selected rows can also be deleted using the delete
button.
All changes are saved to corresponding database tables at the click of the update
button.

Create sales order

Figure 4 Create sales order screen

Should the user choose the create sales order button at the start of the program,
they are presented with a blank sales order form which they have to fill up with the
details of sales order. The sales order entry is added to database at the click of the
update button.

E-Mail
7 | Page

An addition E-Mail functionality was also added to the program. When an orders
status field is marked as complete, an e-mail is sent to the intended recipients. We
did not have any e-mail data of the partners from the master table BUT0000.
Therefore, a prompt was created to manually enter the e-mail whenever an order is
updated as complete.

Figure 5 E-Mail Prompt

Limitations
Failure in implementation of Adobe Forms
In order to download or print the sales order details in PDF format, Adobe forms had
to be used in NetWeaver for the implementation of a relevant form. The sandbox
system in which the entire package was built, however, did not have Adobe
LiveCycle Designer installed. Therefore adobe form implementation was not
possible.
Performing the action in another system also showed to be infeasible as recreating
the entire package and programs was too time consuming of a task.
Package transfer tools such as the open source SAPLINK did not have proper
support and lacked require plugins to allow complete transfer of all package
components to a target system.
Having considered all possibilities, Adobe form implementation was dropped.

Concluding remarks
This case study was carried out over a period of two weeks from 29 th of September
to 9th of October. It aided me in learning on how to create a complete WebDynPro
program from scratch. I believe that this knowledge obtained through
implementation will aid greatly in future WebDynPro related projects.

8 | Page

I would like to thank Mrs Vadi for her support and guidance throughout the course of
the case study.

9 | Page

Das könnte Ihnen auch gefallen