SAP ABAP4 Learning - Basis (1)

zhaozj2021-02-16  109

-------------------------------------------------- -------------------------------------- ABAP (Advanced Business App Programming) is SAP to do In the advanced language developed on the SAP platform, although SAP claims Java in SAP, the current program is basically developed with ABAP. The main development of ABAP 1. Report Report 2. Dialog Dialog Log in to the SAP system, then, SE38 is input to the transfer code box, then "check". Out of the interface of ABAP / Editor, you can now create a program. The probably distributed program is. The following structure. First, the naming rules of the program are explained. The Reports program is YAXXXXXX or ZAXXXXXX, A Table Application Module referred to as, such as S-table SD Dialog program is SapMyxxx or Sapmzxxx Report

Or Program

.

for

The system uses the name entered on the "ABAP / 4 Editor Initial Screen". The statement Report and Program actually have the same functionality. They enable the system to identify report programs or any other ABAP / 4 program and allow for specifying a certain standard for the output list:

The REPORT or Program statement can have different parameters such as line-size, line-count or no standard page heading.

--------------------------------- Start writing a simple ABAP program ---------- -----------------

Program Sapmtest.

Write 'first program'.

The following is an example of a comment:

*********************************************************

* Program Sapmtzst ** Created by Carl Byte, 06/27/1995 ** Last Change by Rita Digit, 10/01/1995 ** Purpose: Demonstration ****************** ******************************* Program SapmTest. ************** ******************************** DECLATION Part ************* ****************************************** DATA ................... ****************************************************** OPERATION Part * -------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Each line program is "." Ends, multi-line program is written in a line. Look at the following example

Program Sapmztst.

Write 'this is a statement'.

You can also write as follows:

Program Sapmtest. Write 'this is a statement'.

Or as follows:

PROGRAM

SAPMTEST.

Write

'This is

a statement '.

The program's readability should be used to improve the program, but it should be avoided using a complex format. -------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Connect similar statements Write SPFLI-CityFrom.

Write spfli-cityto.

Write SPFLI-Airpto.

Chain statement:

Write: spfli-cityfrom, spfli-cityto, spfli-airpto.

In the chain, the number of collections opens the beginning of the statement from the variable portion. Can be before or after colon (or comma)

Insert any a space.

For example, you can write the same statements as follows:

Write: spfli-cityfrom,

SPFLI-CityTo,

SPFLI-Airpto.

In the chain statement, the first part (before the colon) is not limited by the statement keyword.

Statement order:

SUM = SUM 1.

SUM = SUM 2.

SUM = SUM 3.

SUM = SUM 4.

Chain statement:

SUM = SUM : 1, 2, 3, 4.

-------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

转载请注明原文地址:https://www.9cbs.com/read-13335.html

New Post(0)