Cover almost all the points for eCommerce websiteFull description
e commerce
Deskripsi lengkap
Cover almost all the points for eCommerce website
Pajak Untuk e - Commerce
E commerce is an facility for each and every user buying and selling product through the internet. By using E commerce we can manage everything in our time. Every person user can handle different transaction like E payment billing, Mobile banking, Ne
SAP, SAP Logo, R/2, ERP, mySAP, mySAP.com, xApps, mySAP Business Suite, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world.
®
ORACLE is a registered trademark of ORACLE Corporation.
All other product and service names mentioned are the trademarks of their r espective companies.
®
®
®
®
UNIX , X/Open , OSF/1 , and Motif are registered trademarks of the Open Group. Disclaimer
LINUX is a registered trademark trademark of Linus Torvalds and others.
Some components of this product are based on Java™. Any code change in these components may cause
®
®
®
®
Citrix , the Citrix logo, ICA , Program Neighborhood , MetaFrame , ®
®
®
unpredictable and severe malfunctions and is therefore
WinFrame , VideoFrame , MultiWin and other Citrix product names
expressively prohibited, as is any decompilation of these
referenced herein are trademarks of Citrix Systems, Inc.
components.
HTML, DHTML, XML, XHTML are trademarks or registered
Any Java™ Source Code delivered with this product is
®
trademarks of W3C , World Wide Web Consortium, Massachusetts
only to be used by SAP’s Support Services and may not
Institute of Technology.
be modified or altered in any way.
Documentation in the SAP Service Marketplace
You can find this documentation at the following Internet address: &' &'
Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 ((( (((
JAVA® is a registered trademark of Sun Microsystems,
SAP, SAP Logo, R/2, ERP, mySAP, mySAP.com, xApps, mySAP Business Suite, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world.
®
ORACLE is a registered trademark of ORACLE Corporation.
All other product and service names mentioned are the trademarks of their r espective companies.
®
®
®
®
UNIX , X/Open , OSF/1 , and Motif are registered trademarks of the Open Group. Disclaimer
LINUX is a registered trademark trademark of Linus Torvalds and others.
Some components of this product are based on Java™. Any code change in these components may cause
®
®
®
®
Citrix , the Citrix logo, ICA , Program Neighborhood , MetaFrame , ®
®
®
unpredictable and severe malfunctions and is therefore
WinFrame , VideoFrame , MultiWin and other Citrix product names
expressively prohibited, as is any decompilation of these
referenced herein are trademarks of Citrix Systems, Inc.
components.
HTML, DHTML, XML, XHTML are trademarks or registered
Any Java™ Source Code delivered with this product is
®
trademarks of W3C , World Wide Web Consortium, Massachusetts
only to be used by SAP’s Support Services and may not
Institute of Technology.
be modified or altered in any way.
Documentation in the SAP Service Marketplace
You can find this documentation at the following Internet address: &' &'
)'*
+
Type Style
Represents
Icon
Example Text
Words or characters that appear on the screen. These include field names, screen titles, pushbuttons as well as menu names, paths and options. Cross-references to other documentation
Example text
Emphasized words or phrases in body text, titles of graphics and tables
EXAMPLE TEXT
Names of elements in the system. These include report names, program names, transaction codes, table names, and individual key words of a programming language, when surrounded by body text, for example, SELECT and INCLUDE.
Example text
Screen output. This includes file and directory names and their paths, messages, names of variables and parameters, source code as well as names of installation, upgrade and database tools.
Example text
Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.
Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.
EXAMPLE TEXT
Keys on the keyboard, for example, function keys (such as F2) or the ENTER key.
Meaning Caution Example Note Recommendation Syntax
Development and Extension Guide – S AP E-Commerce 5.0
Contents Development and Extension Guide - SAP E-Commerce 5.0: Examples and Tutorials ........................................................................................................... 7 General Introduction ............................................................................................... 7 Where the Current Version of this Document is Located ............................................ 7 Naming Conventions....................................................................................................... 7 Terminology...................................................................................................................................................7 Variables........................................................................................................................................................7
Structure of this Document ............................................................................................ 8
Examples of Extensions.................................................................................. 9 Prerequisites ............................................................................................................ 9 Abbreviations........................................................................................................... 9 Extensions Limited to the UI Layer...................................................................... 10 Prerequisites.................................................................................................................. 10 Changing the Global Look and Feel of the UI ............................................................. 10 Purpose .......................................................................................................................................................10 Version ........................................................................................................................................................ 10 What to Do...................................................................................................................................................10 Example.......................................................................................................................................................11
Changing Text in JSP Pages ........................................................................................ 13 Purpose .......................................................................................................................................................13 Version ........................................................................................................................................................ 13 What to Do...................................................................................................................................................14 Example.......................................................................................................................................................14
Replacing/Adding Mimes.............................................................................................. 15 Purpose .......................................................................................................................................................15 Version ........................................................................................................................................................ 15 What to Do...................................................................................................................................................15 Example.......................................................................................................................................................15
Extensions within the Process Flow ................................................................... 16 Prerequisites.................................................................................................................. 16 Enhancing/Modifying the Action Flow......................................................................... 16 Purpose .......................................................................................................................................................16 Version ........................................................................................................................................................ 16 What to Do...................................................................................................................................................17 Example.......................................................................................................................................................17
Extensions within Data Processing ..................................................................... 18 Prerequisites.................................................................................................................. 18 Extending Existing Backend Objects .......................................................................... 18 Purpose .......................................................................................................................................................18 Version ........................................................................................................................................................ 18 What to Do...................................................................................................................................................18
Extensions to Exchange Additional Data............................................................ 19 Data Associated to an Existing Business Object ....................................................... 19 Version ........................................................................................................................................................ 19 What to Do...................................................................................................................................................19 Example.......................................................................................................................................................20
September 2005
4
Development and Extension Guide – S AP E-Commerce 5.0
Data Not Associated to an Existing Business Object ................................................ 20 Version ........................................................................................................................................................ 20 What to Do...................................................................................................................................................20 Example.......................................................................................................................................................20
Extension of the Document Search Screen ................................................................ 21 Adding a new search criteria for the order document search in the B2B scenario ..................................... 21 Adding the currency field to the result list ...................................................................................................22 Troubleshooting...........................................................................................................................................26
Extension Tutorial ......................................................................................... 27 Installing Examples ............................................................................................... 27 Prerequisites.................................................................................................................. 28 Creating Web Applications with Extension Examples............................................... 28
Extension Demo 1 – Add New Entry Fields ........................................................ 29 Click through the Application....................................................................................... 29 Finding out which JSP has to be Changed ................................................................. 30 Adding an Entry Field to order.jsp............................................................................... 30 Modify the JSP ............................................................................................................................................ 32
Changing the Process Flow.......................................................................................... 34 Getting Information about the Standard Process Flow ............................................................................... 34 Intercepting the Process Flow with a Custom Action .................................................................................. 36 Creating a Custom Action.......... ............ .............. ............. .............. ............ .............. ............. ............ .............. ........... 36 Adding Custom Action to Process Flow...... ............ .............. ............. ............ .............. ............. .............. ............. ...... 37
Storing Extension Data in an Existing Business Object............................................ 38 Retrieving Extension Data from Existing Business Objects ..................................... 39 Displaying Extended Data in JSP................................................................................. 39
Extension Demo 2 – Extensions in the Business Object Layer........................ 41 Adding a Business Object ............................................................................................ 41 Adding a Business Object Manager ............................................................................ 41 Testing application........................................................................................................ 43
Extension Demo 3 - Extensions in the BLS Layer.............................................. 44 Writing Interface for the Backend Object .................................................................... 45 Writing Implementation of Backend Object Interface ................................................ 45 Registering Backend Object in BLS Layer.................................................................. 46 Writing a new Backend-Aware Business Object ........................................................ 46 Creating a Backend-Aware Business Object in BOM................................................. 47 Testing the Application................................................................................................. 47 Communication with the SAP CRM system ................................................................ 47 Enabling Logging .......................................................................................................... 49 Testing Communication to the SAP CRM System...................................................... 49
Extension Demo 4 – Store Additional Data as Extension Data......................... 50 Action Structure ............................................................................................................ 50 Changing the Process Flow.......................................................................................... 51 Replace Standard Action with Custom Action in the Process Flow ............................................................ 51
Displaying Extended Data in JSP................................................................................. 52
September 2005
5
Development and Extension Guide – S AP E-Commerce 5.0
Extension Demo 5 - Displaying additional Document Type on User Interface in ISA CRM.................................................................................................................. 54 Create New Template for Content Management Folders ........................................... 54 Create New Catalog Type for Product Catalogs ......................................................... 55 Create New Product Catalog from New Catalog Type................................................ 55 Extension of JSP to Display Additional Document in Product Catalog ................... 55
Extension Demo 6: Copy-Template for Customer Extensions .........................57 Working with the Objects ............................................................................................. 57 Implementation Details ................................................................................................. 58 How to Use the Template for Own Extensions ........................................................... 59
Development and Extension Guide – S AP E-Commerce 5.0
Development and Extension Guide - SAP ECommerce 5.0: Examples and Tutorials In mySAP CRM 5.0, the Development and Extension Guide for SAP E-Commerce has been splitted into two documents. The document Landscape, Basics and Concepts contains information about how the SAP E-Commerce applications are designed, how to setup the development environment and explains t he extension concept of SAP E-Commerce. The document Examples and Tutorials contains examples and extension tutorials for SAP E-Commerce 5.0.
General Introduction Where the Current Version of this Document is Located The current version of this document is located in SAPNet under the alias CRM-INS T => mySAP CRM 2005 => CRM Core and can be downloaded from there
Naming Conventions Terminology
The term SAP Service Marketplace is the same as Marketplace .
The term E-Selling is the same as Internet Sales (ISA).
The term E-Service is the same as Internet Services (ICSS).
The term E-Commerce embraces E-Selling and E-Service .
The term command shell is the same as command prompt . Open a command prompt in windows by pressing Start -> Run . Enter ‘cmd’ and press enter .
The term SP is an abbreviation for service pack .
Variables The following table contains a list of the variables, w hich are used in this guide. Variables
Description
SAP CRM release you have installed (e.g. 4.0 or 5.0).
Number of the service pack (two decimals), you want to upgrade to (e.g ‘03’).
Drive on which the software was installed (e.g. c:).
SAP J2EE Engine release (e.g. Web AS 7.0).
Directory, on which the JAVA runtime is installed (e.g. c:\jdk1.4.2).
System ID you entered during installation of the SAP Web Application Server Java with the SAPInst.
September 2005
7
Development and Extension Guide – S AP E-Commerce 5.0
Instance number of your SAP Web AS, which you entered during installation with the SAPInst.
Installation directory for the SAP system. If you have installed the SAP Web AS with t he SAPInst, the default installation path is: C:\usr\sap\\JC
\j2ee
\SDM
Name of the deployed Internet Sales application (e.g. b2b or b2c).
Directory where the application is deployed. (e.g. \cluster\server0\apps\sap.com\crm~b2b servlet_jsp\b2b\root)
Directory where the ISA build tool is located. (e.g. C:\isa_build_tool)
Server on which your Internet Sales application is installed.
Port on which the deployed application can be reached. For more details on the SAP J2EE Ports, please refer to the chapter Additional Information 'Error! Reference source not found.' on page Error! Bookmark not defined.
Structure of this Document Before we start the general introduction to the various subjects covered in this document, we would like to explain a few things about its structure and handling. This cookbook is intended for consultants who have knowledge of the SAP CRM (ERP) environment, Internet Sales versions, and basic Java skills, and who want to understand the concepts of the Internet Sales 5.0 SAP J2EE solution and wish to set up their own local development environment independently. After you have read this extension guide, you should be able to make changes to both the local Internet Sales application and perform customer installations. The first unit provides a short general introduction to SAP J2EE that is needed in order to understand the concepts of the Internet Sales framework discussed in the next unit. The next unit gives an introduction to the SAP Java Connector required by the Internet application when communicating with an SAP s ystem. Unit 4 provides an introduction to handling and installing the tools required for running the Internet Sales application and modifying it. The second part of this document begins with unit 5. This unit introduces various extension concepts needed in order to understand the Example of Etensions in the next unit. The extension tutorial in the following unit gives you the opportunity to get hands-on experience of t he various extension concepts. Best practices useful when extendion the application can be found in the last unit.
September 2006
8
Development and Extension Guide – S AP E-Commerce 5.0
Examples of Extensions This unit provides an overview of possible extensions within the ISA application. The following information is provided for each type of extension: •
Purpose Why should I perform such an extension? W hat is the goal of the extension?
•
Version Which ISA support packages support the technology required by this extension?
•
What To Do This unit usually provides a list of tasks that have to be performed in order to perform the modification. Cross references show units that provide further information.
•
Example An example that demonstrates the extension.
Prerequisites For a detailed description on how to set up a development environment, refer to unit Error! Reference source not found. Error! Reference source not found.. The examples provided in this chapter assume the following infrastructure •
JDK 1.3.1, or higher
•
SAP J2EE 6.20
•
Installed SAP Java Connector 2.0, or higher
•
Development environment (e.g. Eclipse) with installed I nternet Sales libraries
•
Ant 1.5, or higher
•
Installed ISA Build Tool
•
Internet Explorer 5
•
o
For testing the application
o
For reading JavaDoc
Following deployed ISA applications: o
The original B2B application, which acts as the template for the modified application
o
A copy of the B2B application called B2B_mod. All custom modifications are performed in this copy
o
The original B2C application, which acts as the template for the modified application
o
A copy of the B2C application called B2C_mod. All custom modifications are performed in this copy.
Abbreviations The following abbreviations are used in this catalog:
September 2005
9
Development and Extension Guide – S AP E-Commerce 5.0
Description
Abbreviation
Root of original B2B application in the SA P J2EE environment
Root of original B2C application in the SAP J2EE environment
Root of B2B copy application in the SAP J2EE en vironment
Root of B2C copy application in the SAP J2EE environment
The root of an arbitrary ISA web application
The WEB-INF path of an arbitrary ISA web application
Business Object Manager
BOM
Backend Object Manager
BEM
Internet Sales Application
ISA
Extensions Limited to the UI Layer All changes to the user interface take place in the Interaction and Presentation Layer. Changes related to the UI: •
Modifying existing JSPs/HMTL, style sheets
•
Adding new JSPs/HTML
Prerequisites In order to understand this unit you should be familiar with the following concepts: •
HTML
•
Cascading stylesheets
•
Java Server Pages
•
ISA custom tags
Changing the Global Look and Feel of the UI Purpose You want to change the look and feel of the application, such as colors, font size, t ext alignments, and so on.
Version All versions.
What to Do Settings related to the look and feel of the application are located in the global cascading stylesheet file. This file can be found in \mimes\shared\style\stylesheet.css. September 2006
10
Development and Extension Guide – S AP E-Commerce 5.0 The overall frame-structure of B2B is displayed in the following graphic:
Figure: B2B Frameset structure This picture gives you some orientation for finding out which classes in the global style sheet are responsible for which parts of the UI.
Example This first example details how to change the background color of the history part: 1. Open the file located \mimes\shared\style\stylesheet.css.
2.
Search for body.history.
3.
In the stylesheet.css file change the following: Change body.history { background: none #F0F4FA; } to body.history { background: none #1010FA; }
4.
Clear the temporary files of the browser, close the browser, and restart the web application.
5.
After the changes the UI should appear as follows:
September 2005
11
Development and Extension Guide – S AP E-Commerce 5.0
The second example details how to change the frame sizes of the B2C application. The overall frame-structure of B2C is depicted below:
Figure: B2C Frameset structure
September 2006
12
Development and Extension Guide – S AP E-Commerce 5.0
The ISA application is structured using three nested frame sets that are defined in the JSPs mainFS.jsp, mainFS_inner.jsp, catalogFS.jsp, and accountFS.jsp. Please note that you can change the size and arrangement of the frames in one of the existing frame sets, but you cannot add a new one, as this w ould require more comprehensive modifications. In this specific example, you want the right frame to appear on the left-hand side, and you want to reduce the size of the left and right frames to 20% of t he screen. Please note that you have to change catalogFS and accountFS in parallel. To change the sequence of the frames, move the description of the right frame in the source code of catalogFS and accountFS. To change the size of the individual frames, change the