What Is New in the ABAP Development Environment with the SAP WAS SAP BASIS

In this section we review most of the new features of the developing environment with release 6.20 of the SAP Web Application Server.

What Is New in the ABAP Development Environment

In the following sections we present the most important new features of the ABAP development environment and the new system features that are closely related to the ABAP Object Repository. Among these are the following:

  • Description of the new options within the Object Navigator
  • Properties for the new development element: the package
  • Description of the new transaction Code Inspector
  • New screen for the print dialog
  • Process for mass update of the print parameters

New Options in the Object Navigator

With release SAP Web AS 6.20, there are several new buttons within the Object Navigator (transaction SE80).

SE80—Object Navigator

SE80—Object Navigator

With the MIME Repository button you can access the MIME objects of the repository. This allows for easier and friendlier development of BSP applications, because you can access MIME objects and BSP applications from the same transaction. The second button that you can see is Tag Browser, which allows you to use "drag and drop" techniques for any significant tag you need to use for the development of BSP applications.

Tag Browser

Tag Browser

From the settings transaction, which you can reach by selecting Utilities | Settings from the menu, you can configure the buttons that you need to appear within the Object Navigator transaction. Under the Workbench (General) tabstrip in the section Browser Selection, you can see the rows with all the buttons of the transaction. If you don't want to see a particular button in the transaction, you only have to uncheck the corresponding check box.

Workbench settings

Workbench settings

Package
As we explained in Chapter, the concept of the development class found in the SAP Basis has been substituted by the package with the introduction of the SAP Web Application Server. The development class was used to relate associated objects within a class with a transport layer, which was used to determine the transport route of the objects. The package, besides serving the same purpose of the development class, has additional functionality, such as the following:

  • Allows for the nesting of packages. That is, a package can be composed by subpackages. Therefore, we can see some additional elements, such as the following:
    • Package structure: This is the package of the highest level defined in the package hierarchy.
    • Main package: Main packages can only be composed by other packages.
  • There is a new visibility concept regarding the objects within a package. For an object to be used outside the scope of a package, you have to define it as visible and define also its interface for accessing the objects.
  • It is necessary also to define the rights of use, which establish that other packages can use the objects of a package.

As a general rule, these verifications that the system can perform before doing transports are deactivated. In order to activate these verifications, you have to access the PAKPARAM table. You can find an entry with the name "GLOBAL_SWITCH" that by default has the value "OFF." To activate the validations or verifications, you must either set the values "RESTRICTED" or "R3ENTERPRISE." Even if you have activated this flag, it is also necessary to define in the packages that the validations will be activated.

There are several ways to create packages in the SAP Web Application Server. The easiest way is selecting the package category within the object navigator transaction by entering the name of the package. The system will detect if the package does not exist and will display a dialog window for creating the package. By selecting Yes, the system will show a new window with the attributes for the package. Because this is a customer package, the software component must be "HOME." In the Package Type field we can enter whether the package is not a main package, that is, a package that will be composed just by objects, or whether it is a main package or a structure package.

After entering the basic information of the package, the system will pop up for the creation of a change request and then creates it. From that moment, we can access that object from the Object Navigator and modify any of its attributes. The administration of the packages is performed within a window with several tabstrips:

  • The Attributes tabstrip is used to manage the main properties of the package.
  • Package Interface allows for the definition of the interface for accessing the objects of the package.
  • Use Access is used for defining the packages that will have access to the objects of this package.
  • Package Included is used to define the subpackages in the case that this is a main package.

Example of packages

Workbench settings

Code Inspector

The Code Inspector is a new utility that allow users to perform complex checks on ABAP code, as well as massive checks, that is, several programs at the same time. You can access from transaction code SCI.

Code Inspector initial screen

Code Inspector initial screen

From the Code Inspector initial screen, and before you can perform an inspection, let's look at the main concepts and elements of this utility:

  • Check variant. In a check variant we have to define what type of inspection we want to perform. The check types are grouped into categories. In most occasions, the checking provided by the standard system will be enough, but you can also define user check variants. The following sections will show you how to create user checks and new customer categories. Figure shows an example of the check variant.
  • Data sets. The data sets are used to define the set of objects to be analyzed and inspected. These objects can be programs, include objects, and even ABAP dictionary objects.

Check variants in the Code Inspector

Check variants in the Code Inspector

Code Inspector object set

Code Inspector object set

We are defining a data set to analyze all the programs starting with "Z." Once the check variant and the data sets are defined, we can perform our first inspection. In the field for the object set, we have to enter the set defined in the previous step, and accordingly enter the data for the field check variant.

Once the inspection is created, we can proceed to its execution. Running an inspection will generate a log we can display to see the results, and we can look up this log at any time by clicking on the results button.

Example of inspection

Example of inspection

Creating User Checks with Code Inspector

As we introduced previously, the system allows for defining user checks so that you can make your own custom inspections. The steps to create user checks can be summarized as follows:

  1. Create a new inspection within the Code Inspector.
    • Create a new global class that extends some of the existing classes of the Code Inspector.
    • Define the attribute C_MY_NAME.
    • Implement the instance constructor.
    • Implement the RUN method.
    • Include the new inspection in the tree for checks variants.
  2. Add user parameters within the new check.
    • Include additional instance attributes.
    • Modify the constructor method.
    • Implement the methods PUT_ATTRIBUTES and GET_ATTRIBUTES.
    • Implement the method QUERY_ATTRIBUTES.
  3. Document the messages for the new inspection.

