SAP NWDS (NetWeaver Developer Studio) is an eclipsed-based IDE for SAP Java development. You can download the NWDS 7.0 from SAP Service Marketplace.
How to download NWDS 7.0?
Go to SAP Service Marketplace – http://service.sap.com and choose link SAP Support Portal. you need to login the web site with a S-user account.
In the Support Portal, choose tab Software Downloads and sub tab Support Packages and Patch.
Read more…
KM(Knowledge Management) provides a central, role-specific point of entry to unstructured information from various data sources in the portal. It also provides a set of API to allow other applications to use KM functions.
Below are the steps on how to use KM API in web dynpro application.
Step 1. Go to web dynpro project properties and select ‘Java Build Path’.
Read more…
The Javamail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API is available as an optional package for use with Java SE platform and is also included in the Java EE platform.
Below two JAR file is needed to send emails in the web dynpro application:
mail.jar – 1.2
activation.jar – 1.0
You can download these jar files in oracle web site – www.oracle.com. For how to use the external library, please refer to Web Dynpro Java – use external library.
Below codesnip shows how to send email using JavaMail API. This logical can be called in any place of web dynpro application to send email notification. In the intranet environment, the SMTP server doesn’t require the authentication, but in the internet, the authentication is required. You need to add the authentication check logic according to your SMTP setting. The default SMTP port is 25.
Read more…
Download business data as a excel file is critical for business users to view,modify and manipulate the data freely. In this example, I use Apache POI to generate the excel file in web dynpro application.
The Apache POI Project’s mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft’s OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. For more information, please visit the official home page – http://poi.apache.org/.
Current stable version of POI is 3.6, but it requires JDK 1.5 and higher version to use it. Because NW7.0 is based on JDK 1.4.2, I have to choose POI version 3.2.
For more information on how to use external library, please refer to my another post – Web Dynpro Java – use external library.
Read more…
During the web dynpro development, the developer might need to utilize external libraries to realize some specific activities, such as generating excel files, sending emails. Generally there are two methods to adding the external library into the web dynpro application.
1. Package the external libraries into the web dynpro application
Below steps works well in NW7.0. I didn’t test it in NW CE7.1 and not sure whether it works or not in NW CE7.1.
Read more…
I have been working in SAP Java world for several years. As per my experience, it is difficult for newcomers to start working on SAP Java field. There are many new terminologies and technologies that always freak out people at the beginning especially those aren’t familiar with Java language. I would like to share my limited experience with everyone on how to go through this tough period and become a senior developer.
1. Java Language
Before you begin to study any SAP specific Java technologies/tools, Java language is a fundamental thing that you must have a good command of. This not only means Java syntax and grammar, it also contains other aspects you need to know in order write a high quality codes. Below is a check list.
a. Java Syntax and Grammar
b. Java programming standards
c. J2SE API – I/O, Email, JDBC, etc.
d. J2EE programming – JSP/Servlet, EJB, Web Service, etc.
e. Write, compile, deploy and run Java application using an IDE like eclipse/netbeans.
Read more…
I didn’t maintain my SAP blog since I was assigned to a SAP NetWeaver Project. My previous SAP projects are all about the SAP Business Suite implementation such as ERP, CRM, SRM, etc. Although I learned Java in university and implemented a couple of web tools using Web Dynpro for Java, this project was a big challenge to me. After several months hard-working, the project goes on very well and aims to go-live next month. Finally I get some free time to update my blog and will share my experience on SAP NetWeaver development.
In my opinion, this is not a typical SAP implementation project. It’s more like a Java project which utilizes SAP NetWeaver platform. Because of this, the development strategy is different from SAP ERP implementation project. Below diagram shows the difference between the traditional SAP implementation project and the NetWeaver project which try to build the custom solution from scratch.
Read more…
SAP Netweaver Developer Studio is an Java IDE that based on Eclipse platform. It includes the standard Eclipse features and SAP features. SAP NetWeaver Developer Studio provides several features for composing and developing business applications. You can select the features according to the components you have installed on your AS Java of the Composition Environment.
Before you start to install NWDS, make sure the NWDS and Netweaver server have the same version. It can keep you away from some werid issues.
When you have a central AS Java, you can access the update site from below URL:
http://<host>:<httpport>/updatesite
Make sure that the update site is properly installed and that the post-installation activities for the update site have already been performed. For more information, see section Post-Installation Activities -> Configuring the IDE Update Site -> in the installation documentation, available at:
Read more…
Before we can do any developments related to SAP Java technology, the NWDI server must be well configured. NWDI (Netweaver Development Infrastructure) is used as an industry-strength development environment. It combines all functionality needed for the whole life-cycle of software development and provides processes from product definition to delivery and maintenance.
Below diagram shows the architecture and main components of NWDI. This post try to explain how to create a track for SAP Java development.

Read more…
In CRM Web Channel, there are several enhancement concept. One of the most tricky one is function module listener. Using function module listener concept, you can intercept function calls to the SAP system. A Java listener can be registered and is notified before and after calling a function module. You can use this listener to manipulate input/output parameters. You also have access to the Backend Context.
This is an example to show how to use function module listener.
Step 1. Create listener class.
Listener class must implement interface ‘com.sap.isa.core.eai.sp.jco.JCoConnectionEventListener‘.
/*
* Created on 2009-10-23
*
* To change the template for this generated file go to
* Window>;Preferences>;Java>;Code Generation>;Code and Comments
*/
package com.yourcompany.isa.event;
import com.honeywell.isa.businessobject.bobpricing.Z_BobPricingConstants;
import com.sap.isa.businessobject.Shop;
import com.sap.isa.core.eai.sp.jco.JCoConnectionEvent;
import com.sap.isa.core.eai.sp.jco.JCoConnectionEventListener;
import com.sap.mw.jco.JCO;
/**
* @author Andy
*
* This class will be called when calling the function module 'CRM_ISA_BASKET_GETTEXT'.
* This function module will use the same text id for both header and item text, so we need to copy this
* function module out to add some more logic.
*/
public class Z_TextGetEventListener implements JCoConnectionEventListener {
/* (non-Javadoc)
* @see com.sap.isa.core.eai.sp.jco.JCoConnectionEventListener#connectionEvent(com.sap.isa.core.eai.sp.jco.JCoConnectionEvent)
*/
public void connectionEvent(JCoConnectionEvent event) {
if(event.getId() == JCoConnectionEvent.BEFORE_JCO_FUNCTION_CALL){
//check whether the item text id is maintained in the shop administrator
Shop shop = (Shop)event.getBackendContext().getAttribute(Z_BobPricingConstants.SHOP);
if(shop == null){
return;
}
String itemTextId = (String)shop.getExtensionData("ZZ_ITEM_TDID");
String headerTextId = (String)shop.getExtensionData("ZZ_HEADER_TDID");
if(itemTextId == null || itemTextId.equals("")){
return;
}
if(headerTextId == null || headerTextId.equals("")){
return;
}
JCO.Function function = event.getJCoFunction();
JCO.Table textTable = function.getTableParameterList().getTable("TEXT_LINE");
//append a new line for the seperate header and item text id
textTable.appendRow();
textTable.setValue((headerTextId + "||" + itemTextId) , "TDLINE");
}
else{
return;
}
}
}
Step 2. Register the class into file ‘modification-config.xml’.
<function-module-listener>
<param name=”fmevent:CRM_ISA_BASKET_GETTEXT” value=”com.honeywell.isa.event.Z_TextGetEventListener”/>
</function-module-listener>