ABAP syntax collection I

Source: Internet
Author: User
1. What is ABAP:

 

Definition: ABAP = advanced business application program

 

SAP initially developed the ABAP/4 language for internal use only to provide an optimized working environment for application programmers. It has been constantly improved and modified to meet business needs. Now, ABAP/4 has become the only tool for SAP to develop all its own application procedures.

 

ABAP/4 is the fourth generation of languages that support structured programming. It combines all common control structures and modular concepts. At the same time, it also supports object-oriented programming methods, which opens up a broader space for application development of ABAP. It can also be integrated with other programming languages, such as VB, Java, C/C ++.

 

 

Ii. Some features of ABAP:

 

1. ABAP includes:

 

2. ABAP/4 supports commercial data types and operations. You can use special date and time fields for calculation. The system automatically performs the required type conversion.

 

3. ABAP/4 contains an SQL subset called Open SQL. With open SQL, you can read and Access database tables, regardless of the database system used.

 

4. ABAP/4 allows you to define and call subprograms. You can also call subprograms of other programs. Parameters can be transmitted from or to a subroutine in various ways.

 

5. ABAP/4 contains a special subroutine called a function module. You can create and maintain function modules in the central database. The function module between the calling program and the subroutine has a clearly defined data interface. They can be tested separately in the independent mode of the calling program.

 

6. The ABAP/4 Report program is used to analyze data in the database table. The analysis results can be displayed on the screen or sent to the printer. Logical databases support Report programs.

 

7. ABAP/4 organizes the dialog program into a module pool containing the dialog module. Each dynamic program (a "dynamic program" composed of a screen and Its stream logic) is based on an ABAP/4 dialog program. The stream logic includes the call to the ABAP/4 dialog module.

 

3. the sap basis structure associated with ABAP:

 

The sap r/3 system is a typical three-tier architecture system, including:

 

Presentation Layer: This is an interface between SAP users and the R/3 system. You can operate on the SAP system at this layer. This layer transfers USER commands or operations to the R/3 system, and then the system processes the data and returns it to the user.

 

Application Layer: This layer includes one or more application servers and one message server. Each application server includes a series of services to run applications. All services are separated among these application servers. In fact, all users need is one of the application servers. Information is transmitted between multiple servers to determine which server the user needs.

 

Database layer: this is the core of the SAP system and stores data of all SAP systems.

 

SAP supports many database systems, including Microsoft SQL Server, Oracle, Informix, DB2, and other mainstream database systems.

 

4. the first program of ABAP:

 

Well, after reading so much, I am dizzy. Let's get down to the next step for development.

 

First, introduce the concept of transaction code:

 

In SAP, each function basically corresponds to a transaction code. You can enter the corresponding transaction code to execute the corresponding function. The transaction code is entered in the input box under SAP menu.

 

The first program, hello World:

 

1. Use ABAP report to implement:

 

Simple: (1. Go to the SAP system> se38.

 

(2. Enter the program name z_hello and select create.

 

Note: self-developed programs must start with Z or Y, because SAP will not overwrite these programs during upgrade.

 

(3. A dialog box is displayed. Enter the title and select executable program as the type.

 

(4. Then, a dialog box will pop up asking you to select the development class (Package). If you have your own development class, you can input it without directly clicking the local object below.

 

(5. The ABAP editor appears. Enter the code:

 

"Write: 'Hello, world! '.".

 

(6. Press Ctrl + F2: syntax check; Ctrl + F3: activation; F8: execution.

 

Here, the first program of ABAP is written. It's easy !!!

 

2. Use ABAP dialog to implement:

 

It is quite troublesome. Here we will introduce in detail how to create a screen.

 

1. Create a dialog program. The steps are the same as above, but select module pool in type,

 

Assume that the program name is z_screen.

 

2. Run se51 and enter the program name z_screen in program;

 

Enter the screen number in screen number: 9000

 

Click Create

 

3. Enter your description in Short Description: Hello World Screen

 

4. Click layout to bring up the screen editor, create a tag, and enter Hello world.

 

5. Click Activate or Ctrl + F3

 

6. Run se93: Create transaction code: Enter z_hello, click Create. A dialog box is displayed. Enter short text, select program and screen, and enter the program name and screen number you created,

 

Z_screen, 9000

 

7. Click Save. In the displayed dialog box, select local object.

 

Okay. Run z_hello. You can see it. However, this program has no function to exit and will be added later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.