The SAP NetWeaver Development Environment is used to develop both ABAP and Java applications. While the ABAP development is based on the SAP Web Application Server (SAP Web AS), the development environment for Java and Web Dynpro is based on Eclipse, which is implemented by SAP as the SAP NetWeaver Development Studio. From SAP Web Application Server release 6.30 and upward, Eclipse is the IDE (Integrated Development Environment) selected by SAP for the development of Java applications that makes up the SAP NetWeaver Developer Studio.
Although you can use any IDE to develop Java applications for SAP, the version of Eclipse included with SAP NetWeaver Developer Studio includes an open plug-in architecture to accelerate the Java development for SAP environments. You can use the release in the SAP NetWeaver software kits or, alternatively, download it from the SAP Developer Network Web site at www.sdn.sap.com. You need to be a registered user. The Eclipse IDE is one of the industry standards for establishing a development workbench. The official Web site is www.eclipse.org. On top of the Eclipse IDE, users can build development environments for any language, by implementing the necessary plug-ins.
The Eclipse plug-in architecture allows users to integrate several programming languages on top of the same IDE, to introduce other complementary applications such as
The first time that the SAP version of Eclipse is run, you can see a similar screen to the one.
The SAP version of Eclipse (Copyright by SAP AG)
Let's briefly review the specific features of the developing environment, the way of organizing the work, and some of the additional tools included.
With every plug-in you can define your editors and all the necessary views. In Figure there are several views. The vertical view to the left will normally show the directory tree for project (if any). The horizontal view shows a small agenda of pending tasks which can be entered directly by the users or automatically by Eclipse, depending on different events such as the compilation of a program.
The third component of the IDE are the toolbars. There are two types of toolbars:
Programming with Eclipse
As stated previously, Eclipse is an IDE that is not oriented to any specific programming language. The use of a programming language depends if there is a plug-in to support it. The standard version of the Eclipse environment provides the required plug-in for the Java programming language, which is known as JDT. From the official Eclipse Web site you can also download the CDT plug-in for the C/C++ languages.
Code completion is the feature of the environment that automatically completes programming sentences being coded by the developer. The code completion feature in Eclipse is very similar to those implemented by other IDEs: when the developer stops writing for a time interval, the system shows all the possible continuations: reserved words, function names, variables, fields, and so on, starting with the written characters. Some specific characters, such as the period, automatically trigger the code completion mechanism without wailing for the time interval.
Eclipse also provides for the possibility of defining and using templates: code templates that are used often and that can be written automatically. Templates have two parts: a code block (or comment) frequently used and written automatically, and a siring that triggers the template. The JDT plug-in includes by default a significant number of templates, both for building code and for writing javadoc.
Eclipse includes tools for performing automatically the formatting of the code according to some preestablished criteria. This function is the Source format included in the Context menu within the active editor. You can also manipulate code under the Source menu, including Comment and Uncomment, Add javadoc comment, Add import, Organize imports, and others.
Refactoring tools are used when the modifications or manipulations of code, or elements of the design, should involve several classes written in different files, belonging to the same project. These functions can be found under the menu Refactor.
Compilation is a task automatically launched when saving the changes made to the code. If required, there are the Rebuild Project or Rebuild All options in the Project menu option.
From the Run menu option in the toolbar, you can handle most execution options. The Run menu has two parts:
The main difference between a code editor and a good development environment is that the last one integrates a good visual tool for debugging the code being developed. Eclipse includes an easy, powerful, and user-friendly debugger. Launching the debugger is a task similar to running a program, but using the debugging pushbutton. The options are identical but when in debugging the program will make a step to step execution of the programs. When the debugger is launched, the system automatically opens the Debugging Perspective, in which users can see all the information regarding the program being debugged.
Developing Web Dynpros
The following are the basic concepts for developing Web Dynpro applications:
Steps for the Creation Process of a Web Dynpro Application
Let's briefly describe the process of creating a basic Web Dynpro application, which includes three parts:
Web Dynpro Concept and Modeling
This is the first step when developing a Web Dynpro application. It will consist in analyzing the application requirements and translating those requirements into visual elements for the Web Dynpro. The following tasks are involved:
The visual part of a Web Dynpro component is a Web Dynpro window, which is a group of views that can be organized in view sets. And these view sets can be divided in different view areas. In the Web Dynpro applications, views are the structures containing the visual elements of the user interface.
This is the process to include views (with elements UI or empty) in the view areas of a view container and in the definition of structures of navigation between these views. For it, we have the tool Navigator Modeler within the Web Dynpro perspective.
In this step you have to define the view layout, that is, the UI elements that you want to appear within the views. These actions can be performed directly within the Web Dynpro perspective.
Basic Web Dynpro
This section shows a simple Web Dynpro application using the SAP NetWeaver Developer Studio. As we have already introduced, Web Dynpro is the SAP technology to develop Java applications using the same standards for all the SAP NetWeaver components and solutions. The following section shows a practical example creating a Web Dynpro with SAP NetWeaver Developer Studio 6.40. The application is made up of two "dynpros." The first one enters the name of the user for the application and the second one shows a dynamic and personalized greeting.
Basic Web Dynpro Application
In order to perform this practical example, there are some requirements:
In this example we show all the steps required to develop, distribute, deploy, and run a basic Web Dynpro application. The user interface of our application will be composed by two views, which call each other. In the first view, the user is prompted to enter its name in an entry field. If the Go button is pressed within the view, the system will present a second view with a personalized greeting, using the name entered in the first view. When in the second view, pressing the Back button, the system will take us to the first view to interact again with the application.
The steps required for this example are the following:
Creating a Web Dynpro Project
In order to work with development objects within SAP NetWeaver Developer Studio, it is necessary to place them within a project. For this reason, the first step will be creating a project. We will use a wizard to generate our project structure, in this example, of the type Web Dynpro. Once the project is created, we will be able to place under it all the required components to develop the application. Launch the development environment, SAP Net Weaver Developer Studio, by doubleclicking on its icon.
Select File | New | Project to launch the wizard for creating new projects. Once you make this selection, the system will show the wizard for project creation. In the left panel, select the category Web Dynpro and in the right panel select the only existing project type, Web Dynpro Project. Then, press the Next button. Enter the project name, for example "Welcome" and leave the other entry fields with their default values. Next, press the Finish button. The wizard will generate an initial structure for the new Web Dynpro project and will automatically open the Web Dynpro perspective. The difference with the J2EE projects is that this perspective only allows us to see the project structure with two views, Web Dynpro Explorer and Navigator. If the system did not do it automatically, you should press the Web Dynpro Explorer tabstrip to see the project structure. This view will be the start point of all the actions that we must perform for completing this practical exercise.
Creating a Web Dynpro Component
The project structure was already created in the previous step but does not contain the elements that will be required to perform the application. These additional elements are encapsulated in what are known as Web Dynpro components. For that reason, before starting with the definition of layouts, navigation, or even handling, it is required to explicitly create a Web Dynpro component. The steps to create a Web Dynpro component are the following:
As we have already introduced, the views are the elements that allow users to interact with the application. The Web Dynpro projects allow users to organixe or divide the user interface in a set of views. We could consider each view as an independent entity, and together they make up all the elements of a graphical user interface. In our example application, we have two views. The first one, StartView, was already created with the wizard for the Web Dynpro components. Now we have to create the second one. The steps are as follows:
Save the current work by pressing the Save button.
Specifying the Navigation Options
In order to define the navigation among the views, we must first create the entry and exit points of each view. We can only define the navigation between the options using those points. The procedure is therefore divided in two steps:
The next sections explain these topics.
Defining the Inbound and Outbound Points
The steps to be performed are the following:
With this simple procedure we have created the necessary plugs or points to navigate from the StartView to the ResultView. We are going to create additional navigation inbound and outbound plugs, proceeding as specified previously. The blue elements represent the inbound plugs, whereas the red ones represent the outbound ones. Save the project by pressing the Save button.
Defining the Navigation Scheme
To create a navigation link from the first view to the second, select the Create a Navigation Link icon from the actions palette and draw a line in the diagram view, from the outbound plug from the StartView up to the inbound plug for the ResultView. Repeat the same procedure to link the outbound plug for the ResultView with the inbound plug of the StartView.
The outbound plug for ResultView is linked with the inbound plug for StartView
You can also see these modifications from the Web Dynpro Explorer. With these actions we have defined the navigation scheme between the views of the application. The system also automatically created an event handler with the name onPlug<plugname> for each defined inbound plug. In the next section we will show how to implement the event handler onPlugFromStartView from the ResultView to generate dynamic text from the information entered in the view StartView. Save your work by pressing the Save button.
Creating Actions and Implementing Navigation
To navigate from view to view, we need an action to be generated within our view. This action can be activated by a graphical element such as a form button. Next we must implement the event handler that will react to this action and will implement the changes within the view. These actions are performed from the Designer View.
The steps are as follows:
Repeat the previous steps to create the Back action for the ResultView view. In this case, the outbound plug ToStartView will be assigned as Fire Plug. Save all the work performed, but on this occasion press the Save All Metadata button (save all metadata) of the application toolbar. With the previous steps we have created the actions Go and Back. The necessary implementation for performing the navigation has been automatically inserted in the associated event handlers. For example, to verify the source code generated for the event handler onActionGo() we can press on the Implementation tabstrip in the designer view for the StartView view. This method contains only one line. To activate the navigation from the StartView view to the ResultView, we use the associated method with the outbound plug, wdFirePlugTo ResultView(). The predefined private variable wdThis is used when invoking the method and it is always mandatory if we need to make calls to methods within the view controller.
The source code for the event handler onActionBack is the following:
In the next step we will assign these actions to the view layout buttons. With this last action, the navigation between the views of the application will be completely defined.
SAP BASIS Related Interview Questions
|SAP CRM Interview Questions||SAP HR Interview Questions|
|SAP ABAP Interview Questions||SAP HANA Interview Questions|
|SAP Crystal Reports Interview Questions||SAP SOLMAN Interview Questions|
|SAP Security Interview Questions||SAP BPC Interview Questions|
|SAP Netweaver Interview Questions||SAP UI5 Interview Questions|
|SAP Smart Forms Interview Questions|
Sap Basis Tutorial
Sap: From Sap R/3 To Sap Netweaver
The Architecture Of The Sap Web Application Server
Sap Netweaver: An Overview
Using Sap Systems
Upgrading To Sap R/3 Enterprise: The First Step Into Sap Netweaver
The Change And Transport System
Development Options With Sap Solutions: Abap Engine
User Management And Security In Sap Environments
Web Application Server System Management
Performance And Troubleshooting With Sap Solutions
Sap For It Managers: Implementation, Planning, Operation, And Support Of Sap Systems
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.