Create a new global class that extends some of the existing classes of the Code Inspector. To create a new class, you have the following possibilities:

  • Create it from scratch.
  • Copy from a template: CL_CI_TEST_SCAN_TEMPLATE or
    CL_CI_TEST_ROOT_TEMPLATE.
  • Copy from standard classes already implemented and then modify it. This is the recommended method. For instance, copy from package S_CODE_INSPECTOR

Display from the Class Builder utility (transaction SE24) all classes starting with "CL_CI."

Class info system

Class info system

Even if you cannot see it in the previous figure, the system includes the class CL_CI_CATEGORY, which represents the various existing categories within the Code Inspector. The classes' hierarchy is represented in the following structure. Each class within the hierarchy specializes in a different inspection or check type:

  • CL_CI_TEST_ROOT
  • CL_CI_TEST_PROGRAM
  • CL_CI_TEST_INCLUDE
  • CL_CI_TEST_SCAN
  • CL_CI_TEST_SELECT
  • CL_CI_TEST_SELECT_TABNAMES
  • CL_CI_TABNAMES_PUBLIC(ZCL_CI_TABNAMES_PUBLIC)

New Print Dialog Screen

With the release 6.10 and upward of the SAP Web Application Server, the SAP system includes a new dialog screen for report printing. The screen has been simplified, and it only shows the basic information for printing: printer code, number of copies, and total or partial printing of the document

New simple print screen

New simple print screen

If you want to access or set additional printing parameters, you must click on the Properties button. For more information about these attributes, refer to Chapter.

Massive Update of Print Parameters

The SAP system includes a new process, which can be run using the ABAP program RSPRIPARADMIN, that allows the massive update (for all users) of print parameters.

Printer defaults

Printer defaults

New Elements of the ABAP Programming Language

SAP has been constantly enhancing the ABAP programming language, and in this section we show these new features, sentences, and enhancements. This section is meant mostly for those users accustomed to previous ABAP releases. Because the number of new features is very extensive with the SAP Web Application Server, we will summarize the most significant ones, such as the following:

  • Those new elements related with internal tables
  • Update with the string data types
  • New ways of handling files in the application servers
  • News in the SQL sentences
  • News in the sentences for report creation
  • New system fields

News with Internal Tables

The following table describes the most important news when dealing with internal tables from ABAP.

News with Internal TablesNews-with-Internal-Tables

News with the String Data Type

The following table describes the most important news when dealing with string data types in ABAP programs.

News with the String Data TypeNews-with-the-String-Data-Type

News when Dealing with Files in the Application Server

The following table describes the most important news when dealing with handling files in the application servers.

News when Dealing with Files in the Application ServerNews-when-Dealing-with-Files-in-the-Application-Server

News with SQL Sentences

The following table describes the most important news when dealing with SQL sentences in ABAP programs.

News with SQL SentencesNews with SQL SentencesNews with SQL Sentences

News in Sentences for Creating Reports

The following table describes the most important news when dealing with SQL sentences in ABAP programs.

News in Sentences for Creating Reports

New System Fields

The following table describes the most important news when dealing with SQL sentencesvin ABAP programs.

New System Fields

MESSAGE Sentence

There is now a new variant of the MESSAGE sentence:

MESSAGE <string> TYPE <kind1> [ DISPLAY LIKE <kind2> ]

With this sentence variant we can now activate messages that are not defined in any message class (table T100). The message type <kind1> establishes the type of message: warning, informative, error, and so on. Additionally, we can add the way we want to display the message with the optional parameter DISPLAY LIKE <kind2>, which establishes how the message is displayed.

Enhancements Related to Data Types

For constants definition we can now used structure types, as in the following example:

types:
begin of structure,
ITAB type standard table of SPFLI with non-unique key CARRID,
MREF type ref to OBJECT,
end of structure.
constants:
CONST type structure value is initial.

For the elementary field symbols and the formal parameters in the routine definitions (FORM), functions (FUNCTION), or methods (METHODS), we can use now generic types that will be converted to their definitive types at runtime. The new generic types are described in the following table:

Enhancements Related to Data Types

The final elementary data types (established at runtime) must be one of the types that are included within the generic data type. If this was not the case, an exception will be raised.

New Methods

Some of the new features related to new methods are as follows:

  • GET_PROPERTY. The system includes now the GET_PROPERTY method within the class CL_ABAP_TYPEDESCR to obtain properties at runtime.
  • GET_FRIEND_TYPES. The system also includes now the GET_FRIEND_TYPES method within the CL_ABAP_CLASSDESCR class to obtain the description of the objects defined as FRIENDS within a class.

For more new features related to methods, please refer to the online SAP documentation.

New Features with Logical Expressions

The following table includes the new features with logical expressions, including relational operators:

New Features with Logical Expressions

For other changes in logical expressions or relational operators, please refer to the SAP online help.



Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

SAP BASIS Topics