当前位置:网站首页>SAP ABAP dialog programming tutorial: module pool in -09

SAP ABAP dialog programming tutorial: module pool in -09

2022-06-22 16:21:00 Boating in rainy days

SAP ABAP Dialog programming tutorial : Module pool in -09

SAP-ABAP Two types of programs are supported – Reporting procedures and dialogue procedures .

If your ABAP The program requires user input , Then use the dialog box to program .

In this tutorial , You will learn :

  • The difference between a reporter and a dialog
  • Example of transaction processing in dialog programming
  • Components of the dialog program

User dialogue is any form of interaction between users and programs , It can be any of the following

  • input data
  • Select menu item
  • Click the button
  • Click or double-click the entry

When we need to navigate back and forth between screens , You can also use the dialog program

The creation type of dialog program is “M” – Module pool . They cannot be executed independently , And must be attached to at least one transaction code , Here you can specify the initial screen .

The difference between a reporter and a dialog

 Insert picture description here

Reporting procedures :

A report is a program , It usually reads and analyzes data in database tables without changing the database .

Dialog program :

Dialog programs allow you to work interactively with the system , And change the contents of the database table . Each dialog program has a certain order , These screens are processed one by one by the system .

Example of transaction processing in dialog programming

 Insert picture description here

Components of the dialog program

Unlike the report that usually needs to create an autonomous program that can be executed independently of other objects , Dialog program development requires the development of multiple objects , None of them can be executed alone . contrary , All objects are hierarchically linked to the main program , And execute in the order indicated by the dialog box main program .

The components of the dialog program include :

Transaction code

  • Transaction code start screen sequence .
  • You can go to ABAP In the repository browser of the workbench or using transactions SE93 Create transaction code .
  • The transaction code is linked to ABAP Program and initial screen .
  • You can use CALL SCREEN Statement from any ABAP Program start screen sequence .

The screen

  • SAP Each dialog box in the system is controlled by one or more screens .
  • Through transaction SE51, Use ABAP The screen brush in the workbench creates a screen
  • Each screen belongs to a ABAP Program .
  • These screens are provided by “ Screen mask ” or “ Layout ” And its flow logic . The layout of the screen determines the input / Output fields and other graphical elements ( Such as check boxes and radio buttons ) The location of . The stream logic determines the logical processing within the screen .

GUI status

  • Each screen has a GUI state , They are independent components of the program .
  • This will control the menu bar , Standard toolbar , Application toolbar , Users can use them to select functions in the application .
  • You can use the menu brush in ABAP Create them in the workbench .

ABAP plan

  • R/3 Every screen in the system and GUI All States belong to one ABAP Program .
  • ABAP The program contains dialog modules called by the screen flow logic , And it also deals with data from GUI User input for status .
  • Use the... Of the screen ABAP Programs are also called dialog programs .
  • In the module pool ( type M Program ); The first processing block to call is always the dialog module . however , You can also in other ABAP Program ( Such as executable program or function module ) Use the screen in . The first processing block is then called in a different way ; for example , Through runtime environment or procedure call . And then use CALL SCREEN Statement start screen sequence .

Screen flow logic

Screen flow logic is mainly divided into four components .

  • “ Process before exporting ”(PBO) event : Process before displaying the screen
  • Input post-processing (PAI) event : After the user performs an operation on the screen
  • Help request processing (POH): Press down F1 Time processing
  • Value request processing (POV): Press down F4 Time processing

Dynpro

  • The screen and its flow logic are called Dynpro(“ Dynamic program ”, Because screen flow logic affects program flow )
  • Every dynpro Control only one step of the dialog program .
  • The screen belonging to a program is numbered . The screen flow sequence can be linear , It can also be cyclic . From the screen chain , You can even call another screen chain , And return to the original chain after processing . You can also ABAP The next screen of the static definition is overwritten in the dialog module of the program .

ABAP Module pool

  • stay PBO or PAI Incident ,Dynpro call ABAP Dialog program . A collection of such programs is called ABAP Module pool .
  • for example , stay PAI The module called in the event is used to check the user input and trigger the corresponding dialog step , Such as updating tasks .
  • All to be called from a transaction dynpro All reference a common module pool .

The structure of the dialog program
 Insert picture description here

The flow of the dialogue program
 Insert picture description here

Reference resources :https://www.guru99.com/dialog-programming-tutorial.html

原网站

版权声明
本文为[Boating in rainy days]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221500489160.html