Sie sind auf Seite 1von 16
Flow of an ABAP Program ow of an ABAD Program > About This Medula > Introduction About This Module Duration: Module Knowledge ‘= Describing the Processing of ABAP Programs Target Audience Flow of an ABAP Program oo Fw of an ABAP Program > Duscribing the Procassing of ABAP Programs > About This Tope About This Topic ‘This lesson explains how a simple dialog program is executed by SAP NetWeaver Application Server (AS) Business Example ‘Your task isto explain the SAP NetWeaver AS architecture and the execution of ABAP programs. For this reason, you require the ‘ollowing knowledge ‘= Anunderstanding of the SAP NetWeaver AS architecture = Anunderstanding of how a simple dialog program is executed by the ABAP runtime system Estimated time to complete this topic: 20 Minutes ‘Objective(s) ‘= Describe the SAP NettVeaver Application Server architecture = Describe the execution of a simple dialog program by the ABAP runtime system Flow of an ABAP Program Foow ofan ABAP Program > Deering the Procasing of ABAP Programs > ABAP System Architecture ABAP System Architecture ‘SAP NetWeaver AS has @ modular architecture that follows the a, soflware-oriented clienliserver principle In SAP NetWeaver AS, presentations, application logic, and data storage can be assigned io different systems, This serves as the basis forthe scalabilly ofthe system. (G50 treme pore Flow of an ABAP Program oo Flow ofan ABAP Program > Deering the Procasing of ABAP Programs > Loves in SAP NetWeaver Application Server Levels in SAP NetWeaver Application Server ‘The various levels in SAP NetWeaver AS are as follows: ‘= Database Level [Database lovelis the lowest lavel in SAP NetWeaver AS. At this laval, data is managed with the help of Relational Dalabase Management System (RDBMS). In addition to application data, it includes programs and the ‘metadata thal the SAP system requires for operation ‘= Application Server Level ‘Application Server love is the intermediate lovel in SAP NofVeavor AS. At this level, ABAP programs, such as applications that SAP provides and any custom-developed applications, run on the application server ABAP programs read dala from the database, process it, and, if necessary, store new data in the database = Presentation Server Level Presentation Server level isthe third level in SAP NetWeaver AS. This level contains the user interface where each user can access the program, tenler now dala, and receive the results of a work process, [te termes aston fst — physical location on the hardware. Vertically, all levels can be | nstaled on top of each other on one compuier or each level on a separate computer. Horizontally, you can dive the presentation, and application servers among any numbor of computors. Hawaver, the horizontal distrbution of database components ddopends on the type of database installod Flow of an ABAP Program Foow ofan ABA? Program > Deering the Procassing of ABAP Programs > Excerpt for an ABAP Program Excerpt for an ABAP Program Presentation Server View SAPGUI Enterprise Portal Web Browser Application Server View Work Process ‘You can simpliy the figure for most ofthe topics that will be ‘discussed during this course. This course focuses on the inleraction between one user and one ABAP program. Understanding how to write an ABAP program is more important ‘than understanding the exact processes involvad in the ‘pplication server. Therefore, you wil be working with a simplified figure that does not explicitly show the dispatcher and the work process. Certain sides wil, however, be enhanced to include these details whenever they are relevant to ABAP programming. ABA programs are processed on the application server The ‘design of user dialogs and database accesses is of particular importance when witing application programs (SSA Intemet Explorer Flow of an ABAP Program Foow ofan ABA? Program > Deering the Procassing of ABAP Programs > Overview of Program Flow Overview of Program Flow \ Black Box oe (Chek Nexto contnue This section explains the basic process thal starts when an ABAP | program is executed. To do ths, you use a program with which the user enters an aitine ID (for example, LH) and finds detas of the arrine displayed as a result. The SAP system is lke a black box to an average user. Users do not need to know the precise process flow of an ABAP program. ‘An average user is only interested inthe business process and how to enter or display dala. The technical aspects of the program are of minor interest to an average user. i i g l & i 2 : : 3 ; : i 5 3 2 5 3 3 2 Interplay Between Server Levels and Program Flow ‘Aller the user performs an action such as choosing Enter, a function key, a menu function, or a pushbutton, control is passed from the presentation server to the application server. \Fanother user dialog is triggered from the ABAP program, the system transmits the screen, and contol is once again passed back tothe presentation server. ‘A program is not made up of a single block, but of several units This #s Known as modularzation. You can use most of these modulanzation units in more than one program. This is why they are offen termed as reuse units. A good program should have ‘database accesses oncapsulatod in such reuse units. The reuse tnit creates a division betwoen the design ofthe user dialog and. ‘database accesses, making i possible to use the same database accesses for diferent user dialogs, Flow of an ABAP Program Fw of an ABAP Program > Describing the Procassing of ABAP Programs > Program Flow n Detal -Solaction Screen and List Program Flow in Detail - Selection Screen and List Program Start — = Processing ck ASAP Processing sock ‘ABAP Runtime System Database Table ‘Whenever a user iogs on to the system, a screen is displayed. From this screen, the user can start an ABAP program using the menu path. In this ease, the system first loads the program context onto the application server. The program context contains memory areas for Variables and complex data objects, information on the screens for user dialogs, and ABAP processing blocks ‘The runtime system gets all these program information from the Repository, which is special part ofthe database. The sample program has a selection screen as the user dialog, a vanable and a structure as data objects, and one ABAP processing block. The list used to display the data is created dynamically at runtime. The ABAP runtime system contro's the subsequent program flow. Since the program contains a selection screen, the ABAP runtime system sends it to the presentation server. The presentation server Controls the program flow for as long as the user has not finished entering data in the input felds. Selection screens allow users to enter selection criteria requited by the program for it to continue ‘As Soon as the user has finished entering data on the seloction scraen, he or she can trigger further processing of the program by choosing Execute. The entered data is automaticaly placed in its corresponding data objects in the program and the ABAP runtime system resumes contro. In our simple program example there is only one ABAP processing block. The ABAP runtime system triggers sequential processing ofthis ABAP processing block. ifthe entries made by the user do not have the correct type, an error message 's automatically triggered. The user must correct hisher entries, ‘A reusable unit is called in the processing block that encapsulates the database access. The rouse unit is a spacial processing block in an individual program. The actual example shows a mothod in a global class. When the rouse unit is called, the program in which it 's contained is also read from the Repository and loaded to the application server. Inthe call, the required data is transferred to the called program, after which the reuse units executed. The execution is synchronous, Which means that the caling program waits unt the reuse unit has Deen processed completely. In the example program, read access to the database is programmed in the reuse unit. Correspondingly, information about the database table fo be accessed and the row in the table to be read is passed on to the database. ‘Tho database rotums the requested data record to the program and the runtime system ensures that this data is placed in the appropriate data objects. Ifa single record is accessed, this data object is usually a structure that contains relevant components for all the required database fields. This concludes the processing of the reuse unit and control is returned to the calling program, which resumes immediately after the call. When the system exits the reuse unit, the data that was read from the database is writen to a corresponding data object for the calling program, from whore it can be processed further. Aftor the reuse unit has besn callod, the ABAP processing block receives statements for structuring the lst with which the result is to be displayed. After the processing block finishes, the runtime system sands the lst as a screen to the presentation server Flow of an ABAP Program Fw of an ABAP Program > Decriing the Procassing of ABAP Programs > Course Structure H Course Structure __ The table of contents forthe course Is as follows: Unit 1: Flow of an ABAP Program Unit. ABAP Workbench Introduction Unit 3. Basic ABAP Language Elements Unit 4: Modulerization Unit 5: Complex Data Objects Unit 6: Data Modaling and Data Retrieval Unit7: Classic ABAP Report Unit: Screen Unit 9. SAP List Viewer Unit 10: Web Dynpro ABAP Unit 11: Program AnalysisToo! Unit 12: SAP Standard Software Adjustments ‘The program discussed already demonstrates numerous concepts that make up the content of this course. The table of contents, which shows all topics dealt with and their corresponding units, serves as an orientation aid for the remaining sections of this course Flow of an ABAP Program Fow of an ABAP Program > Desribing the Procssing of ABAP Programs > Summary Summary ‘You should now be able to: |= Describe the SAP NetWeaver Application Server architecture |= Describe the execution of a simple dialog program by the ABAP runtime system

Das könnte Ihnen auch gefallen