Hi, I provide training in SAP UI5. Also feel free to checkout my new web page https://saptechblog.com
ABAP

Flow of an ABAP program

 

Any programming languages are divided into three parts.

1.      Input

2.      Processing logic

3.      Output

 

Our user is least bothered about the processing logic. He is only concerned about the input he gives and the output he Gets. The Processing logic is like a blackbox to the end user.

clip_image002

 

User is only interested in his business process and does not need to know the flow of the ABAP program. But for the developer has to have the knowledge on the internal architecture.

 

Flow of an ABAP Program:

Business example: Assume you have a report which gets the details of the material and displays it to the user. The user enters the material number as input and get the other details of material like description, plant etc as output.

Processing of the report is as follows:

1. Enter the input (Presentation layer)

2. Validate the input for correction (Processing program)

3. Call the function module that returns the detail of the material number.  (This function module reads the data from the database table) (Resuable program)

4. Return the output to the processing program.

5. The processing program displays the result to the in the output screen through presentation layer.

 

Step 1:  Start of the program. After logging into the screen, a user can select any of the requested application by calling the transaction code or by using menu path.

Example: User runs the report.

clip_image004

 

Step 2:The runtime system loads the program context in the memory from repository. Program context contains selections screens and variable declared in the program are allocated with memory to hold inputs.

Example: The systems reads the report and created necessary data objects for execution.

clip_image006

 

Step 3: The runtime system sends the selection screen to the presentation server. The presentation server holds the control as long as the user enters the input and executes further.

Example: The selection screen is presented to the user for input(material number).

clip_image008

 

Step 4: The user enters the input and triggers the further execution. The entered data is then automaitcally placed in the corresponding memory location created for them. Then the runtime system resumes the process for further processing the information.

Example: The user input(material number) is stored in the memory

clip_image010

 

Step 5: In our example there is only one processing block. If the program calls for another reusable units such as function modules are class etc then the reusable unit is also loaded from the repository into the runtime. The processing block that calls the reusable unit wait until the execution of reusable unit is complete and then resumes the opeartaion.

Example: The ABAP program validates the material number and then call the function module(Reusable unit) to get the details of the material by passing the material number. Till the time the function module completes its execution, the processing program waits.

clip_image012

 

Step 6: If the reusable unit, reads any data that is stored in the database, then the connection is made to the database layer to access the data.

Example: The reusable unit(Function module) reads the data from the database table. For which a connection made to the database layer to get the data(Material details).

clip_image014

 

Step 7: The database layer returns the value to the  reusable unit.

Example: The database layer reads the material table and returns the material table to the requested program, which is function module in our case.

clip_image016

 

Step 8: Then when the reusable unit completes its execution, the program that called the reusable unit is resumed.

Example: The function module after completing its execution returns the data to the program that called the function module, which is report in our case.

clip_image018

 

Step 9: The runtime system sends the output to the Presentation layer after its processing is complete.

Example: The report completes its execution and transfer the data to the presentaion layer to be displayed as output.

clip_image020

 

 

 

About Arun

0 Comments:

Post a Comment

Powered by Blogger.