WhatsApp Button




top of page

Become Better With MODULE POOL PROGRAMMING In 10 Minutes

May 31, 2022
3 min read


SAP-ABAP supports two types of programs – Report Program and Dialog Program.

If your ABAP program demands user input , Dialog programming is used.


A user dialog is any form of interaction between the user and the program and could be any of the following

  • Entering data

  • Choosing a menu item

  • Clicking a button

  • Clicking or double clicking an entry

Dialog program is also used when we need to navigate back and forth between screens


Dialog programs are created with type as 'M' – Module Pool. They cannot be executed independently and must be attached to at least one transaction code in which you specify an initial screen.


Events in Module Pool Programming —

  • Process Before Output (PBO) event: which is processed before the screen is displayed

  • Process After Input (PAI) event: which is processed after a user action on the screen

  • Process on help request (POH): which is processed when F1 is pressed

  • Process on value request (POV):which is processed when F4 is pressed


Steps to start with Module Pool Programming

  • On Object Navigator Screen (tcode - “SE80”) select program from drop down menu and then fill the name for the program. Click on enter and save the program.




  • After saving Program name will appear in the below grid, right click on program name and select create and screen.



Steps to create layout for the screen —


Step 1 - Click on layout button.




Sep 2 - Apply functions as per requirement




To add table contents in layout click on the circled button and then write the name of the table and click on “get from dictionary.” After clicking select the field and click on tick icon.


Coding Screen —

Main coding for the program —



Screen 1000 coding — Customer verification screen




Screen 1000 layout — Customer verification screen




Screen 2000 coding — New Customer Registration screen



Screen 2000 layout — New Customer Registration screen



GUI elements —




Output when Entered Customer No. is present —



Output when Entered Customer No. is not present —




Database table —




Tab Strip Control —

A tabstrip control is a screen object consisting of two or more pages. Each tab page consists of a tab title and a page area. If the area occupied by the tabstrip control is too narrow to display all of the tab titles, a scrollbar appears, allowing you to reach the titles that are not displayed. There is also a pushbutton that allows you to display a list of all tab titles.


Tabstrip controls allow you to place a series of screens belonging to an application on a single screen, and to navigate between them easily.


Steps to create a Tab Strip Control menu —

Step 1 - On the painter window click on the circled button (Tabstrip Control).



Step 2 - Double click on the tab name and rename as per requirement.



Step 3 - Repeat step 2 for second tab.



Step 4 - Click on the circled button (subscreen area) and drag inside the tabstrip box.



Sample program for checking if the record is present in the table and if not adding it into the data base table.


Main coding screen —



Screen 1000 coding — Customer verification screen



Screen 1000 layout — Customer verification screen



Screen 2000 coding — Tabstrip menu



Screen 2000 layout — Tabstrip menu



Screen 3000 coding — New Customer Registration screen



Screen 3000 layout — New Customer Registration screen



Screen 4000 coding —



Screen 4000 layout —



GUI elements —



Output when Entered Customer No. is present —



Output when Entered Customer No. is not present —




Database tables —

KNA1



KNKK



Steps to make transaction code —


Step 1 - Right click on program name for which you are creating transaction code and select create and transaction.



Step 2 - Fill the required fields and click on enter.



Step 3 - After clicking on enter check this statement. If it appears it means the transaction code is generated successfully.



Checking for the transaction










ISHNOOR SINGH SETHI LINKEDIN- https://www.linkedin.com/in/ishnoorsingh/













 
 
 

58 Comments


E39 nhìn qua thấy khá dễ chịu, nhất là phần màu sắc không bị chói hay làm rối mắt. Mình thường để ý mấy chi tiết này trước vì có trang vừa mở lên đã thấy hơi ngợp, chưa kịp đọc gì. Ở đây thì tông màu phối với nhau khá nhẹ nhàng, nhìn chữ với các phần nội dung cũng thoải mái hơn. Mình chưa xem kỹ từng mục nên chỉ nói chút về cách trình bày thôi. Có một điểm mình khá thích là không phải kéo lên kéo xuống liên tục để đoán chỗ cần tìm. Với người lần đầu ghé vào như mình, bớt được đoạn mò mẫm vậy là ổn rồi. Các nhóm nội dung…

Like

e39 có đoạn giải thích chuyện trùng tên với dòng xe BMW làm mình thấy khá thú vị, vì lúc đầu mình cũng hơi lăn tăn không biết có liên quan gì không. Đọc mấy dòng đó là hiểu ngay, khỏi phải tự đoán thêm. Mình mới lướt phần giới thiệu chứ chưa xem kỹ nội dung khác, nên cũng chỉ để ý vài chỗ dễ đọc thôi. Bình thường gặp phần giới thiệu dài là mình hay kéo qua, nhưng có tiêu đề rõ thì vẫn muốn dừng lại xem đoạn nào đúng thứ mình đang thắc mắc. Kiểu đọc một chút rồi chuyển xuống dưới cũng không bị mất mạch lắm. Trên trang, phần phân biệt tên gọi…

Like

https://vz99.fund/ mình thấy dễ đọc ở chỗ các phần giới thiệu có tiêu đề rõ ràng, không phải kéo qua cả một đoạn dài mới biết đang nói về gì. Mình thường chỉ đọc lướt trước nên cách chia nội dung như vậy khá tiện, muốn xem kỹ phần nào thì dừng lại ở đó. Chẳng hạn, thông tin về giấy phép được để thành mục riêng, không lẫn với phần giới thiệu các loại hình giải trí. Có điều những gì trang viết về giấy phép thì mình vẫn xem là thông tin từ phía website thôi, chưa kiểm tra thêm nên không nhận xét đúng sai nha. Còn về cách sắp xếp thì mình khá thích việc hai…

Like

https://88kbet.io/ có cách đặt tiêu đề khá dễ theo dõi, nhất là với người hay đọc lướt như mình. Gặp bài dài là mình thường nhìn các mục trước rồi mới chọn đoạn để đọc, chứ ít khi kéo từ đầu xuống cuối một lượt. Ở đây phần giới thiệu và phần nói về quá trình phát triển được chia riêng nên đỡ phải đoán nội dung nằm chỗ nào. Mình thấy ổn ở chỗ bài có nhắc những cột mốc từ năm 2019, ít ra cũng có trình tự thời gian để theo dõi thay vì toàn lời giới thiệu chung. Những thông tin trong bài thì vẫn cần kiểm tra thêm, mình chỉ đang nói về cách sắp…

Like

rr88 có kiểu sắp xếp khá hợp mắt mình, nhất là lúc chỉ muốn lướt qua xem trang có những gì chứ chưa định đọc kỹ. Mình hay bị rối với mấy giao diện dồn quá nhiều thứ sát nhau, nên thấy các phần được chia riêng thế này thì dễ theo dõi hơn. Không cần ngồi đọc hết từng dòng vẫn nhận ra được chỗ nào với chỗ nào. Mình mới ngó phần trình bày thôi, còn bên trong từng mục ra sao thì chưa xem đủ để nói thêm. Nhưng riêng chuyện không phải đảo mắt tìm đường đi trên trang là đã thấy khá tiện rồi. Menu cũng dễ thấy, không phải kéo lên kéo xuống để…

Like
bottom of page