ABAP Summary Summary

1. The ABAP source code structure includes two parts: data definition and processing block. The processing block is divided into three parts (event block, dialogue module, and process). The event block and the dialogue module are external calls of the ABAP program, and the process is called internally through the program statement.

2. Application type:

         <1>, Executable program: It is often used to create reports in the usual sense, guided by the report keyword, and can also be run through submit statements or by assigning report transaction codes. All types of ABAP processing blocks can be included, but function modules cannot be defined in them (but can be called).

         <2>, module pool: generally contains screen and dialog modules defined by the program itself, guided by the Program keyword

3. Statement structure:

         <1>, declaration statement: used for the declaration and definition of data elements (such as constants and variables), commonly used data declaration words are types, data, parameters and tables, etc.

         <2>, Modular statement: used to define the processing code blocks in the runtime of the ABAP program, which can be divided into event keyword statements and process keyword definition statements

         <3>, control statement: process the internal program flow such as if, while and case through a certain conditional control program

         <4>, call statement: used to call the defined processing block, commonly used statements include perform, call, submit and leave to, etc.

         <5>, Operation statement: used for data operation or output inside the program, such as keywords such as write, move, add, etc. The keywords and options of operation statements can sometimes be replaced with data operators, such as assignment operator "=", this The tense operator itself is equivalent to the statement keyword

         <6>, database statement: used for database operations, divided into open SQL and native SQL

4. The program runs:

         <1>, program call: direct operation and internal call (a running program calls another program), the internal call to another executable program is mainly made through the submit statement, and the program is called leave to transaction or call transaction through the transaction code

         There are two situations in the internal call:

                   1. The control right is completely handed over to the called program. After the program execution ends, it will not return to the original program.

                   2, Embedded call, return to the original program after the program ends

 

         No return calls: submit (report call), leave totransaction (transaction call)

Return and call: submit andreturn (report call), call transaction (transaction call)

 

         <2>, End the program: when the system runtime environment completes all the processing processes, the program running process ends. You can force the currently running program to end at any point using the leave statement.

5. ABAP memory:

         Data can be transferred between the memory program stacks through export to memory and import from memory. If one program internally calls another program, you can use export to store the data into memory first, and then read the program through the import statement in the called program. , exiting the called program can also use the same method to transfer data back to the main program.

6, SAP memory:

         SAP memory is a memory area accessible to all sessions, and data can be shared among sessions through SAP memory. In ABAP, set parameter and get parameter are used to access SPA/GPA parameters stored in SAP memory. Screen default parameter settings can be made through the SAP memory.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326857958&siteId=291194637