8.16.2009

Dynamic Open SQL – within SUB ROUTINE


Above program is an example of Dynamic Open SQL used within a sub-routine. In a complex program which requires WHERE statement construction throughout the codes, the program will append dynamically various information into “STRWHERE” and “STRLINE”. As a part of another sub-routines and codes, this program will generate output dynamically based on what button the user click. In this example, if the user click “All Class” the program will display all booking list while if the user click “Business Class” the program will only display all booking in Business class.
The ability of Dynamic Open SQL is far more than just what explained in this paper, however using these simple examples we understand that there is always way to develop our current programming method or system.


read more...

Above program is featuring more complex programming techniques. If in the previous program the codes only use one parameter as Dynamic component, in above program the code must implement some additional features to allow the program runs dynamically.

This program will allow the user to search a particular customer name and one other search condition which will be executed during runtime. This program will then display all the records from table customer SCUSTOM which matches with the conditions defined by the user.

Apart from the usage of Internal Table, the program will also require the usage of Table EDPLINE. This is a special feature in Release 4.6 in its pre-release to allow the construction of string or characters which later will be used within the SELECT statement.

As any other program, the first requirement is variable and table declaration. This program will be using one internal table to keep all the data “ITAB_SCUSTOM” (Line 3) and one constructible WHERE statement built on a TABLE OF EDPLINE and EDPLINE (Line 4 and 5). EDPLINE will handle all small pieces or components of WHERE statement and the TABLE OF EDPLINE will construct all the pieces or components from EDPLINE into a WHERE string statement which will be used in the WHERE condition in SELECT statement.

For the selection screen, the program will allow the user to input a particular name LIKE which means any number of first character(s) which the user want to search on. And also, the program will allow one other optional selection condition from the user (Line 6 and 7). In this example the default is “A” for the name and “ID BETWEEN 1 and 99” as the other condition.


Once the user click “Execute” or F8 button, the program will start allocating information from the selection screen into EDPLINE which in this example called “STR_LINE” (Line 8). If the user input an additional condition in the selection screen, the program will also add that information into “STR_LINE” (Line 9 – 11).

After all the conditions constructed, the information in “STR_LINE” will be appended into “STR_WHERE” as the “TABLE OF EDPLINE” (Line 13) which will be used in the SELECT statement (Line 14).

Using that dynamically constructed SELECT statement, the program will display the matching records available in table customer SCUSTOM.
read more...

Dynamic Open SQL – FROM statement


This is a very simple example to show how Dynamic Open SQL can be implemented within the program, specifically in SELECT statement. In this example the program will calculate the number of records from the table which the user inputted. This program is far from perfect and no exception or error handling has been implemented.


The table name that the user inputted will be kept in a variable or parameter called “TBLNAME” (Line 2). During runtime, the program will display selection screen which allows the user to input a table name. As the default, the program will automatically input “SPFLI” as the table name.


After the user pressed “Execute” or F8 button, the value of “SPFLI” will be kept in a variable called “TBLNAME” which will be used to determine the table name of the SELECT statement. In this program, the SELECT statement will COUNT how many records are in the table (Line 4).
read more...

Dynamic Open SQL Commands

The basic of Dynamic Open SQL commands is the usage of variables or parameters within the SELECT statement. This can be done by carefully constructing its components such as FROM, INTO and WHERE statements. Even though Dynamic Open SQL has been developed since Release 3.0, the major development with enhanced features will only be available in Release 6.10. This release includes features such as:

* Creating internal tables dynamically
* Simplify the programming by allowing more transparent and integrated codes
* Additional exception handling within the codes.

Even though some of the essential commands will not available until 6.10 released, the basic features of Dynamic Open SQL (Release 4.6) has been considered as a major development on common Open SQL.
read more...

Concepts of Dynamic Open SQL

Open SQL is the main feature in ABAP language which enables the user to access database level from ABAP workbench editor. Open SQL is an independent variant / subset of standard SQL with some additional SAP unique features which is built into ABAP in SAP application. SQL is always identic with “SELECT” statement; code which capable to select a particular data from a certain tables with some possible conditions. Apart from “SELECT” statement, Open SQL also enables a program to INSERT, UPDATE, MODIFY or DELETE data from physical database in database layer (Adrian Görler & Ulrich Koch, 2001).

Even though Open SQL is seems powerful enough to handle all sort of database transaction, a common Open SQL is unable to dynamically bring a result which require user control over the code during runtime. In some cases, developing a program for such purposes using common Open SQL can be a nightmare as the programmer must pre-code all the possible action received from the user. Using Dynamic Open SQL, the programmer only needs to develop one program which responds variously to different actions from the user (Roger Hayen - Central Michigan University, 1999).
read more...

8.01.2009

Netweaver-Composite application framework

Purpose

Different services and people with different roles within different departments need to work together to drive business processes. The most effective approach for such solutions is the composite methodology which allows reuse and composition of different services, user interface components and business processes into flexible solutions.

It comprises design tools, methodologies, services and processes, an abstraction layer for objects, and user interface and process pattern libraries. Powerful service facilities help to build J2EE services from scratch or compose existing services into new and more powerful ones. Guided Procedures on the other hand help to orchestrate the different pieces in order to create multi-step, workflow-based solutions beyond of the scope of a single computer desktop.

The Composite Application Framework (CAF) conforms to the generally accepted technological standard of Model Driven Architecture (MDA) including modeling and configuration tools, metadata-based generation mechanisms, user interface and process patterns, predefined content, standardized interfaces and guidelines.
Integration

The Composite Application Framework leverages all layers of SAP NetWeaver.
read more...

Advantages of SAP NetWeaver with Conculsion

a. Enhanced Adaptability:

Enhanced adaptability actually refers towards the adaptability of SAP NetWeaver towards the existing Business System in any organization. It provides a heterogeneous environment, integrating the various applications; databases and making available open technologies like web services readily available to the user. It saves money on unnecessary customization of the existing business System.

b. Lower TCO:

SAP NetWeaver instead of replacing the existing system interweaves the various resources like databases, legacy systems; Internet based Information and provides a heterogeneous Environment for the user to get the maximum from the new unified system. It also prevents unnecessary customization of the entire system. Moreover, it reduces complexity and makes the system more comprehendible and flexible to the rapidly changing business processes. All of these lead to reduced the total cost of ownership.

c. Better ROI:

SAP NetWeaver increases the return on investment. As mentioned earlier, by using this technology IT strategies can be synchronized with SAP solutions. This synchronization makes the system more reliable leading to better assessment services, which in turn lead to financial benefits.

Conclusion

NetWeaver uses a very transparent process to provide the ability to trace the logic structure right from the raw data to information, which can be used for analysis. It helps in developing portal content on your preferred platform. Interoperability of SAP NetWeaver both with Microsoft .NET and IBM Hemisphere takes at People, Information and process level. For Microsoft .NET, Sap’s .NET connector provides a highly scalable and reliable communication infrastructure, as well as a Microsoft Visual Studio .NET Add-In to simplify development. Further, Sap’s new Java middleware, the SAP Java Connector (JCO) allows customers and partners to easily build SAP-enabled components in Java. Thus, helping decision makers interpret and manipulate the output of the decision model that provides mathematically robust knowledge about complex problems. Hence, making SAP NetWeaver a Complete Solution for the Integration with various applications and platforms that are used in various organizations.
read more...